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