This source file includes following definitions.
- main
- scsi_init
- main
- sd_init
- sd_init1
- sd_attach
- sr_init
- sr_init1
- sr_attach
- st_init
- st_init1
- st_attach
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 "../blk.h"
20 #include <linux/kernel.h>
21 #include "scsi.h"
22
23 #ifndef NULL
24 #define NULL 0L
25 #endif
26
27 #ifdef FIGURE_MAX_SCSI_HOSTS
28 #define MAX_SCSI_HOSTS
29 #endif
30
31 #ifndef MAX_SCSI_HOSTS
32 #include "max_hosts.h"
33 #endif
34
35 #include "hosts.h"
36
37 #ifdef CONFIG_SCSI_AHA1542
38 #include "aha1542.h"
39 #endif
40
41 #ifdef CONFIG_SCSI_AHA1740
42 #include "aha1740.h"
43 #endif
44
45 #ifdef CONFIG_SCSI_FUTURE_DOMAIN
46 #include "fdomain.h"
47 #endif
48
49 #ifdef CONFIG_SCSI_SEAGATE
50 #include "seagate.h"
51 #endif
52
53 #ifdef CONFIG_SCSI_ULTRASTOR
54 #include "ultrastor.h"
55 #endif
56
57 #ifdef CONFIG_SCSI_7000FASST
58 #include "wd7000.h"
59 #endif
60
61 #ifdef CONFIG_SCSI_DEBUG
62 #include "scsi_debug.h"
63 #endif
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87 #ifdef FIGURE_MAX_SCSI_HOSTS
88 #define BLANKIFY(what) BLANK_HOST
89 #else
90 #define BLANKIFY(what) what
91 #endif
92
93 Scsi_Host scsi_hosts[] =
94 {
95 #ifdef CONFIG_SCSI_AHA1542
96 BLANKIFY(AHA1542),
97 #endif
98
99 #ifdef CONFIG_SCSI_AHA1740
100 BLANKIFY(AHA1740),
101 #endif
102
103 #ifdef CONFIG_SCSI_FUTURE_DOMAIN
104 BLANKIFY(FDOMAIN_16X0),
105 #endif
106
107 #ifdef CONFIG_SCSI_SEAGATE
108 BLANKIFY(SEAGATE_ST0X),
109 #endif
110 #ifdef CONFIG_SCSI_ULTRASTOR
111 BLANKIFY(ULTRASTOR_14F),
112 #endif
113 #ifdef CONFIG_SCSI_7000FASST
114 BLANKIFY(WD7000),
115 #endif
116 #ifdef CONFIG_SCSI_DEBUG
117 BLANKIFY(SCSI_DEBUG),
118 #endif
119 };
120
121 #ifdef FIGURE_MAX_SCSI_HOSTS
122 #undef MAX_SCSI_HOSTS
123 #define MAX_SCSI_HOSTS (sizeof(scsi_hosts) / sizeof(Scsi_Host))
124 #endif
125
126 #ifdef FIGURE_MAX_SCSI_HOSTS
127 #include <stdio.h>
128 void main (void)
129 {
130 printf("%d", MAX_SCSI_HOSTS);
131 }
132 #else
133
134
135
136
137 volatile unsigned char host_busy[MAX_SCSI_HOSTS];
138 volatile int host_timeout[MAX_SCSI_HOSTS];
139 int last_reset[MAX_SCSI_HOSTS];
140 Scsi_Cmnd *host_queue[MAX_SCSI_HOSTS];
141 struct wait_queue *host_wait[MAX_SCSI_HOSTS] = {NULL,};
142 int max_scsi_hosts = MAX_SCSI_HOSTS;
143
144 void scsi_init(void)
145 {
146 static int called = 0;
147 int i, count;
148 if (!called)
149 {
150 called = 1;
151 for (count = i = 0; i < MAX_SCSI_HOSTS; ++i)
152 {
153
154
155
156
157
158 host_busy[i] = 0;
159 host_queue[i] = NULL;
160
161 if ((scsi_hosts[i].detect) && (scsi_hosts[i].present = scsi_hosts[i].detect(i)))
162 {
163 printk ("scsi%d : %s.\n\r",
164 count, scsi_hosts[i].name);
165 printk ("%s", scsi_hosts[i].info());
166 ++count;
167 }
168 }
169 printk ("scsi : %d hosts. \n\r", count);
170 }
171
172 }
173
174 #endif
175 #else
176 void main(void) {
177 printf("0\n");
178 }
179 #endif
180
181
182 #ifndef CONFIG_BLK_DEV_SD
183 unsigned long sd_init(unsigned long memory_start, unsigned long memory_end){
184 return memory_start;
185 };
186 unsigned long sd_init1(unsigned long memory_start, unsigned long memory_end){
187 return memory_start;
188 };
189 void sd_attach(Scsi_Device * SDp){
190 };
191 int NR_SD=-1;
192 int MAX_SD=0;
193 #endif
194
195
196 #ifndef CONFIG_BLK_DEV_SR
197 unsigned long sr_init(unsigned long memory_start, unsigned long memory_end){
198 return memory_start;
199 };
200 unsigned long sr_init1(unsigned long memory_start, unsigned long memory_end){
201 return memory_start;
202 };
203 void sr_attach(Scsi_Device * SDp){
204 };
205 int NR_SR=-1;
206 int MAX_SR=0;
207 #endif
208
209
210 #ifndef CONFIG_BLK_DEV_ST
211 unsigned long st_init(unsigned long memory_start, unsigned long memory_end){
212 return memory_start;
213 };
214 unsigned long st_init1(unsigned long memory_start, unsigned long memory_end){
215 return memory_start;
216 };
217 void st_attach(Scsi_Device * SDp){
218 };
219 int NR_ST=-1;
220 int MAX_ST=0;
221 #endif
222