1 /*
2 * DO NOT EDIT - This file is automatically generated
3 * from the following source files:
4 *
5 * $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#94 $
6 * $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#70 $
7 */
8 static uint8_t seqprog[] = {
9 0xff, 0x02, 0x06, 0x78,
10 0x00, 0xea, 0x50, 0x59,
11 0x01, 0xea, 0x04, 0x30,
12 0xff, 0x04, 0x0c, 0x78,
13 0x19, 0xea, 0x50, 0x59,
14 0x19, 0xea, 0x04, 0x00,
15 0x33, 0xea, 0x44, 0x59,
16 0x33, 0xea, 0x00, 0x00,
17 0x60, 0x3a, 0x1a, 0x68,
18 0x04, 0x47, 0x1b, 0x68,
19 0xff, 0x21, 0x1b, 0x70,
20 0x40, 0x4b, 0x92, 0x69,
21 0x00, 0xe2, 0x54, 0x59,
22 0x40, 0x4b, 0x92, 0x69,
23 0x20, 0x4b, 0x82, 0x69,
24 0xfc, 0x42, 0x24, 0x78,
25 0x10, 0x40, 0x24, 0x78,
26 0x00, 0xe2, 0xc4, 0x5d,
27 0x20, 0x4d, 0x28, 0x78,
28 0x00, 0xe2, 0xc4, 0x5d,
29 0x30, 0x3f, 0xc0, 0x09,
30 0x30, 0xe0, 0x30, 0x60,
31 0x7f, 0x4a, 0x94, 0x08,
32 0x00, 0xe2, 0x32, 0x40,
33 0xc0, 0x4a, 0x94, 0x00,
34 0x00, 0xe2, 0x3e, 0x58,
35 0x00, 0xe2, 0x56, 0x58,
36 0x00, 0xe2, 0x66, 0x58,
37 0x00, 0xe2, 0x06, 0x40,
38 0x33, 0xea, 0x44, 0x59,
39 0x33, 0xea, 0x00, 0x00,
40 0x01, 0x52, 0x64, 0x78,
41 0x02, 0x58, 0x50, 0x31,
42 0xff, 0xea, 0x10, 0x0b,
43 0xff, 0x97, 0x4f, 0x78,
44 0x50, 0x4b, 0x4a, 0x68,
45 0xbf, 0x3a, 0x74, 0x08,
46 0x14, 0xea, 0x50, 0x59,
47 0x14, 0xea, 0x04, 0x00,
48 0x08, 0x92, 0x25, 0x03,
49 0xff, 0x90, 0x3f, 0x68,
50 0x00, 0xe2, 0x56, 0x5b,
51 0x00, 0xe2, 0x3e, 0x40,
52 0x00, 0xea, 0x44, 0x59,
53 0x01, 0xea, 0x00, 0x30,
54 0x80, 0xf9, 0x5e, 0x68,
55 0x00, 0xe2, 0x42, 0x59,
56 0x11, 0xea, 0x44, 0x59,
57 0x11, 0xea, 0x00, 0x00,
58 0x80, 0xf9, 0x42, 0x79,
59 0xff, 0xea, 0xd4, 0x0d,
60 0x22, 0xea, 0x44, 0x59,
61 0x22, 0xea, 0x00, 0x00,
62 0x10, 0x16, 0x70, 0x78,
63 0x01, 0x0b, 0xa2, 0x32,
64 0x10, 0x16, 0x2c, 0x00,
65 0x18, 0xad, 0x00, 0x79,
66 0x04, 0xad, 0xca, 0x68,
67 0x80, 0xad, 0x64, 0x78,
68 0x10, 0xad, 0x98, 0x78,
69 0xff, 0x88, 0x83, 0x68,
70 0xe7, 0xad, 0x5a, 0x09,
71 0x02, 0x8c, 0x59, 0x32,
72 0x02, 0x28, 0x19, 0x33,
73 0x02, 0xa8, 0x50, 0x36,
74 0x33, 0xea, 0x44, 0x59,
75 0x33, 0xea, 0x00, 0x00,
76 0x40, 0x3a, 0x64, 0x68,
77 0x50, 0x4b, 0x64, 0x68,
78 0x22, 0xea, 0x44, 0x59,
79 0x22, 0xea, 0x00, 0x00,
80 0xe7, 0xad, 0x5a, 0x09,
81 0x02, 0x8c, 0x59, 0x32,
82 0x1a, 0xea, 0x50, 0x59,
83 0x1a, 0xea, 0x04, 0x00,
84 0xff, 0xea, 0xd4, 0x0d,
85 0xe7, 0xad, 0x5a, 0x09,
86 0x00, 0xe2, 0xa6, 0x58,
87 0xff, 0xea, 0x56, 0x02,
88 0x04, 0x7c, 0x78, 0x32,
89 0x20, 0x16, 0x64, 0x78,
90 0x04, 0x38, 0x79, 0x32,
91 0x80, 0x37, 0x6f, 0x16,
92 0xff, 0x2d, 0xb5, 0x60,
93 0xff, 0x29, 0xb5, 0x60,
94 0x40, 0x51, 0xc5, 0x78,
95 0xff, 0x4f, 0xb5, 0x68,
96 0xff, 0x4d, 0xc1, 0x19,
97 0x00, 0x4e, 0xd5, 0x19,
98 0x00, 0xe2, 0xc4, 0x50,
99 0x01, 0x4c, 0xc1, 0x31,
100 0x00, 0x50, 0xd5, 0x19,
101 0x00, 0xe2, 0xc4, 0x48,
102 0x80, 0x18, 0x64, 0x78,
103 0x02, 0x4a, 0x1d, 0x30,
104 0x10, 0xea, 0x18, 0x00,
105 0x60, 0x18, 0x30, 0x00,
106 0x7f, 0x18, 0x30, 0x0c,
107 0x02, 0xea, 0x02, 0x00,
108 0xff, 0xea, 0xa0, 0x0a,
109 0x80, 0x18, 0x30, 0x04,
110 0x40, 0xad, 0x64, 0x78,
111 0xe7, 0xad, 0x5a, 0x09,
112 0x02, 0xa8, 0x40, 0x31,
113 0xff, 0xea, 0xc0, 0x09,
114 0x01, 0x4e, 0x9d, 0x1a,
115 0x00, 0x4f, 0x9f, 0x22,
116 0x01, 0x94, 0x6d, 0x33,
117 0x01, 0xea, 0x20, 0x33,
118 0x04, 0xac, 0x49, 0x32,
119 0xff, 0xea, 0x5a, 0x03,
120 0xff, 0xea, 0x5e, 0x03,
121 0x01, 0x10, 0xd4, 0x31,
122 0x10, 0x92, 0xf5, 0x68,
123 0x3d, 0x93, 0xc5, 0x29,
124 0xfe, 0xe2, 0xc4, 0x09,
125 0x01, 0xea, 0xc6, 0x01,
126 0x02, 0xe2, 0xc8, 0x31,
127 0x02, 0xec, 0x50, 0x31,
128 0x02, 0xa0, 0xda, 0x31,
129 0xff, 0xa9, 0xf4, 0x70,
130 0x02, 0xa0, 0x58, 0x37,
131 0xff, 0x21, 0xfd, 0x70,
132 0x02, 0x22, 0x51, 0x31,
133 0x02, 0xa0, 0x5c, 0x33,
134 0x02, 0xa0, 0x44, 0x36,
135 0x02, 0xa0, 0x40, 0x32,
136 0x02, 0xa0, 0x44, 0x36,
137 0x04, 0x47, 0x05, 0x69,
138 0x40, 0x16, 0x30, 0x69,
139 0xff, 0x2d, 0x35, 0x61,
140 0xff, 0x29, 0x65, 0x70,
141 0x01, 0x37, 0xc1, 0x31,
142 0x02, 0x28, 0x55, 0x32,
143 0x01, 0xea, 0x5a, 0x01,
144 0x04, 0x3c, 0xf9, 0x30,
145 0x02, 0x28, 0x51, 0x31,
146 0x01, 0xa8, 0x60, 0x31,
147 0x00, 0xa9, 0x60, 0x01,
148 0x01, 0x14, 0xd4, 0x31,
149 0x01, 0x50, 0xa1, 0x1a,
150 0xff, 0x4e, 0x9d, 0x1a,
151 0xff, 0x4f, 0x9f, 0x22,
152 0xff, 0x8d, 0x29, 0x71,
153 0x80, 0xac, 0x28, 0x71,
154 0x20, 0x16, 0x28, 0x69,
155 0x02, 0x8c, 0x51, 0x31,
156 0x00, 0xe2, 0x12, 0x41,
157 0x01, 0xac, 0x08, 0x31,
158 0x09, 0xea, 0x5a, 0x01,
159 0x02, 0x8c, 0x51, 0x32,
160 0xff, 0xea, 0x1a, 0x07,
161 0x04, 0x24, 0xf9, 0x30,
162 0x1d, 0xea, 0x3a, 0x41,
163 0x02, 0x2c, 0x51, 0x31,
164 0x04, 0xa8, 0xf9, 0x30,
165 0x19, 0xea, 0x3a, 0x41,
166 0x06, 0xea, 0x08, 0x81,
167 0x01, 0xe2, 0x5a, 0x35,
168 0x02, 0xf2, 0xf0, 0x35,
169 0x02, 0xf2, 0xf0, 0x31,
170 0x02, 0xf8, 0xe4, 0x35,
171 0x80, 0xea, 0xb2, 0x01,
172 0x01, 0xe2, 0x00, 0x30,
173 0xff, 0xea, 0xb2, 0x0d,
174 0x80, 0xea, 0xb2, 0x01,
175 0x11, 0x00, 0x00, 0x10,
176 0xff, 0xea, 0xb2, 0x0d,
177 0x01, 0xe2, 0x04, 0x30,
178 0x01, 0xea, 0x04, 0x34,
179 0x02, 0x20, 0xbd, 0x30,
180 0x02, 0x20, 0xb9, 0x30,
181 0x02, 0x20, 0x51, 0x31,
182 0x4c, 0x93, 0xd7, 0x28,
183 0x10, 0x92, 0x63, 0x79,
184 0x01, 0x6b, 0xc0, 0x30,
185 0x02, 0x64, 0xc8, 0x00,
186 0x40, 0x3a, 0x74, 0x04,
187 0x00, 0xe2, 0x56, 0x58,
188 0x33, 0xea, 0x44, 0x59,
189 0x33, 0xea, 0x00, 0x00,
190 0x30, 0x3f, 0xc0, 0x09,
191 0x30, 0xe0, 0x64, 0x61,
192 0x20, 0x3f, 0x7a, 0x69,
193 0x10, 0x3f, 0x64, 0x79,
194 0x02, 0xea, 0x7e, 0x00,
195 0x00, 0xea, 0x44, 0x59,
196 0x01, 0xea, 0x00, 0x30,
197 0x02, 0x48, 0x51, 0x35,
198 0x01, 0xea, 0x7e, 0x00,
199 0x11, 0xea, 0x44, 0x59,
200 0x11, 0xea, 0x00, 0x00,
201 0x02, 0x48, 0x51, 0x35,
202 0x08, 0xea, 0x98, 0x00,
203 0x08, 0x57, 0xae, 0x00,
204 0x08, 0x3c, 0x78, 0x00,
205 0xf0, 0x49, 0x68, 0x0a,
206 0x0f, 0x67, 0xc0, 0x09,
207 0x00, 0x34, 0x69, 0x02,
208 0x20, 0xea, 0x96, 0x00,
209 0x00, 0xe2, 0xf8, 0x41,
210 0x40, 0x3a, 0xae, 0x69,
211 0x02, 0x55, 0x06, 0x68,
212 0x02, 0x56, 0xae, 0x69,
213 0xff, 0x5b, 0xae, 0x61,
214 0x02, 0x20, 0x51, 0x31,
215 0x80, 0xea, 0xb2, 0x01,
216 0x44, 0xea, 0x00, 0x00,
217 0x01, 0x33, 0xc0, 0x31,
218 0x33, 0xea, 0x00, 0x00,
219 0xff, 0xea, 0xb2, 0x09,
220 0xff, 0xe0, 0xc0, 0x19,
221 0xff, 0xe0, 0xb0, 0x79,
222 0x02, 0xac, 0x51, 0x31,
223 0x00, 0xe2, 0xa6, 0x41,
224 0x02, 0x5e, 0x50, 0x31,
225 0x02, 0xa8, 0xb8, 0x30,
226 0x02, 0x5c, 0x50, 0x31,
227 0xff, 0xad, 0xc1, 0x71,
228 0x02, 0xac, 0x41, 0x31,
229 0x02, 0x22, 0x51, 0x31,
230 0x02, 0xa0, 0x5c, 0x33,
231 0x02, 0xa0, 0x44, 0x32,
232 0x00, 0xe2, 0xca, 0x41,
233 0x10, 0x92, 0xcb, 0x69,
234 0x3d, 0x93, 0xc9, 0x29,
235 0x01, 0xe4, 0xc8, 0x01,
236 0x01, 0xea, 0xca, 0x01,
237 0xff, 0xea, 0xda, 0x01,
238 0x02, 0x20, 0x51, 0x31,
239 0x02, 0xae, 0x41, 0x32,
240 0xff, 0x21, 0xd3, 0x61,
241 0xff, 0xea, 0x46, 0x02,
242 0x02, 0x5c, 0x50, 0x31,
243 0x40, 0xea, 0x96, 0x00,
244 0x02, 0x56, 0xcc, 0x6d,
245 0x01, 0x55, 0xcc, 0x6d,
246 0x10, 0x92, 0xdf, 0x79,
247 0x10, 0x40, 0xe8, 0x69,
248 0x01, 0x56, 0xe8, 0x79,
249 0xff, 0x97, 0x07, 0x78,
250 0x13, 0xea, 0x50, 0x59,
251 0x13, 0xea, 0x04, 0x00,
252 0x00, 0xe2, 0x06, 0x40,
253 0xbf, 0x3a, 0x74, 0x08,
254 0x08, 0xea, 0x98, 0x00,
255 0x08, 0x57, 0xae, 0x00,
256 0x01, 0x93, 0x69, 0x32,
257 0x01, 0x94, 0x6b, 0x32,
258 0x40, 0xea, 0x66, 0x02,
259 0x08, 0x3c, 0x78, 0x00,
260 0x80, 0xea, 0x62, 0x02,
261 0x00, 0xe2, 0xb8, 0x5b,
262 0x01, 0x36, 0xc1, 0x31,
263 0x9f, 0xe0, 0x4c, 0x7c,
264 0x80, 0xe0, 0x0c, 0x72,
265 0xa0, 0xe0, 0x44, 0x72,
266 0xc0, 0xe0, 0x3a, 0x72,
267 0xe0, 0xe0, 0x74, 0x72,
268 0x01, 0xea, 0x50, 0x59,
269 0x01, 0xea, 0x04, 0x00,
270 0x00, 0xe2, 0xf8, 0x41,
271 0x80, 0x33, 0x13, 0x7a,
272 0x03, 0xea, 0x50, 0x59,
273 0x03, 0xea, 0x04, 0x00,
274 0xee, 0x00, 0x1a, 0x6a,
275 0x05, 0xea, 0xb4, 0x00,
276 0x33, 0xea, 0x44, 0x59,
277 0x33, 0xea, 0x00, 0x00,
278 0x02, 0xa8, 0x90, 0x32,
279 0x00, 0xe2, 0x6a, 0x59,
280 0xef, 0x96, 0xd5, 0x19,
281 0x00, 0xe2, 0x2a, 0x52,
282 0x09, 0x80, 0xe1, 0x30,
283 0x02, 0xea, 0x36, 0x00,
284 0xa8, 0xea, 0x32, 0x00,
285 0x00, 0xe2, 0x30, 0x42,
286 0x01, 0x96, 0xd1, 0x30,
287 0x10, 0x80, 0x89, 0x31,
288 0x20, 0xea, 0x32, 0x00,
289 0xbf, 0x33, 0x67, 0x0a,
290 0x20, 0x19, 0x32, 0x6a,
291 0x02, 0x4d, 0xf8, 0x69,
292 0x40, 0x33, 0x67, 0x02,
293 0x00, 0xe2, 0xf8, 0x41,
294 0x80, 0x33, 0xb5, 0x6a,
295 0x01, 0x44, 0x10, 0x33,
296 0x08, 0x92, 0x25, 0x03,
297 0x00, 0xe2, 0xf8, 0x41,
298 0x10, 0xea, 0x80, 0x00,
299 0x01, 0x31, 0xc5, 0x31,
300 0x80, 0xe2, 0x60, 0x62,
301 0x10, 0x92, 0x85, 0x6a,
302 0xc0, 0x94, 0xc5, 0x01,
303 0x40, 0x92, 0x51, 0x6a,
304 0xbf, 0xe2, 0xc4, 0x09,
305 0x20, 0x92, 0x65, 0x7a,
306 0x01, 0xe2, 0x88, 0x30,
307 0x00, 0xe2, 0xb8, 0x5b,
308 0xa0, 0x36, 0x6d, 0x62,
309 0x23, 0x92, 0x89, 0x08,
310 0x00, 0xe2, 0xb8, 0x5b,
311 0xa0, 0x36, 0x6d, 0x62,
312 0x00, 0xa8, 0x64, 0x42,
313 0xff, 0xe2, 0x64, 0x62,
314 0x00, 0xe2, 0x84, 0x42,
315 0x40, 0xea, 0x98, 0x00,
316 0x01, 0xe2, 0x88, 0x30,
317 0x00, 0xe2, 0xb8, 0x5b,
318 0xa0, 0x36, 0x43, 0x72,
319 0x40, 0xea, 0x98, 0x00,
320 0x01, 0x31, 0x89, 0x32,
321 0x08, 0xea, 0x62, 0x02,
322 0x00, 0xe2, 0xf8, 0x41,
323 0xe0, 0xea, 0xd4, 0x5b,
324 0x80, 0xe0, 0xc0, 0x6a,
325 0x04, 0xe0, 0x66, 0x73,
326 0x02, 0xe0, 0x96, 0x73,
327 0x00, 0xea, 0x1e, 0x73,
328 0x03, 0xe0, 0xa6, 0x73,
329 0x23, 0xe0, 0x96, 0x72,
330 0x08, 0xe0, 0xbc, 0x72,
331 0x00, 0xe2, 0xb8, 0x5b,
332 0x07, 0xea, 0x50, 0x59,
333 0x07, 0xea, 0x04, 0x00,
334 0x08, 0x42, 0xf9, 0x71,
335 0x04, 0x42, 0x93, 0x62,
336 0x01, 0x43, 0x89, 0x30,
337 0x00, 0xe2, 0x84, 0x42,
338 0x01, 0x44, 0xd4, 0x31,
339 0x00, 0xe2, 0x84, 0x42,
340 0x01, 0x00, 0x60, 0x32,
341 0x33, 0xea, 0x44, 0x59,
342 0x33, 0xea, 0x00, 0x00,
343 0x4c, 0x34, 0xc1, 0x28,
344 0x01, 0x64, 0xc0, 0x31,
345 0x00, 0x30, 0x45, 0x59,
346 0x01, 0x30, 0x01, 0x30,
347 0x01, 0xe0, 0xba, 0x7a,
348 0xa0, 0xea, 0xca, 0x5b,
349 0x01, 0xa0, 0xba, 0x62,
350 0x01, 0x84, 0xaf, 0x7a,
351 0x01, 0x95, 0xbd, 0x6a,
352 0x05, 0xea, 0x50, 0x59,
353 0x05, 0xea, 0x04, 0x00,
354 0x00, 0xe2, 0xbc, 0x42,
355 0x03, 0xea, 0x50, 0x59,
356 0x03, 0xea, 0x04, 0x00,
357 0x00, 0xe2, 0xbc, 0x42,
358 0x07, 0xea, 0xdc, 0x5b,
359 0x01, 0x44, 0xd4, 0x31,
360 0x00, 0xe2, 0xf8, 0x41,
361 0x3f, 0xe0, 0x6a, 0x0a,
362 0xc0, 0x34, 0xc1, 0x09,
363 0x00, 0x35, 0x51, 0x01,
364 0xff, 0xea, 0x52, 0x09,
365 0x30, 0x34, 0xc5, 0x09,
366 0x3d, 0xe2, 0xc4, 0x29,
367 0xb8, 0xe2, 0xc4, 0x19,
368 0x01, 0xea, 0xc6, 0x01,
369 0x02, 0xe2, 0xc8, 0x31,
370 0x02, 0xec, 0x40, 0x31,
371 0xff, 0xa1, 0xdc, 0x72,
372 0x02, 0xe8, 0xda, 0x31,
373 0x02, 0xa0, 0x50, 0x31,
374 0x00, 0xe2, 0xfe, 0x42,
375 0x80, 0x33, 0x67, 0x02,
376 0x01, 0x44, 0xd4, 0x31,
377 0x00, 0xe2, 0xb8, 0x5b,
378 0x01, 0x33, 0x67, 0x02,
379 0xe0, 0x36, 0x19, 0x63,
380 0x02, 0x33, 0x67, 0x02,
381 0x20, 0x46, 0x12, 0x63,
382 0xff, 0xea, 0x52, 0x09,
383 0xa8, 0xea, 0xca, 0x5b,
384 0x04, 0x92, 0xf9, 0x7a,
385 0x01, 0x34, 0xc1, 0x31,
386 0x00, 0x93, 0xf9, 0x62,
387 0x01, 0x35, 0xc1, 0x31,
388 0x00, 0x94, 0x03, 0x73,
389 0x01, 0xa9, 0x52, 0x11,
390 0xff, 0xa9, 0xee, 0x6a,
391 0x00, 0xe2, 0x12, 0x43,
392 0x10, 0x33, 0x67, 0x02,
393 0x04, 0x92, 0x13, 0x7b,
394 0xfb, 0x92, 0x25, 0x0b,
395 0xff, 0xea, 0x66, 0x0a,
396 0x01, 0xa4, 0x0d, 0x6b,
397 0x02, 0xa8, 0x90, 0x32,
398 0x00, 0xe2, 0x6a, 0x59,
399 0x10, 0x92, 0xbd, 0x7a,
400 0xff, 0xea, 0xdc, 0x5b,
401 0x00, 0xe2, 0xbc, 0x42,
402 0x04, 0xea, 0x50, 0x59,
403 0x04, 0xea, 0x04, 0x00,
404 0x00, 0xe2, 0xbc, 0x42,
405 0x04, 0xea, 0x50, 0x59,
406 0x04, 0xea, 0x04, 0x00,
407 0x00, 0xe2, 0xf8, 0x41,
408 0x08, 0x92, 0xb5, 0x7a,
409 0xc0, 0x33, 0x29, 0x7b,
410 0x80, 0x33, 0xb5, 0x6a,
411 0xff, 0x88, 0x29, 0x6b,
412 0x40, 0x33, 0xb5, 0x6a,
413 0x10, 0x92, 0x2f, 0x7b,
414 0x0a, 0xea, 0x50, 0x59,
415 0x0a, 0xea, 0x04, 0x00,
416 0x00, 0xe2, 0x4e, 0x5b,
417 0x00, 0xe2, 0x82, 0x43,
418 0x50, 0x4b, 0x36, 0x6b,
419 0xbf, 0x3a, 0x74, 0x08,
420 0x01, 0xe0, 0xf4, 0x31,
421 0xff, 0xea, 0xc0, 0x09,
422 0x01, 0x2e, 0x5d, 0x1a,
423 0x00, 0x2f, 0x5f, 0x22,
424 0x04, 0x47, 0x8f, 0x02,
425 0x01, 0xfa, 0xc0, 0x35,
426 0x02, 0xa8, 0x84, 0x32,
427 0x02, 0xea, 0xb4, 0x00,
428 0x33, 0xea, 0x44, 0x59,
429 0x33, 0xea, 0x00, 0x00,
430 0x02, 0x42, 0x51, 0x31,
431 0xff, 0x90, 0x65, 0x68,
432 0xff, 0x88, 0x5b, 0x6b,
433 0x01, 0xa4, 0x57, 0x6b,
434 0x02, 0xa4, 0x5f, 0x6b,
435 0x01, 0x84, 0x5f, 0x7b,
436 0x02, 0x28, 0x19, 0x33,
437 0x02, 0xa8, 0x50, 0x36,
438 0xff, 0x88, 0x5f, 0x73,
439 0x00, 0xe2, 0x32, 0x5b,
440 0x02, 0xa8, 0x20, 0x33,
441 0x02, 0x2c, 0x19, 0x33,
442 0x02, 0xa8, 0x58, 0x32,
443 0x04, 0xa4, 0x49, 0x07,
444 0xc0, 0x33, 0xb5, 0x6a,
445 0x04, 0x92, 0x25, 0x03,
446 0x20, 0x92, 0x83, 0x6b,
447 0x02, 0xa8, 0x40, 0x31,
448 0xc0, 0x34, 0xc1, 0x09,
449 0x00, 0x35, 0x51, 0x01,
450 0xff, 0xea, 0x52, 0x09,
451 0x30, 0x34, 0xc5, 0x09,
452 0x3d, 0xe2, 0xc4, 0x29,
453 0xb8, 0xe2, 0xc4, 0x19,
454 0x01, 0xea, 0xc6, 0x01,
455 0x02, 0xe2, 0xc8, 0x31,
456 0x02, 0xa0, 0xda, 0x31,
457 0x02, 0xa0, 0x50, 0x31,
458 0xf7, 0x57, 0xae, 0x08,
459 0x08, 0xea, 0x98, 0x00,
460 0x01, 0x44, 0xd4, 0x31,
461 0xee, 0x00, 0x8c, 0x6b,
462 0x02, 0xea, 0xb4, 0x00,
463 0x00, 0xe2, 0xb4, 0x5b,
464 0x09, 0x4c, 0x8e, 0x7b,
465 0x08, 0x4c, 0x06, 0x68,
466 0x0b, 0xea, 0x50, 0x59,
467 0x0b, 0xea, 0x04, 0x00,
468 0x01, 0x44, 0xd4, 0x31,
469 0x20, 0x33, 0xf9, 0x79,
470 0x00, 0xe2, 0x9e, 0x5b,
471 0x00, 0xe2, 0xf8, 0x41,
472 0x01, 0x84, 0xa3, 0x7b,
473 0x01, 0xa4, 0x49, 0x07,
474 0x08, 0x60, 0x30, 0x33,
475 0x08, 0x80, 0x41, 0x37,
476 0xdf, 0x33, 0x67, 0x0a,
477 0xee, 0x00, 0xb0, 0x6b,
478 0x05, 0xea, 0xb4, 0x00,
479 0x33, 0xea, 0x44, 0x59,
480 0x33, 0xea, 0x00, 0x00,
481 0x00, 0xe2, 0x6a, 0x59,
482 0x00, 0xe2, 0xbc, 0x42,
483 0x01, 0xea, 0x6c, 0x02,
484 0xc0, 0xea, 0x66, 0x06,
485 0xff, 0x42, 0xc4, 0x6b,
486 0x01, 0x41, 0xb8, 0x6b,
487 0x02, 0x41, 0xb8, 0x7b,
488 0xff, 0x42, 0xc4, 0x6b,
489 0x01, 0x41, 0xb8, 0x6b,
490 0x02, 0x41, 0xb8, 0x7b,
491 0xff, 0x42, 0xc4, 0x7b,
492 0x04, 0x4c, 0xb8, 0x6b,
493 0xe0, 0x41, 0x6c, 0x0e,
494 0x01, 0x44, 0xd4, 0x31,
495 0xff, 0x42, 0xcc, 0x7b,
496 0x04, 0x4c, 0xcc, 0x6b,
497 0xe0, 0x41, 0x6c, 0x0a,
498 0xe0, 0x36, 0xf9, 0x61,
499 0xff, 0xea, 0xca, 0x09,
500 0x01, 0xe2, 0xc8, 0x31,
501 0x01, 0x46, 0xda, 0x35,
502 0x01, 0x44, 0xd4, 0x35,
503 0x10, 0xea, 0x80, 0x00,
504 0x01, 0xe2, 0x62, 0x36,
505 0x04, 0xa6, 0xe4, 0x7b,
506 0xff, 0xea, 0x5a, 0x09,
507 0xff, 0xea, 0x4c, 0x0d,
508 0x01, 0xa6, 0x02, 0x6c,
509 0x10, 0xad, 0x64, 0x78,
510 0x80, 0xad, 0xfa, 0x6b,
511 0x08, 0xad, 0x64, 0x68,
512 0x04, 0x84, 0xf9, 0x30,
513 0x00, 0xea, 0x08, 0x81,
514 0xff, 0xea, 0xd4, 0x09,
515 0x02, 0x84, 0xf9, 0x88,
516 0x0d, 0xea, 0x5a, 0x01,
517 0x04, 0xa6, 0x4c, 0x05,
518 0x04, 0xa6, 0x64, 0x78,
519 0xff, 0xea, 0x5a, 0x09,
520 0x03, 0x84, 0x59, 0x89,
521 0x03, 0xea, 0x4c, 0x01,
522 0x80, 0x1a, 0x64, 0x78,
523 0x08, 0x19, 0x64, 0x78,
524 0x08, 0xb0, 0xe0, 0x30,
525 0x04, 0xb0, 0xe0, 0x30,
526 0x03, 0xb0, 0xf0, 0x30,
527 0x01, 0xb0, 0x06, 0x33,
528 0x7f, 0x83, 0xe9, 0x08,
529 0x04, 0xac, 0x58, 0x19,
530 0xff, 0xea, 0xc0, 0x09,
531 0x04, 0x84, 0x09, 0x9b,
532 0x00, 0x85, 0x0b, 0x23,
533 0x00, 0x86, 0x0d, 0x23,
534 0x00, 0x87, 0x0f, 0x23,
535 0x01, 0x84, 0xc5, 0x31,
536 0x80, 0x83, 0x25, 0x7c,
537 0x02, 0xe2, 0xc4, 0x01,
538 0xff, 0xea, 0x4c, 0x09,
539 0x01, 0xe2, 0x36, 0x30,
540 0xc8, 0x19, 0x32, 0x00,
541 0x88, 0x19, 0x32, 0x00,
542 0x01, 0xac, 0xd4, 0x99,
543 0x00, 0xe2, 0x64, 0x50,
544 0xfe, 0xa6, 0x4c, 0x0d,
545 0x0b, 0x98, 0xe1, 0x30,
546 0xfd, 0xa4, 0x49, 0x09,
547 0x80, 0xa3, 0x39, 0x7c,
548 0x02, 0xa4, 0x48, 0x01,
549 0x01, 0xa4, 0x36, 0x30,
550 0xa8, 0xea, 0x32, 0x00,
551 0xfd, 0xa4, 0x49, 0x0b,
552 0x05, 0xa3, 0x07, 0x33,
553 0x80, 0x83, 0x45, 0x6c,
554 0x02, 0xea, 0x4c, 0x05,
555 0xff, 0xea, 0x4c, 0x0d,
556 0x00, 0xe2, 0x3e, 0x59,
557 0x02, 0xa6, 0xe6, 0x6b,
558 0x80, 0xf9, 0xf2, 0x05,
559 0xc0, 0x33, 0x53, 0x7c,
560 0x03, 0xea, 0x50, 0x59,
561 0x03, 0xea, 0x04, 0x00,
562 0x20, 0x33, 0x77, 0x7c,
563 0x01, 0x84, 0x5d, 0x6c,
564 0x06, 0xea, 0x50, 0x59,
565 0x06, 0xea, 0x04, 0x00,
566 0x00, 0xe2, 0x7a, 0x44,
567 0x01, 0x00, 0x60, 0x32,
568 0xee, 0x00, 0x66, 0x6c,
569 0x05, 0xea, 0xb4, 0x00,
570 0x33, 0xea, 0x44, 0x59,
571 0x33, 0xea, 0x00, 0x00,
572 0x80, 0x3d, 0x7a, 0x00,
573 0xfc, 0x42, 0x68, 0x7c,
574 0x7f, 0x3d, 0x7a, 0x08,
575 0x00, 0x30, 0x45, 0x59,
576 0x01, 0x30, 0x01, 0x30,
577 0x09, 0xea, 0x50, 0x59,
578 0x09, 0xea, 0x04, 0x00,
579 0x00, 0xe2, 0xf8, 0x41,
580 0x01, 0xa4, 0x5d, 0x6c,
581 0x00, 0xe2, 0x30, 0x5c,
582 0x20, 0x33, 0x67, 0x02,
583 0x01, 0x00, 0x60, 0x32,
584 0x02, 0xa6, 0x82, 0x7c,
585 0x00, 0xe2, 0x46, 0x5c,
586 0x00, 0xe2, 0x56, 0x58,
587 0x00, 0xe2, 0x66, 0x58,
588 0x00, 0xe2, 0x3a, 0x58,
589 0x00, 0x30, 0x45, 0x59,
590 0x01, 0x30, 0x01, 0x30,
591 0x20, 0x19, 0x82, 0x6c,
592 0x00, 0xe2, 0xb2, 0x5c,
593 0x04, 0x19, 0x9c, 0x6c,
594 0x02, 0x19, 0x32, 0x00,
595 0x01, 0x84, 0x9d, 0x7c,
596 0x01, 0x1b, 0x96, 0x7c,
597 0x01, 0x1a, 0x9c, 0x6c,
598 0x00, 0xe2, 0x4c, 0x44,
599 0x80, 0x4b, 0xa2, 0x6c,
600 0x01, 0x4c, 0x9e, 0x7c,
601 0x03, 0x42, 0x4c, 0x6c,
602 0x00, 0xe2, 0xe0, 0x5b,
603 0x80, 0xf9, 0xf2, 0x01,
604 0x04, 0x33, 0xf9, 0x79,
605 0x00, 0xe2, 0xf8, 0x41,
606 0x08, 0x5d, 0xba, 0x6c,
607 0x00, 0xe2, 0x56, 0x58,
608 0x00, 0x30, 0x45, 0x59,
609 0x01, 0x30, 0x01, 0x30,
610 0x02, 0x1b, 0xaa, 0x7c,
611 0x08, 0x5d, 0xb8, 0x7c,
612 0x03, 0x68, 0x00, 0x37,
613 0x01, 0x84, 0x09, 0x07,
614 0x80, 0x1b, 0xc4, 0x7c,
615 0x80, 0x84, 0xc5, 0x6c,
616 0xff, 0x85, 0x0b, 0x1b,
617 0xff, 0x86, 0x0d, 0x23,
618 0xff, 0x87, 0x0f, 0x23,
619 0xf8, 0x1b, 0x08, 0x0b,
620 0xff, 0xea, 0x06, 0x0b,
621 0x03, 0x68, 0x00, 0x37,
622 0x00, 0xe2, 0xc4, 0x58,
623 0x10, 0xea, 0x18, 0x00,
624 0xf9, 0xd9, 0xb2, 0x0d,
625 0x01, 0xd9, 0xb2, 0x05,
626 0x01, 0x52, 0x48, 0x31,
627 0x20, 0xa4, 0xee, 0x7c,
628 0x20, 0x5b, 0xee, 0x7c,
629 0x80, 0xf9, 0xfc, 0x7c,
630 0x02, 0xea, 0xb4, 0x00,
631 0x11, 0x00, 0x00, 0x10,
632 0x04, 0x19, 0x08, 0x7d,
633 0xdf, 0x19, 0x32, 0x08,
634 0x60, 0x5b, 0xe6, 0x6c,
635 0x01, 0x4c, 0xe2, 0x7c,
636 0x20, 0x19, 0x32, 0x00,
637 0x01, 0xd9, 0xb2, 0x05,
638 0x02, 0xea, 0xb4, 0x00,
639 0x01, 0xd9, 0xb2, 0x05,
640 0x10, 0x5b, 0x00, 0x6d,
641 0x08, 0x5b, 0x0a, 0x6d,
642 0x20, 0x5b, 0xfa, 0x6c,
643 0x02, 0x5b, 0x2a, 0x6d,
644 0x0e, 0xea, 0x50, 0x59,
645 0x0e, 0xea, 0x04, 0x00,
646 0x80, 0xf9, 0xea, 0x6c,
647 0xdf, 0x5c, 0xb8, 0x08,
648 0x01, 0xd9, 0xb2, 0x05,
649 0x01, 0xa4, 0xe5, 0x6d,
650 0x00, 0xe2, 0x30, 0x5c,
651 0x00, 0xe2, 0x34, 0x5d,
652 0x01, 0x90, 0x21, 0x1b,
653 0x01, 0xd9, 0xb2, 0x05,
654 0x00, 0xe2, 0x32, 0x5b,
655 0xf3, 0x96, 0xd5, 0x19,
656 0x00, 0xe2, 0x18, 0x55,
657 0x80, 0x96, 0x19, 0x6d,
658 0x0f, 0xea, 0x50, 0x59,
659 0x0f, 0xea, 0x04, 0x00,
660 0x00, 0xe2, 0x20, 0x45,
661 0x04, 0x8c, 0xe1, 0x30,
662 0x01, 0xea, 0xf2, 0x00,
663 0x02, 0xea, 0x36, 0x00,
664 0xa8, 0xea, 0x32, 0x00,
665 0xff, 0x97, 0x27, 0x7d,
666 0x14, 0xea, 0x50, 0x59,
667 0x14, 0xea, 0x04, 0x00,
668 0x00, 0xe2, 0x96, 0x5d,
669 0x01, 0xd9, 0xb2, 0x05,
670 0x09, 0x80, 0xe1, 0x30,
671 0x02, 0xea, 0x36, 0x00,
672 0xa8, 0xea, 0x32, 0x00,
673 0x00, 0xe2, 0x8e, 0x5d,
674 0x01, 0xd9, 0xb2, 0x05,
675 0x02, 0xa6, 0x44, 0x7d,
676 0x00, 0xe2, 0x3e, 0x59,
677 0x20, 0x5b, 0x52, 0x6d,
678 0xfc, 0x42, 0x3e, 0x7d,
679 0x10, 0x40, 0x40, 0x6d,
680 0x20, 0x4d, 0x42, 0x7d,
681 0x08, 0x5d, 0x52, 0x6d,
682 0x02, 0xa6, 0xe6, 0x6b,
683 0x00, 0xe2, 0x3e, 0x59,
684 0x20, 0x5b, 0x52, 0x6d,
685 0x01, 0x1b, 0x72, 0x6d,
686 0xfc, 0x42, 0x4e, 0x7d,
687 0x10, 0x40, 0x50, 0x6d,
688 0x20, 0x4d, 0x64, 0x78,
689 0x08, 0x5d, 0x64, 0x78,
690 0x02, 0x19, 0x32, 0x00,
691 0x01, 0x5b, 0x40, 0x31,
692 0x00, 0xe2, 0xb2, 0x5c,
693 0x00, 0xe2, 0x9e, 0x5b,
694 0x20, 0xea, 0xb6, 0x00,
695 0x00, 0xe2, 0xe0, 0x5b,
696 0x20, 0x5c, 0xb8, 0x00,
697 0x04, 0x19, 0x68, 0x6d,
698 0x01, 0x1a, 0x68, 0x6d,
699 0x00, 0xe2, 0x3e, 0x59,
700 0x01, 0x1a, 0x64, 0x78,
701 0x80, 0xf9, 0xf2, 0x01,
702 0x20, 0xa0, 0xcc, 0x7d,
703 0xff, 0x90, 0x21, 0x1b,
704 0x08, 0x92, 0x43, 0x6b,
705 0x02, 0xea, 0xb4, 0x04,
706 0x01, 0xa4, 0x49, 0x03,
707 0x40, 0x5b, 0x82, 0x6d,
708 0x00, 0xe2, 0x3e, 0x59,
709 0x40, 0x5b, 0x82, 0x6d,
710 0x04, 0x5d, 0xe6, 0x7d,
711 0x01, 0x1a, 0xe6, 0x7d,
712 0x20, 0x4d, 0x64, 0x78,
713 0x40, 0x5b, 0xcc, 0x7d,
714 0x04, 0x5d, 0xe6, 0x7d,
715 0x01, 0x1a, 0xe6, 0x7d,
716 0x80, 0xf9, 0xf2, 0x01,
717 0xff, 0x90, 0x21, 0x1b,
718 0x08, 0x92, 0x43, 0x6b,
719 0x02, 0xea, 0xb4, 0x04,
720 0x00, 0xe2, 0x3e, 0x59,
721 0x01, 0x1b, 0x64, 0x78,
722 0x80, 0xf9, 0xf2, 0x01,
723 0x02, 0xea, 0xb4, 0x04,
724 0x00, 0xe2, 0x3e, 0x59,
725 0x01, 0x1b, 0xaa, 0x6d,
726 0x40, 0x5b, 0xb8, 0x7d,
727 0x01, 0x1b, 0xaa, 0x6d,
728 0x02, 0x19, 0x32, 0x00,
729 0x01, 0x1a, 0x64, 0x78,
730 0x80, 0xf9, 0xf2, 0x01,
731 0xff, 0xea, 0x10, 0x03,
732 0x08, 0x92, 0x25, 0x03,
733 0x00, 0xe2, 0x42, 0x43,
734 0x01, 0x1a, 0xb4, 0x7d,
735 0x40, 0x5b, 0xb0, 0x7d,
736 0x01, 0x1a, 0x9e, 0x6d,
737 0xfc, 0x42, 0x64, 0x78,
738 0x01, 0x1a, 0xb8, 0x6d,
739 0x10, 0xea, 0x50, 0x59,
740 0x10, 0xea, 0x04, 0x00,
741 0xfc, 0x42, 0x64, 0x78,
742 0x10, 0x40, 0xbe, 0x6d,
743 0x20, 0x4d, 0x64, 0x78,
744 0x40, 0x5b, 0x9e, 0x6d,
745 0x01, 0x1a, 0x64, 0x78,
746 0x01, 0x90, 0x21, 0x1b,
747 0x30, 0x3f, 0xc0, 0x09,
748 0x30, 0xe0, 0x64, 0x60,
749 0x40, 0x4b, 0x64, 0x68,
750 0xff, 0xea, 0x52, 0x01,
751 0xee, 0x00, 0xd2, 0x6d,
752 0x80, 0xf9, 0xf2, 0x01,
753 0xff, 0x90, 0x21, 0x1b,
754 0x02, 0xea, 0xb4, 0x00,
755 0x20, 0xea, 0x9a, 0x00,
756 0xf3, 0x42, 0xde, 0x6d,
757 0x12, 0xea, 0x50, 0x59,
758 0x12, 0xea, 0x04, 0x00,
759 0x00, 0xe2, 0xf8, 0x41,
760 0x0d, 0xea, 0x50, 0x59,
761 0x0d, 0xea, 0x04, 0x00,
762 0x00, 0xe2, 0xf8, 0x41,
763 0x01, 0x90, 0x21, 0x1b,
764 0x11, 0xea, 0x50, 0x59,
765 0x11, 0xea, 0x04, 0x00,
766 0x00, 0xe2, 0x32, 0x5b,
767 0x08, 0x5a, 0xb4, 0x00,
768 0x00, 0xe2, 0x0c, 0x5e,
769 0xa8, 0xea, 0x32, 0x00,
770 0x00, 0xe2, 0x3e, 0x59,
771 0x80, 0x1a, 0xfa, 0x7d,
772 0x00, 0xe2, 0x0c, 0x5e,
773 0x80, 0x19, 0x32, 0x00,
774 0x40, 0x5b, 0x00, 0x6e,
775 0x08, 0x5a, 0x00, 0x7e,
776 0x20, 0x4d, 0x64, 0x78,
777 0x02, 0x84, 0x09, 0x03,
778 0x40, 0x5b, 0xcc, 0x7d,
779 0xff, 0x90, 0x21, 0x1b,
780 0x80, 0xf9, 0xf2, 0x01,
781 0x08, 0x92, 0x43, 0x6b,
782 0x02, 0xea, 0xb4, 0x04,
783 0x01, 0x38, 0xe1, 0x30,
784 0x05, 0x39, 0xe3, 0x98,
785 0x01, 0xe0, 0xf4, 0x31,
786 0xff, 0xea, 0xc0, 0x09,
787 0x00, 0x3a, 0xe5, 0x20,
788 0x00, 0x3b, 0xe7, 0x20,
789 0x01, 0xfa, 0xc0, 0x31,
790 0x04, 0xea, 0xe8, 0x30,
791 0xff, 0xea, 0xf0, 0x08,
792 0x02, 0xea, 0xf2, 0x00,
793 0xff, 0xea, 0xf4, 0x0c
794 };
795
796 typedef int ahd_patch_func_t (struct ahd_softc *ahd);
797 static ahd_patch_func_t ahd_patch22_func;
798
799 static int
ahd_patch22_func(struct ahd_softc * ahd)800 ahd_patch22_func(struct ahd_softc *ahd)
801 {
802 return ((ahd->bugs & AHD_PKT_BITBUCKET_BUG) != 0);
803 }
804
805 static ahd_patch_func_t ahd_patch21_func;
806
807 static int
ahd_patch21_func(struct ahd_softc * ahd)808 ahd_patch21_func(struct ahd_softc *ahd)
809 {
810 return ((ahd->bugs & AHD_PKT_BITBUCKET_BUG) == 0);
811 }
812
813 static ahd_patch_func_t ahd_patch20_func;
814
815 static int
ahd_patch20_func(struct ahd_softc * ahd)816 ahd_patch20_func(struct ahd_softc *ahd)
817 {
818 return ((ahd->features & AHD_RTI) == 0);
819 }
820
821 static ahd_patch_func_t ahd_patch19_func;
822
823 static int
ahd_patch19_func(struct ahd_softc * ahd)824 ahd_patch19_func(struct ahd_softc *ahd)
825 {
826 return ((ahd->flags & AHD_INITIATORROLE) != 0);
827 }
828
829 static ahd_patch_func_t ahd_patch18_func;
830
831 static int
ahd_patch18_func(struct ahd_softc * ahd)832 ahd_patch18_func(struct ahd_softc *ahd)
833 {
834 return ((ahd->flags & AHD_TARGETROLE) != 0);
835 }
836
837 static ahd_patch_func_t ahd_patch17_func;
838
839 static int
ahd_patch17_func(struct ahd_softc * ahd)840 ahd_patch17_func(struct ahd_softc *ahd)
841 {
842 return ((ahd->bugs & AHD_AUTOFLUSH_BUG) != 0);
843 }
844
845 static ahd_patch_func_t ahd_patch16_func;
846
847 static int
ahd_patch16_func(struct ahd_softc * ahd)848 ahd_patch16_func(struct ahd_softc *ahd)
849 {
850 return ((ahd->features & AHD_NEW_DFCNTRL_OPTS) != 0);
851 }
852
853 static ahd_patch_func_t ahd_patch15_func;
854
855 static int
ahd_patch15_func(struct ahd_softc * ahd)856 ahd_patch15_func(struct ahd_softc *ahd)
857 {
858 return ((ahd->flags & AHD_39BIT_ADDRESSING) != 0);
859 }
860
861 static ahd_patch_func_t ahd_patch14_func;
862
863 static int
ahd_patch14_func(struct ahd_softc * ahd)864 ahd_patch14_func(struct ahd_softc *ahd)
865 {
866 return ((ahd->flags & AHD_64BIT_ADDRESSING) != 0);
867 }
868
869 static ahd_patch_func_t ahd_patch13_func;
870
871 static int
ahd_patch13_func(struct ahd_softc * ahd)872 ahd_patch13_func(struct ahd_softc *ahd)
873 {
874 return ((ahd->features & AHD_NEW_DFCNTRL_OPTS) == 0);
875 }
876
877 static ahd_patch_func_t ahd_patch12_func;
878
879 static int
ahd_patch12_func(struct ahd_softc * ahd)880 ahd_patch12_func(struct ahd_softc *ahd)
881 {
882 return ((ahd->bugs & AHD_REG_SLOW_SETTLE_BUG) != 0);
883 }
884
885 static ahd_patch_func_t ahd_patch11_func;
886
887 static int
ahd_patch11_func(struct ahd_softc * ahd)888 ahd_patch11_func(struct ahd_softc *ahd)
889 {
890 return ((ahd->bugs & AHD_EARLY_REQ_BUG) != 0);
891 }
892
893 static ahd_patch_func_t ahd_patch10_func;
894
895 static int
ahd_patch10_func(struct ahd_softc * ahd)896 ahd_patch10_func(struct ahd_softc *ahd)
897 {
898 return ((ahd->bugs & AHD_BUSFREEREV_BUG) == 0);
899 }
900
901 static ahd_patch_func_t ahd_patch9_func;
902
903 static int
ahd_patch9_func(struct ahd_softc * ahd)904 ahd_patch9_func(struct ahd_softc *ahd)
905 {
906 return ((ahd->flags & AHD_SEQUENCER_DEBUG) != 0);
907 }
908
909 static ahd_patch_func_t ahd_patch8_func;
910
911 static int
ahd_patch8_func(struct ahd_softc * ahd)912 ahd_patch8_func(struct ahd_softc *ahd)
913 {
914 return ((ahd->bugs & AHD_LQO_ATNO_BUG) != 0);
915 }
916
917 static ahd_patch_func_t ahd_patch7_func;
918
919 static int
ahd_patch7_func(struct ahd_softc * ahd)920 ahd_patch7_func(struct ahd_softc *ahd)
921 {
922 return ((ahd->bugs & AHD_BUSFREEREV_BUG) != 0);
923 }
924
925 static ahd_patch_func_t ahd_patch6_func;
926
927 static int
ahd_patch6_func(struct ahd_softc * ahd)928 ahd_patch6_func(struct ahd_softc *ahd)
929 {
930 return ((ahd->bugs & AHD_NONPACKFIFO_BUG) != 0);
931 }
932
933 static ahd_patch_func_t ahd_patch5_func;
934
935 static int
ahd_patch5_func(struct ahd_softc * ahd)936 ahd_patch5_func(struct ahd_softc *ahd)
937 {
938 return ((ahd->bugs & AHD_SENT_SCB_UPDATE_BUG) != 0);
939 }
940
941 static ahd_patch_func_t ahd_patch4_func;
942
943 static int
ahd_patch4_func(struct ahd_softc * ahd)944 ahd_patch4_func(struct ahd_softc *ahd)
945 {
946 return ((ahd->bugs & AHD_PKT_LUN_BUG) != 0);
947 }
948
949 static ahd_patch_func_t ahd_patch3_func;
950
951 static int
ahd_patch3_func(struct ahd_softc * ahd)952 ahd_patch3_func(struct ahd_softc *ahd)
953 {
954 return ((ahd->bugs & AHD_FAINT_LED_BUG) != 0);
955 }
956
957 static ahd_patch_func_t ahd_patch2_func;
958
959 static int
ahd_patch2_func(struct ahd_softc * ahd)960 ahd_patch2_func(struct ahd_softc *ahd)
961 {
962 return ((ahd->bugs & AHD_SET_MODE_BUG) != 0);
963 }
964
965 static ahd_patch_func_t ahd_patch1_func;
966
967 static int
ahd_patch1_func(struct ahd_softc * ahd)968 ahd_patch1_func(struct ahd_softc *ahd)
969 {
970 return ((ahd->bugs & AHD_INTCOLLISION_BUG) != 0);
971 }
972
973 static ahd_patch_func_t ahd_patch0_func;
974
975 static int
ahd_patch0_func(struct ahd_softc * ahd)976 ahd_patch0_func(struct ahd_softc *ahd)
977 {
978 return (0);
979 }
980
981 static struct patch {
982 ahd_patch_func_t *patch_func;
983 uint32_t begin :10,
984 skip_instr :10,
985 skip_patch :12;
986 } patches[] = {
987 { ahd_patch1_func, 0, 3, 3 },
988 { ahd_patch1_func, 1, 1, 2 },
989 { ahd_patch0_func, 2, 1, 1 },
990 { ahd_patch1_func, 3, 3, 3 },
991 { ahd_patch1_func, 4, 1, 2 },
992 { ahd_patch0_func, 5, 1, 1 },
993 { ahd_patch2_func, 6, 1, 2 },
994 { ahd_patch0_func, 7, 1, 1 },
995 { ahd_patch3_func, 20, 5, 1 },
996 { ahd_patch2_func, 29, 1, 2 },
997 { ahd_patch0_func, 30, 1, 1 },
998 { ahd_patch1_func, 37, 1, 2 },
999 { ahd_patch0_func, 38, 1, 1 },
1000 { ahd_patch2_func, 43, 1, 2 },
1001 { ahd_patch0_func, 44, 1, 1 },
1002 { ahd_patch2_func, 47, 1, 2 },
1003 { ahd_patch0_func, 48, 1, 1 },
1004 { ahd_patch2_func, 51, 1, 2 },
1005 { ahd_patch0_func, 52, 1, 1 },
1006 { ahd_patch2_func, 65, 1, 2 },
1007 { ahd_patch0_func, 66, 1, 1 },
1008 { ahd_patch2_func, 69, 1, 2 },
1009 { ahd_patch0_func, 70, 1, 1 },
1010 { ahd_patch1_func, 73, 1, 2 },
1011 { ahd_patch0_func, 74, 1, 1 },
1012 { ahd_patch4_func, 107, 1, 1 },
1013 { ahd_patch2_func, 162, 6, 1 },
1014 { ahd_patch1_func, 168, 2, 1 },
1015 { ahd_patch5_func, 170, 1, 1 },
1016 { ahd_patch2_func, 179, 1, 2 },
1017 { ahd_patch0_func, 180, 1, 1 },
1018 { ahd_patch6_func, 181, 2, 2 },
1019 { ahd_patch0_func, 183, 6, 3 },
1020 { ahd_patch2_func, 186, 1, 2 },
1021 { ahd_patch0_func, 187, 1, 1 },
1022 { ahd_patch2_func, 190, 1, 2 },
1023 { ahd_patch0_func, 191, 1, 1 },
1024 { ahd_patch7_func, 193, 2, 1 },
1025 { ahd_patch5_func, 201, 16, 2 },
1026 { ahd_patch0_func, 217, 1, 1 },
1027 { ahd_patch8_func, 237, 2, 1 },
1028 { ahd_patch1_func, 241, 1, 2 },
1029 { ahd_patch0_func, 242, 1, 1 },
1030 { ahd_patch7_func, 245, 2, 1 },
1031 { ahd_patch1_func, 259, 1, 2 },
1032 { ahd_patch0_func, 260, 1, 1 },
1033 { ahd_patch1_func, 263, 1, 2 },
1034 { ahd_patch0_func, 264, 1, 1 },
1035 { ahd_patch2_func, 267, 1, 2 },
1036 { ahd_patch0_func, 268, 1, 1 },
1037 { ahd_patch1_func, 323, 1, 2 },
1038 { ahd_patch0_func, 324, 1, 1 },
1039 { ahd_patch2_func, 332, 1, 2 },
1040 { ahd_patch0_func, 333, 1, 1 },
1041 { ahd_patch2_func, 336, 1, 2 },
1042 { ahd_patch0_func, 337, 1, 1 },
1043 { ahd_patch1_func, 343, 1, 2 },
1044 { ahd_patch0_func, 344, 1, 1 },
1045 { ahd_patch1_func, 346, 1, 2 },
1046 { ahd_patch0_func, 347, 1, 1 },
1047 { ahd_patch9_func, 366, 1, 1 },
1048 { ahd_patch9_func, 369, 1, 1 },
1049 { ahd_patch9_func, 371, 1, 1 },
1050 { ahd_patch9_func, 383, 1, 1 },
1051 { ahd_patch1_func, 393, 1, 2 },
1052 { ahd_patch0_func, 394, 1, 1 },
1053 { ahd_patch1_func, 396, 1, 2 },
1054 { ahd_patch0_func, 397, 1, 1 },
1055 { ahd_patch1_func, 405, 1, 2 },
1056 { ahd_patch0_func, 406, 1, 1 },
1057 { ahd_patch2_func, 419, 1, 2 },
1058 { ahd_patch0_func, 420, 1, 1 },
1059 { ahd_patch10_func, 450, 1, 1 },
1060 { ahd_patch1_func, 457, 1, 2 },
1061 { ahd_patch0_func, 458, 1, 1 },
1062 { ahd_patch2_func, 470, 1, 2 },
1063 { ahd_patch0_func, 471, 1, 1 },
1064 { ahd_patch11_func, 476, 6, 2 },
1065 { ahd_patch0_func, 482, 1, 1 },
1066 { ahd_patch12_func, 505, 1, 1 },
1067 { ahd_patch13_func, 514, 1, 1 },
1068 { ahd_patch14_func, 515, 1, 2 },
1069 { ahd_patch0_func, 516, 1, 1 },
1070 { ahd_patch15_func, 519, 1, 1 },
1071 { ahd_patch14_func, 520, 1, 1 },
1072 { ahd_patch16_func, 531, 1, 2 },
1073 { ahd_patch0_func, 532, 1, 1 },
1074 { ahd_patch1_func, 551, 1, 2 },
1075 { ahd_patch0_func, 552, 1, 1 },
1076 { ahd_patch1_func, 555, 1, 2 },
1077 { ahd_patch0_func, 556, 1, 1 },
1078 { ahd_patch2_func, 561, 1, 2 },
1079 { ahd_patch0_func, 562, 1, 1 },
1080 { ahd_patch2_func, 566, 1, 2 },
1081 { ahd_patch0_func, 567, 1, 1 },
1082 { ahd_patch1_func, 568, 1, 2 },
1083 { ahd_patch0_func, 569, 1, 1 },
1084 { ahd_patch2_func, 580, 1, 2 },
1085 { ahd_patch0_func, 581, 1, 1 },
1086 { ahd_patch17_func, 585, 1, 1 },
1087 { ahd_patch18_func, 590, 1, 1 },
1088 { ahd_patch19_func, 591, 2, 1 },
1089 { ahd_patch18_func, 595, 1, 2 },
1090 { ahd_patch0_func, 596, 1, 1 },
1091 { ahd_patch2_func, 599, 1, 2 },
1092 { ahd_patch0_func, 600, 1, 1 },
1093 { ahd_patch2_func, 615, 1, 2 },
1094 { ahd_patch0_func, 616, 1, 1 },
1095 { ahd_patch20_func, 617, 14, 1 },
1096 { ahd_patch1_func, 635, 1, 2 },
1097 { ahd_patch0_func, 636, 1, 1 },
1098 { ahd_patch20_func, 637, 1, 1 },
1099 { ahd_patch1_func, 649, 1, 2 },
1100 { ahd_patch0_func, 650, 1, 1 },
1101 { ahd_patch1_func, 657, 1, 2 },
1102 { ahd_patch0_func, 658, 1, 1 },
1103 { ahd_patch17_func, 681, 1, 1 },
1104 { ahd_patch17_func, 719, 1, 1 },
1105 { ahd_patch1_func, 730, 1, 2 },
1106 { ahd_patch0_func, 731, 1, 1 },
1107 { ahd_patch1_func, 748, 1, 2 },
1108 { ahd_patch0_func, 749, 1, 1 },
1109 { ahd_patch1_func, 751, 1, 2 },
1110 { ahd_patch0_func, 752, 1, 1 },
1111 { ahd_patch1_func, 755, 1, 2 },
1112 { ahd_patch0_func, 756, 1, 1 },
1113 { ahd_patch21_func, 758, 1, 2 },
1114 { ahd_patch0_func, 759, 2, 1 },
1115 { ahd_patch22_func, 762, 4, 2 },
1116 { ahd_patch0_func, 766, 1, 1 },
1117 { ahd_patch22_func, 774, 11, 1 }
1118 };
1119
1120 static struct cs {
1121 uint16_t begin;
1122 uint16_t end;
1123 } critical_sections[] = {
1124 { 11, 12 },
1125 { 13, 14 },
1126 { 29, 42 },
1127 { 56, 59 },
1128 { 101, 128 },
1129 { 129, 157 },
1130 { 159, 162 },
1131 { 170, 178 },
1132 { 201, 250 },
1133 { 681, 697 },
1134 { 697, 711 },
1135 { 721, 725 }
1136 };
1137
1138 static const int num_critical_sections = sizeof(critical_sections)
1139 / sizeof(*critical_sections);
1140