This source file includes following definitions.
- main
- scsi_init
- main
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 #include <linux/config.h>
17
18 #ifdef CONFIG_SCSI
19 #include <linux/kernel.h>
20 #include "scsi.h"
21
22 #ifndef NULL
23 #define NULL 0L
24 #endif
25
26 #ifdef FIGURE_MAX_SCSI_HOSTS
27 #define MAX_SCSI_HOSTS
28 #endif
29
30 #include "hosts.h"
31
32 #ifdef CONFIG_SCSI_AHA1542
33 #include "aha1542.h"
34 #endif
35
36 #ifdef CONFIG_SCSI_FUTURE_DOMAIN
37 #include "fdomain.h"
38 #endif
39
40 #ifdef CONFIG_SCSI_SEAGATE
41 #include "seagate.h"
42 #endif
43
44 #ifdef CONFIG_SCSI_ULTRASTOR
45 #include "ultrastor.h"
46 #endif
47
48 #ifdef CONFIG_SCSI_7000FASST
49 #include "7000fasst.h"
50 #endif
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74 #ifdef FIGURE_MAX_SCSI_HOSTS
75 #define BLANKIFY(what) BLANK_HOST
76 #else
77 #define BLANKIFY(what) what
78 #endif
79
80 Scsi_Host scsi_hosts[] =
81 {
82 #ifdef CONFIG_SCSI_AHA1542
83 BLANKIFY(AHA1542),
84 #endif
85
86 #ifdef CONFIG_SCSI_FUTURE_DOMAIN
87 BLANKIFY(FDOMAIN_16X0),
88 #endif
89
90 #ifdef CONFIG_SCSI_SEAGATE
91 BLANKIFY(SEAGATE_ST0X),
92 #endif
93 #ifdef CONFIG_SCSI_ULTRASTOR
94 BLANKIFY(ULTRASTOR_14F),
95 #endif
96 #ifdef CONFIG_SCSI_7000FASST
97 BLANKIFY(WD7000FASST),
98 #endif
99 };
100
101 #ifdef FIGURE_MAX_SCSI_HOSTS
102 #undef MAX_SCSI_HOSTS
103 #define MAX_SCSI_HOSTS (sizeof(scsi_hosts) / sizeof(Scsi_Host))
104 #endif
105
106 #ifdef FIGURE_MAX_SCSI_HOSTS
107 #include <stdio.h>
108 void main (void)
109 {
110 printf("%d", MAX_SCSI_HOSTS);
111 }
112 #else
113
114
115
116
117 volatile unsigned char host_busy[MAX_SCSI_HOSTS];
118 volatile int host_timeout[MAX_SCSI_HOSTS];
119 volatile Scsi_Cmnd *host_queue[MAX_SCSI_HOSTS];
120
121 void scsi_init(void)
122 {
123 static int called = 0;
124 int i, count;
125 if (!called)
126 {
127 called = 1;
128 for (count = i = 0; i < MAX_SCSI_HOSTS; ++i)
129 {
130
131
132
133
134
135 host_busy[i] = 0;
136 host_timeout[i] = 0;
137 host_queue[i] = NULL;
138
139 if ((scsi_hosts[i].detect) && (scsi_hosts[i].present = scsi_hosts[i].detect(i)))
140 {
141 printk ("scsi%d : %s.\n\r",
142 count, scsi_hosts[i].name);
143 printk ("%s", scsi_hosts[i].info());
144 ++count;
145 }
146 }
147 printk ("scsi : %d hosts. \n\r", count);
148 }
149
150 }
151
152 #endif
153 #else
154 void main(void) {
155 printf("0\n");
156 }
157 #endif