aac_pci.c revision 1.33.2.1 1 1.33.2.1 yamt /* $NetBSD: aac_pci.c,v 1.33.2.1 2012/10/30 17:21:22 yamt Exp $ */
2 1.1 ad
3 1.1 ad /*-
4 1.1 ad * Copyright (c) 2002 The NetBSD Foundation, Inc.
5 1.1 ad * All rights reserved.
6 1.1 ad *
7 1.1 ad * This code is derived from software contributed to The NetBSD Foundation
8 1.1 ad * by Andrew Doran.
9 1.1 ad *
10 1.1 ad * Redistribution and use in source and binary forms, with or without
11 1.1 ad * modification, are permitted provided that the following conditions
12 1.1 ad * are met:
13 1.1 ad * 1. Redistributions of source code must retain the above copyright
14 1.1 ad * notice, this list of conditions and the following disclaimer.
15 1.1 ad * 2. Redistributions in binary form must reproduce the above copyright
16 1.1 ad * notice, this list of conditions and the following disclaimer in the
17 1.1 ad * documentation and/or other materials provided with the distribution.
18 1.1 ad *
19 1.1 ad * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 1.1 ad * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 1.1 ad * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 1.1 ad * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 1.1 ad * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 1.1 ad * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 1.1 ad * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 1.1 ad * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 1.1 ad * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 1.1 ad * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 1.1 ad * POSSIBILITY OF SUCH DAMAGE.
30 1.1 ad */
31 1.1 ad
32 1.1 ad /*-
33 1.1 ad * Copyright (c) 2000 Michael Smith
34 1.1 ad * Copyright (c) 2000 BSDi
35 1.1 ad * Copyright (c) 2000 Niklas Hallqvist
36 1.1 ad * All rights reserved.
37 1.1 ad *
38 1.1 ad * Redistribution and use in source and binary forms, with or without
39 1.1 ad * modification, are permitted provided that the following conditions
40 1.1 ad * are met:
41 1.1 ad * 1. Redistributions of source code must retain the above copyright
42 1.1 ad * notice, this list of conditions and the following disclaimer.
43 1.1 ad * 2. Redistributions in binary form must reproduce the above copyright
44 1.1 ad * notice, this list of conditions and the following disclaimer in the
45 1.1 ad * documentation and/or other materials provided with the distribution.
46 1.1 ad *
47 1.1 ad * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
48 1.1 ad * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
49 1.1 ad * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
50 1.1 ad * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
51 1.1 ad * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
52 1.1 ad * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
53 1.1 ad * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
54 1.1 ad * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
55 1.1 ad * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
56 1.1 ad * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
57 1.1 ad * SUCH DAMAGE.
58 1.1 ad *
59 1.1 ad * from FreeBSD: aac_pci.c,v 1.1 2000/09/13 03:20:34 msmith Exp
60 1.1 ad * via OpenBSD: aac_pci.c,v 1.7 2002/03/14 01:26:58 millert Exp
61 1.1 ad */
62 1.1 ad
63 1.1 ad /*
64 1.1 ad * PCI front-end for the `aac' driver.
65 1.1 ad */
66 1.1 ad
67 1.1 ad #include <sys/cdefs.h>
68 1.33.2.1 yamt __KERNEL_RCSID(0, "$NetBSD: aac_pci.c,v 1.33.2.1 2012/10/30 17:21:22 yamt Exp $");
69 1.1 ad
70 1.1 ad #include <sys/param.h>
71 1.1 ad #include <sys/systm.h>
72 1.1 ad #include <sys/device.h>
73 1.1 ad #include <sys/kernel.h>
74 1.1 ad #include <sys/malloc.h>
75 1.1 ad #include <sys/queue.h>
76 1.1 ad
77 1.22 ad #include <sys/bus.h>
78 1.1 ad #include <machine/endian.h>
79 1.22 ad #include <sys/intr.h>
80 1.1 ad
81 1.1 ad #include <dev/pci/pcidevs.h>
82 1.1 ad #include <dev/pci/pcireg.h>
83 1.1 ad #include <dev/pci/pcivar.h>
84 1.1 ad
85 1.1 ad #include <dev/ic/aacreg.h>
86 1.1 ad #include <dev/ic/aacvar.h>
87 1.1 ad
88 1.21 briggs struct aac_pci_softc {
89 1.21 briggs struct aac_softc sc_aac;
90 1.21 briggs pci_chipset_tag_t sc_pc;
91 1.21 briggs pci_intr_handle_t sc_ih;
92 1.21 briggs };
93 1.21 briggs
94 1.11 perry /* i960Rx interface */
95 1.15 thorpej static int aac_rx_get_fwstatus(struct aac_softc *);
96 1.15 thorpej static void aac_rx_qnotify(struct aac_softc *, int);
97 1.15 thorpej static int aac_rx_get_istatus(struct aac_softc *);
98 1.15 thorpej static void aac_rx_clear_istatus(struct aac_softc *, int);
99 1.15 thorpej static void aac_rx_set_mailbox(struct aac_softc *, u_int32_t, u_int32_t,
100 1.1 ad u_int32_t, u_int32_t, u_int32_t);
101 1.15 thorpej static uint32_t aac_rx_get_mailbox(struct aac_softc *, int);
102 1.15 thorpej static void aac_rx_set_interrupts(struct aac_softc *, int);
103 1.21 briggs static int aac_rx_send_command(struct aac_softc *, struct aac_ccb *);
104 1.21 briggs static int aac_rx_get_outb_queue(struct aac_softc *);
105 1.21 briggs static void aac_rx_set_outb_queue(struct aac_softc *, int);
106 1.1 ad
107 1.1 ad /* StrongARM interface */
108 1.15 thorpej static int aac_sa_get_fwstatus(struct aac_softc *);
109 1.15 thorpej static void aac_sa_qnotify(struct aac_softc *, int);
110 1.15 thorpej static int aac_sa_get_istatus(struct aac_softc *);
111 1.15 thorpej static void aac_sa_clear_istatus(struct aac_softc *, int);
112 1.15 thorpej static void aac_sa_set_mailbox(struct aac_softc *, u_int32_t, u_int32_t,
113 1.1 ad u_int32_t, u_int32_t, u_int32_t);
114 1.15 thorpej static uint32_t aac_sa_get_mailbox(struct aac_softc *, int);
115 1.15 thorpej static void aac_sa_set_interrupts(struct aac_softc *, int);
116 1.1 ad
117 1.21 briggs /* Rocket/MIPS interface */
118 1.21 briggs static int aac_rkt_get_fwstatus(struct aac_softc *);
119 1.21 briggs static void aac_rkt_qnotify(struct aac_softc *, int);
120 1.21 briggs static int aac_rkt_get_istatus(struct aac_softc *);
121 1.21 briggs static void aac_rkt_clear_istatus(struct aac_softc *, int);
122 1.21 briggs static void aac_rkt_set_mailbox(struct aac_softc *, u_int32_t, u_int32_t,
123 1.21 briggs u_int32_t, u_int32_t, u_int32_t);
124 1.21 briggs static uint32_t aac_rkt_get_mailbox(struct aac_softc *, int);
125 1.21 briggs static void aac_rkt_set_interrupts(struct aac_softc *, int);
126 1.21 briggs static int aac_rkt_send_command(struct aac_softc *, struct aac_ccb *);
127 1.21 briggs static int aac_rkt_get_outb_queue(struct aac_softc *);
128 1.21 briggs static void aac_rkt_set_outb_queue(struct aac_softc *, int);
129 1.21 briggs
130 1.15 thorpej static const struct aac_interface aac_rx_interface = {
131 1.1 ad aac_rx_get_fwstatus,
132 1.1 ad aac_rx_qnotify,
133 1.1 ad aac_rx_get_istatus,
134 1.1 ad aac_rx_clear_istatus,
135 1.1 ad aac_rx_set_mailbox,
136 1.12 briggs aac_rx_get_mailbox,
137 1.21 briggs aac_rx_set_interrupts,
138 1.21 briggs aac_rx_send_command,
139 1.21 briggs aac_rx_get_outb_queue,
140 1.21 briggs aac_rx_set_outb_queue
141 1.1 ad };
142 1.1 ad
143 1.15 thorpej static const struct aac_interface aac_sa_interface = {
144 1.1 ad aac_sa_get_fwstatus,
145 1.1 ad aac_sa_qnotify,
146 1.1 ad aac_sa_get_istatus,
147 1.1 ad aac_sa_clear_istatus,
148 1.1 ad aac_sa_set_mailbox,
149 1.12 briggs aac_sa_get_mailbox,
150 1.21 briggs aac_sa_set_interrupts,
151 1.21 briggs NULL, NULL, NULL
152 1.21 briggs };
153 1.21 briggs
154 1.21 briggs static const struct aac_interface aac_rkt_interface = {
155 1.21 briggs aac_rkt_get_fwstatus,
156 1.21 briggs aac_rkt_qnotify,
157 1.21 briggs aac_rkt_get_istatus,
158 1.21 briggs aac_rkt_clear_istatus,
159 1.21 briggs aac_rkt_set_mailbox,
160 1.21 briggs aac_rkt_get_mailbox,
161 1.21 briggs aac_rkt_set_interrupts,
162 1.21 briggs aac_rkt_send_command,
163 1.21 briggs aac_rkt_get_outb_queue,
164 1.21 briggs aac_rkt_set_outb_queue
165 1.1 ad };
166 1.1 ad
167 1.17 christos static struct aac_ident {
168 1.1 ad u_short vendor;
169 1.1 ad u_short device;
170 1.1 ad u_short subvendor;
171 1.1 ad u_short subdevice;
172 1.1 ad u_short hwif;
173 1.1 ad u_short quirks;
174 1.1 ad const char *prodstr;
175 1.17 christos } const aac_ident[] = {
176 1.1 ad {
177 1.1 ad PCI_VENDOR_DELL,
178 1.1 ad PCI_PRODUCT_DELL_PERC_2SI,
179 1.1 ad PCI_VENDOR_DELL,
180 1.1 ad PCI_PRODUCT_DELL_PERC_2SI,
181 1.1 ad AAC_HWIF_I960RX,
182 1.1 ad 0,
183 1.1 ad "Dell PERC 2/Si"
184 1.1 ad },
185 1.1 ad {
186 1.1 ad PCI_VENDOR_DELL,
187 1.1 ad PCI_PRODUCT_DELL_PERC_3DI,
188 1.1 ad PCI_VENDOR_DELL,
189 1.1 ad PCI_PRODUCT_DELL_PERC_3DI,
190 1.1 ad AAC_HWIF_I960RX,
191 1.1 ad 0,
192 1.1 ad "Dell PERC 3/Di"
193 1.1 ad },
194 1.1 ad {
195 1.1 ad PCI_VENDOR_DELL,
196 1.1 ad PCI_PRODUCT_DELL_PERC_3DI,
197 1.1 ad PCI_VENDOR_DELL,
198 1.1 ad PCI_PRODUCT_DELL_PERC_3DI_SUB2,
199 1.1 ad AAC_HWIF_I960RX,
200 1.1 ad 0,
201 1.1 ad "Dell PERC 3/Di"
202 1.1 ad },
203 1.1 ad {
204 1.1 ad PCI_VENDOR_DELL,
205 1.1 ad PCI_PRODUCT_DELL_PERC_3DI,
206 1.1 ad PCI_VENDOR_DELL,
207 1.1 ad PCI_PRODUCT_DELL_PERC_3DI_SUB3,
208 1.1 ad AAC_HWIF_I960RX,
209 1.1 ad 0,
210 1.1 ad "Dell PERC 3/Di"
211 1.1 ad },
212 1.1 ad {
213 1.1 ad PCI_VENDOR_DELL,
214 1.1 ad PCI_PRODUCT_DELL_PERC_3DI_2,
215 1.1 ad PCI_VENDOR_DELL,
216 1.1 ad PCI_PRODUCT_DELL_PERC_3DI_2_SUB,
217 1.3 ad AAC_HWIF_I960RX,
218 1.3 ad 0,
219 1.3 ad "Dell PERC 3/Di"
220 1.3 ad },
221 1.3 ad {
222 1.3 ad PCI_VENDOR_DELL,
223 1.3 ad PCI_PRODUCT_DELL_PERC_3DI_3,
224 1.3 ad PCI_VENDOR_DELL,
225 1.3 ad PCI_PRODUCT_DELL_PERC_3DI_3_SUB,
226 1.3 ad AAC_HWIF_I960RX,
227 1.3 ad 0,
228 1.3 ad "Dell PERC 3/Di"
229 1.3 ad },
230 1.3 ad {
231 1.3 ad PCI_VENDOR_DELL,
232 1.3 ad PCI_PRODUCT_DELL_PERC_3DI_3,
233 1.3 ad PCI_VENDOR_DELL,
234 1.3 ad PCI_PRODUCT_DELL_PERC_3DI_3_SUB2,
235 1.3 ad AAC_HWIF_I960RX,
236 1.3 ad 0,
237 1.3 ad "Dell PERC 3/Di"
238 1.3 ad },
239 1.3 ad {
240 1.3 ad PCI_VENDOR_DELL,
241 1.3 ad PCI_PRODUCT_DELL_PERC_3DI_3,
242 1.3 ad PCI_VENDOR_DELL,
243 1.3 ad PCI_PRODUCT_DELL_PERC_3DI_3_SUB3,
244 1.1 ad AAC_HWIF_I960RX,
245 1.1 ad 0,
246 1.1 ad "Dell PERC 3/Di"
247 1.1 ad },
248 1.1 ad {
249 1.1 ad PCI_VENDOR_DELL,
250 1.1 ad PCI_PRODUCT_DELL_PERC_3SI,
251 1.1 ad PCI_VENDOR_DELL,
252 1.1 ad PCI_PRODUCT_DELL_PERC_3SI,
253 1.1 ad AAC_HWIF_I960RX,
254 1.1 ad 0,
255 1.1 ad "Dell PERC 3/Si"
256 1.1 ad },
257 1.1 ad {
258 1.1 ad PCI_VENDOR_DELL,
259 1.1 ad PCI_PRODUCT_DELL_PERC_3SI_2,
260 1.1 ad PCI_VENDOR_DELL,
261 1.1 ad PCI_PRODUCT_DELL_PERC_3SI_2_SUB,
262 1.1 ad AAC_HWIF_I960RX,
263 1.1 ad 0,
264 1.1 ad "Dell PERC 3/Si"
265 1.1 ad },
266 1.1 ad {
267 1.1 ad PCI_VENDOR_ADP2,
268 1.14 martti PCI_PRODUCT_ADP2_ASR2200S,
269 1.14 martti PCI_VENDOR_DELL,
270 1.14 martti PCI_PRODUCT_DELL_CERC_1_5,
271 1.14 martti AAC_HWIF_I960RX,
272 1.14 martti AAC_QUIRK_NO4GB,
273 1.14 martti "Dell CERC SATA RAID 1.5/6ch"
274 1.14 martti },
275 1.14 martti {
276 1.14 martti PCI_VENDOR_ADP2,
277 1.1 ad PCI_PRODUCT_ADP2_AAC2622,
278 1.1 ad PCI_VENDOR_ADP2,
279 1.1 ad PCI_PRODUCT_ADP2_AAC2622,
280 1.1 ad AAC_HWIF_I960RX,
281 1.1 ad 0,
282 1.1 ad "Adaptec ADP-2622"
283 1.1 ad },
284 1.1 ad {
285 1.1 ad PCI_VENDOR_ADP2,
286 1.1 ad PCI_PRODUCT_ADP2_ASR2200S,
287 1.1 ad PCI_VENDOR_ADP2,
288 1.8 gendalia PCI_PRODUCT_ADP2_ASR2200S_SUB2M,
289 1.8 gendalia AAC_HWIF_I960RX,
290 1.21 briggs AAC_QUIRK_NO4GB | AAC_QUIRK_256FIBS,
291 1.8 gendalia "Adaptec ASR-2200S"
292 1.8 gendalia },
293 1.8 gendalia {
294 1.8 gendalia PCI_VENDOR_ADP2,
295 1.8 gendalia PCI_PRODUCT_ADP2_ASR2200S,
296 1.8 gendalia PCI_VENDOR_DELL,
297 1.8 gendalia PCI_PRODUCT_ADP2_ASR2200S_SUB2M,
298 1.8 gendalia AAC_HWIF_I960RX,
299 1.21 briggs AAC_QUIRK_NO4GB | AAC_QUIRK_256FIBS,
300 1.8 gendalia "Dell PERC 320/DC"
301 1.8 gendalia },
302 1.8 gendalia {
303 1.8 gendalia PCI_VENDOR_ADP2,
304 1.8 gendalia PCI_PRODUCT_ADP2_ASR2200S,
305 1.8 gendalia PCI_VENDOR_ADP2,
306 1.1 ad PCI_PRODUCT_ADP2_ASR2200S,
307 1.1 ad AAC_HWIF_I960RX,
308 1.21 briggs AAC_QUIRK_NO4GB | AAC_QUIRK_256FIBS,
309 1.1 ad "Adaptec ASR-2200S"
310 1.1 ad },
311 1.1 ad {
312 1.1 ad PCI_VENDOR_ADP2,
313 1.1 ad PCI_PRODUCT_ADP2_ASR2200S,
314 1.1 ad PCI_VENDOR_ADP2,
315 1.10 gendalia PCI_PRODUCT_ADP2_AAR2810SA,
316 1.10 gendalia AAC_HWIF_I960RX,
317 1.21 briggs AAC_QUIRK_NO4GB,
318 1.10 gendalia "Adaptec AAR-2810SA"
319 1.10 gendalia },
320 1.10 gendalia {
321 1.10 gendalia PCI_VENDOR_ADP2,
322 1.10 gendalia PCI_PRODUCT_ADP2_ASR2200S,
323 1.10 gendalia PCI_VENDOR_ADP2,
324 1.1 ad PCI_PRODUCT_ADP2_ASR2120S,
325 1.1 ad AAC_HWIF_I960RX,
326 1.21 briggs AAC_QUIRK_NO4GB | AAC_QUIRK_256FIBS,
327 1.1 ad "Adaptec ASR-2120S"
328 1.1 ad },
329 1.1 ad {
330 1.9 jdolecek PCI_VENDOR_ADP2,
331 1.9 jdolecek PCI_PRODUCT_ADP2_ASR2200S,
332 1.9 jdolecek PCI_VENDOR_ADP2,
333 1.13 tron PCI_PRODUCT_ADP2_ASR2410SA,
334 1.9 jdolecek AAC_HWIF_I960RX,
335 1.21 briggs AAC_QUIRK_NO4GB,
336 1.9 jdolecek "Adaptec ASR-2410SA"
337 1.9 jdolecek },
338 1.9 jdolecek {
339 1.20 christos PCI_VENDOR_ADP2,
340 1.20 christos PCI_PRODUCT_ADP2_ASR2200S,
341 1.20 christos PCI_VENDOR_HP,
342 1.20 christos PCI_PRODUCT_ADP2_HP_M110_G2,
343 1.20 christos AAC_HWIF_I960RX,
344 1.21 briggs AAC_QUIRK_NO4GB,
345 1.20 christos "HP ML110 G2 (Adaptec ASR-2610SA)"
346 1.20 christos },
347 1.20 christos {
348 1.25 sborrill PCI_VENDOR_ADP2,
349 1.25 sborrill PCI_PRODUCT_ADP2_ASR2120S,
350 1.25 sborrill PCI_VENDOR_IBM,
351 1.25 sborrill PCI_PRODUCT_IBM_SERVERAID8K,
352 1.25 sborrill AAC_HWIF_RKT,
353 1.25 sborrill 0,
354 1.25 sborrill "IBM ServeRAID 8k"
355 1.25 sborrill },
356 1.32 jmcneill { PCI_VENDOR_ADP2,
357 1.32 jmcneill PCI_PRODUCT_ADP2_ASR2200S,
358 1.32 jmcneill PCI_VENDOR_ADP2,
359 1.33.2.1 yamt PCI_PRODUCT_ADP2_2405,
360 1.33.2.1 yamt AAC_HWIF_I960RX,
361 1.33.2.1 yamt 0,
362 1.33.2.1 yamt "Adaptec RAID 2405"
363 1.33.2.1 yamt },
364 1.33.2.1 yamt { PCI_VENDOR_ADP2,
365 1.33.2.1 yamt PCI_PRODUCT_ADP2_ASR2200S,
366 1.33.2.1 yamt PCI_VENDOR_ADP2,
367 1.32 jmcneill PCI_PRODUCT_ADP2_3405,
368 1.32 jmcneill AAC_HWIF_I960RX,
369 1.32 jmcneill 0,
370 1.32 jmcneill "Adaptec RAID 3405"
371 1.32 jmcneill },
372 1.33.2.1 yamt { PCI_VENDOR_ADP2,
373 1.33.2.1 yamt PCI_PRODUCT_ADP2_ASR2200S,
374 1.33.2.1 yamt PCI_VENDOR_ADP2,
375 1.33.2.1 yamt PCI_PRODUCT_ADP2_3805,
376 1.33.2.1 yamt AAC_HWIF_I960RX,
377 1.33.2.1 yamt 0,
378 1.33.2.1 yamt "Adaptec RAID 3805"
379 1.33.2.1 yamt },
380 1.25 sborrill {
381 1.1 ad PCI_VENDOR_DEC,
382 1.2 augustss PCI_PRODUCT_DEC_21554,
383 1.1 ad PCI_VENDOR_ADP2,
384 1.1 ad PCI_PRODUCT_ADP2_AAC364,
385 1.1 ad AAC_HWIF_STRONGARM,
386 1.1 ad 0,
387 1.1 ad "Adaptec AAC-364"
388 1.1 ad },
389 1.1 ad {
390 1.1 ad PCI_VENDOR_DEC,
391 1.2 augustss PCI_PRODUCT_DEC_21554,
392 1.1 ad PCI_VENDOR_ADP2,
393 1.1 ad PCI_PRODUCT_ADP2_ASR5400S,
394 1.1 ad AAC_HWIF_STRONGARM,
395 1.21 briggs AAC_QUIRK_BROKEN_MMAP,
396 1.1 ad "Adaptec ASR-5400S"
397 1.1 ad },
398 1.1 ad {
399 1.1 ad PCI_VENDOR_DEC,
400 1.2 augustss PCI_PRODUCT_DEC_21554,
401 1.1 ad PCI_VENDOR_ADP2,
402 1.1 ad PCI_PRODUCT_ADP2_PERC_2QC,
403 1.1 ad AAC_HWIF_STRONGARM,
404 1.1 ad AAC_QUIRK_PERC2QC,
405 1.1 ad "Dell PERC 2/QC"
406 1.1 ad },
407 1.1 ad {
408 1.1 ad PCI_VENDOR_DEC,
409 1.2 augustss PCI_PRODUCT_DEC_21554,
410 1.1 ad PCI_VENDOR_ADP2,
411 1.1 ad PCI_PRODUCT_ADP2_PERC_3QC,
412 1.1 ad AAC_HWIF_STRONGARM,
413 1.1 ad 0,
414 1.1 ad "Dell PERC 3/QC"
415 1.1 ad },
416 1.1 ad {
417 1.1 ad PCI_VENDOR_DEC,
418 1.2 augustss PCI_PRODUCT_DEC_21554,
419 1.1 ad PCI_VENDOR_HP,
420 1.1 ad PCI_PRODUCT_HP_NETRAID_4M,
421 1.1 ad AAC_HWIF_STRONGARM,
422 1.1 ad 0,
423 1.1 ad "HP NetRAID-4M"
424 1.1 ad },
425 1.33 is {
426 1.33 is PCI_VENDOR_ADP2,
427 1.33 is PCI_PRODUCT_ADP2_ASR2200S,
428 1.33 is PCI_VENDOR_SUN,
429 1.33 is PCI_PRODUCT_ADP2_ASR2120S,
430 1.31 is AAC_HWIF_I960RX,
431 1.31 is 0,
432 1.31 is "SG-XPCIESAS-R-IN"
433 1.31 is },
434 1.1 ad };
435 1.1 ad
436 1.15 thorpej static const struct aac_ident *
437 1.1 ad aac_find_ident(struct pci_attach_args *pa)
438 1.1 ad {
439 1.1 ad const struct aac_ident *m, *mm;
440 1.1 ad u_int32_t subsysid;
441 1.1 ad
442 1.1 ad m = aac_ident;
443 1.1 ad mm = aac_ident + (sizeof(aac_ident) / sizeof(aac_ident[0]));
444 1.1 ad
445 1.1 ad while (m < mm) {
446 1.1 ad if (m->vendor == PCI_VENDOR(pa->pa_id) &&
447 1.1 ad m->device == PCI_PRODUCT(pa->pa_id)) {
448 1.1 ad subsysid = pci_conf_read(pa->pa_pc, pa->pa_tag,
449 1.1 ad PCI_SUBSYS_ID_REG);
450 1.1 ad if (m->subvendor == PCI_VENDOR(subsysid) &&
451 1.1 ad m->subdevice == PCI_PRODUCT(subsysid))
452 1.1 ad return (m);
453 1.1 ad }
454 1.1 ad m++;
455 1.1 ad }
456 1.1 ad
457 1.1 ad return (NULL);
458 1.1 ad }
459 1.1 ad
460 1.15 thorpej static int
461 1.21 briggs aac_pci_intr_set(struct aac_softc *sc, int (*hand)(void*), void *arg)
462 1.21 briggs {
463 1.21 briggs struct aac_pci_softc *pcisc;
464 1.21 briggs
465 1.21 briggs pcisc = (struct aac_pci_softc *) sc;
466 1.21 briggs
467 1.21 briggs pci_intr_disestablish(pcisc->sc_pc, sc->sc_ih);
468 1.21 briggs sc->sc_ih = pci_intr_establish(pcisc->sc_pc, pcisc->sc_ih,
469 1.21 briggs IPL_BIO, hand, arg);
470 1.21 briggs if (sc->sc_ih == NULL) {
471 1.21 briggs return ENXIO;
472 1.21 briggs }
473 1.21 briggs return 0;
474 1.21 briggs }
475 1.21 briggs
476 1.21 briggs static int
477 1.28 cegger aac_pci_match(device_t parent, cfdata_t match, void *aux)
478 1.1 ad {
479 1.1 ad struct pci_attach_args *pa;
480 1.1 ad
481 1.1 ad pa = aux;
482 1.1 ad
483 1.1 ad if (PCI_CLASS(pa->pa_class) == PCI_CLASS_I2O)
484 1.1 ad return (0);
485 1.1 ad
486 1.1 ad return (aac_find_ident(pa) != NULL);
487 1.1 ad }
488 1.1 ad
489 1.15 thorpej static void
490 1.28 cegger aac_pci_attach(device_t parent, device_t self, void *aux)
491 1.1 ad {
492 1.1 ad struct pci_attach_args *pa;
493 1.1 ad pci_chipset_tag_t pc;
494 1.21 briggs struct aac_pci_softc *pcisc;
495 1.1 ad struct aac_softc *sc;
496 1.1 ad u_int16_t command;
497 1.1 ad bus_addr_t membase;
498 1.1 ad bus_size_t memsize;
499 1.1 ad const char *intrstr;
500 1.1 ad int state;
501 1.1 ad const struct aac_ident *m;
502 1.1 ad
503 1.1 ad pa = aux;
504 1.1 ad pc = pa->pa_pc;
505 1.29 cegger pcisc = device_private(self);
506 1.21 briggs pcisc->sc_pc = pc;
507 1.21 briggs sc = &pcisc->sc_aac;
508 1.33.2.1 yamt sc->sc_dv = self;
509 1.1 ad state = 0;
510 1.1 ad
511 1.7 thorpej aprint_naive(": RAID controller\n");
512 1.7 thorpej aprint_normal(": ");
513 1.1 ad
514 1.1 ad /*
515 1.1 ad * Verify that the adapter is correctly set up in PCI space.
516 1.1 ad */
517 1.1 ad command = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
518 1.1 ad command |= PCI_COMMAND_MASTER_ENABLE;
519 1.1 ad pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, command);
520 1.1 ad command = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
521 1.1 ad AAC_DPRINTF(AAC_D_MISC, ("pci command status reg 0x08x "));
522 1.1 ad
523 1.1 ad if ((command & PCI_COMMAND_MASTER_ENABLE) == 0) {
524 1.7 thorpej aprint_error("can't enable bus-master feature\n");
525 1.1 ad goto bail_out;
526 1.1 ad }
527 1.1 ad
528 1.1 ad if ((command & PCI_COMMAND_MEM_ENABLE) == 0) {
529 1.7 thorpej aprint_error("memory window not available\n");
530 1.1 ad goto bail_out;
531 1.1 ad }
532 1.1 ad
533 1.1 ad /*
534 1.1 ad * Map control/status registers.
535 1.1 ad */
536 1.1 ad if (pci_mapreg_map(pa, PCI_MAPREG_START,
537 1.1 ad PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0, &sc->sc_memt,
538 1.1 ad &sc->sc_memh, &membase, &memsize)) {
539 1.7 thorpej aprint_error("can't find mem space\n");
540 1.1 ad goto bail_out;
541 1.1 ad }
542 1.1 ad state++;
543 1.1 ad
544 1.21 briggs if (pci_intr_map(pa, &pcisc->sc_ih)) {
545 1.7 thorpej aprint_error("couldn't map interrupt\n");
546 1.1 ad goto bail_out;
547 1.1 ad }
548 1.21 briggs intrstr = pci_intr_string(pc, pcisc->sc_ih);
549 1.21 briggs sc->sc_ih = pci_intr_establish(pc, pcisc->sc_ih, IPL_BIO, aac_intr, sc);
550 1.1 ad if (sc->sc_ih == NULL) {
551 1.7 thorpej aprint_error("couldn't establish interrupt");
552 1.1 ad if (intrstr != NULL)
553 1.30 njoly aprint_error(" at %s", intrstr);
554 1.30 njoly aprint_error("\n");
555 1.1 ad goto bail_out;
556 1.1 ad }
557 1.1 ad state++;
558 1.1 ad
559 1.1 ad sc->sc_dmat = pa->pa_dmat;
560 1.1 ad
561 1.1 ad m = aac_find_ident(pa);
562 1.7 thorpej aprint_normal("%s\n", m->prodstr);
563 1.1 ad if (intrstr != NULL)
564 1.33.2.1 yamt aprint_normal_dev(self, "interrupting at %s\n",
565 1.23 cegger intrstr);
566 1.1 ad
567 1.1 ad sc->sc_hwif = m->hwif;
568 1.1 ad sc->sc_quirks = m->quirks;
569 1.1 ad switch (sc->sc_hwif) {
570 1.1 ad case AAC_HWIF_I960RX:
571 1.1 ad AAC_DPRINTF(AAC_D_MISC,
572 1.1 ad ("set hardware up for i960Rx"));
573 1.1 ad sc->sc_if = aac_rx_interface;
574 1.1 ad break;
575 1.1 ad
576 1.1 ad case AAC_HWIF_STRONGARM:
577 1.1 ad AAC_DPRINTF(AAC_D_MISC,
578 1.1 ad ("set hardware up for StrongARM"));
579 1.1 ad sc->sc_if = aac_sa_interface;
580 1.1 ad break;
581 1.21 briggs
582 1.21 briggs case AAC_HWIF_RKT:
583 1.21 briggs AAC_DPRINTF(AAC_D_MISC,
584 1.21 briggs ("set hardware up for MIPS/Rocket"));
585 1.21 briggs sc->sc_if = aac_rkt_interface;
586 1.21 briggs break;
587 1.1 ad }
588 1.21 briggs sc->sc_regsize = memsize;
589 1.21 briggs sc->sc_intr_set = aac_pci_intr_set;
590 1.1 ad
591 1.1 ad if (!aac_attach(sc))
592 1.1 ad return;
593 1.1 ad
594 1.1 ad bail_out:
595 1.1 ad if (state > 1)
596 1.1 ad pci_intr_disestablish(pc, sc->sc_ih);
597 1.1 ad if (state > 0)
598 1.1 ad bus_space_unmap(sc->sc_memt, sc->sc_memh, memsize);
599 1.1 ad }
600 1.1 ad
601 1.33.2.1 yamt CFATTACH_DECL_NEW(aac_pci, sizeof(struct aac_pci_softc),
602 1.15 thorpej aac_pci_match, aac_pci_attach, NULL, NULL);
603 1.15 thorpej
604 1.1 ad /*
605 1.1 ad * Read the current firmware status word.
606 1.1 ad */
607 1.15 thorpej static int
608 1.1 ad aac_sa_get_fwstatus(struct aac_softc *sc)
609 1.1 ad {
610 1.1 ad
611 1.1 ad return (AAC_GETREG4(sc, AAC_SA_FWSTATUS));
612 1.1 ad }
613 1.1 ad
614 1.15 thorpej static int
615 1.1 ad aac_rx_get_fwstatus(struct aac_softc *sc)
616 1.1 ad {
617 1.1 ad
618 1.1 ad return (AAC_GETREG4(sc, AAC_RX_FWSTATUS));
619 1.1 ad }
620 1.1 ad
621 1.21 briggs static int
622 1.21 briggs aac_rkt_get_fwstatus(struct aac_softc *sc)
623 1.21 briggs {
624 1.21 briggs
625 1.21 briggs return (AAC_GETREG4(sc, AAC_RKT_FWSTATUS));
626 1.21 briggs }
627 1.21 briggs
628 1.1 ad /*
629 1.1 ad * Notify the controller of a change in a given queue
630 1.1 ad */
631 1.1 ad
632 1.15 thorpej static void
633 1.1 ad aac_sa_qnotify(struct aac_softc *sc, int qbit)
634 1.1 ad {
635 1.1 ad
636 1.1 ad AAC_SETREG2(sc, AAC_SA_DOORBELL1_SET, qbit);
637 1.1 ad }
638 1.1 ad
639 1.15 thorpej static void
640 1.1 ad aac_rx_qnotify(struct aac_softc *sc, int qbit)
641 1.1 ad {
642 1.1 ad
643 1.1 ad AAC_SETREG4(sc, AAC_RX_IDBR, qbit);
644 1.1 ad }
645 1.1 ad
646 1.21 briggs static void
647 1.21 briggs aac_rkt_qnotify(struct aac_softc *sc, int qbit)
648 1.21 briggs {
649 1.21 briggs
650 1.21 briggs AAC_SETREG4(sc, AAC_RKT_IDBR, qbit);
651 1.21 briggs }
652 1.21 briggs
653 1.1 ad /*
654 1.1 ad * Get the interrupt reason bits
655 1.1 ad */
656 1.15 thorpej static int
657 1.1 ad aac_sa_get_istatus(struct aac_softc *sc)
658 1.1 ad {
659 1.1 ad
660 1.1 ad return (AAC_GETREG2(sc, AAC_SA_DOORBELL0));
661 1.1 ad }
662 1.1 ad
663 1.15 thorpej static int
664 1.1 ad aac_rx_get_istatus(struct aac_softc *sc)
665 1.1 ad {
666 1.1 ad
667 1.1 ad return (AAC_GETREG4(sc, AAC_RX_ODBR));
668 1.1 ad }
669 1.1 ad
670 1.21 briggs static int
671 1.21 briggs aac_rkt_get_istatus(struct aac_softc *sc)
672 1.21 briggs {
673 1.21 briggs
674 1.21 briggs return (AAC_GETREG4(sc, AAC_RKT_ODBR));
675 1.21 briggs }
676 1.21 briggs
677 1.1 ad /*
678 1.1 ad * Clear some interrupt reason bits
679 1.1 ad */
680 1.15 thorpej static void
681 1.1 ad aac_sa_clear_istatus(struct aac_softc *sc, int mask)
682 1.1 ad {
683 1.1 ad
684 1.1 ad AAC_SETREG2(sc, AAC_SA_DOORBELL0_CLEAR, mask);
685 1.1 ad }
686 1.1 ad
687 1.15 thorpej static void
688 1.1 ad aac_rx_clear_istatus(struct aac_softc *sc, int mask)
689 1.1 ad {
690 1.1 ad
691 1.1 ad AAC_SETREG4(sc, AAC_RX_ODBR, mask);
692 1.1 ad }
693 1.1 ad
694 1.21 briggs static void
695 1.21 briggs aac_rkt_clear_istatus(struct aac_softc *sc, int mask)
696 1.21 briggs {
697 1.21 briggs
698 1.21 briggs AAC_SETREG4(sc, AAC_RKT_ODBR, mask);
699 1.21 briggs }
700 1.21 briggs
701 1.1 ad /*
702 1.1 ad * Populate the mailbox and set the command word
703 1.1 ad */
704 1.15 thorpej static void
705 1.1 ad aac_sa_set_mailbox(struct aac_softc *sc, u_int32_t command,
706 1.1 ad u_int32_t arg0, u_int32_t arg1, u_int32_t arg2,
707 1.1 ad u_int32_t arg3)
708 1.1 ad {
709 1.1 ad
710 1.1 ad AAC_SETREG4(sc, AAC_SA_MAILBOX, command);
711 1.1 ad AAC_SETREG4(sc, AAC_SA_MAILBOX + 4, arg0);
712 1.1 ad AAC_SETREG4(sc, AAC_SA_MAILBOX + 8, arg1);
713 1.1 ad AAC_SETREG4(sc, AAC_SA_MAILBOX + 12, arg2);
714 1.1 ad AAC_SETREG4(sc, AAC_SA_MAILBOX + 16, arg3);
715 1.1 ad }
716 1.1 ad
717 1.15 thorpej static void
718 1.1 ad aac_rx_set_mailbox(struct aac_softc *sc, u_int32_t command,
719 1.1 ad u_int32_t arg0, u_int32_t arg1, u_int32_t arg2,
720 1.1 ad u_int32_t arg3)
721 1.1 ad {
722 1.1 ad
723 1.1 ad AAC_SETREG4(sc, AAC_RX_MAILBOX, command);
724 1.1 ad AAC_SETREG4(sc, AAC_RX_MAILBOX + 4, arg0);
725 1.1 ad AAC_SETREG4(sc, AAC_RX_MAILBOX + 8, arg1);
726 1.1 ad AAC_SETREG4(sc, AAC_RX_MAILBOX + 12, arg2);
727 1.1 ad AAC_SETREG4(sc, AAC_RX_MAILBOX + 16, arg3);
728 1.1 ad }
729 1.1 ad
730 1.21 briggs static void
731 1.21 briggs aac_rkt_set_mailbox(struct aac_softc *sc, u_int32_t command,
732 1.21 briggs u_int32_t arg0, u_int32_t arg1, u_int32_t arg2,
733 1.21 briggs u_int32_t arg3)
734 1.21 briggs {
735 1.21 briggs
736 1.21 briggs AAC_SETREG4(sc, AAC_RKT_MAILBOX, command);
737 1.21 briggs AAC_SETREG4(sc, AAC_RKT_MAILBOX + 4, arg0);
738 1.21 briggs AAC_SETREG4(sc, AAC_RKT_MAILBOX + 8, arg1);
739 1.21 briggs AAC_SETREG4(sc, AAC_RKT_MAILBOX + 12, arg2);
740 1.21 briggs AAC_SETREG4(sc, AAC_RKT_MAILBOX + 16, arg3);
741 1.21 briggs }
742 1.21 briggs
743 1.1 ad /*
744 1.12 briggs * Fetch the specified mailbox
745 1.1 ad */
746 1.15 thorpej static uint32_t
747 1.12 briggs aac_sa_get_mailbox(struct aac_softc *sc, int mb)
748 1.1 ad {
749 1.1 ad
750 1.12 briggs return (AAC_GETREG4(sc, AAC_SA_MAILBOX + (mb * 4)));
751 1.1 ad }
752 1.1 ad
753 1.15 thorpej static uint32_t
754 1.12 briggs aac_rx_get_mailbox(struct aac_softc *sc, int mb)
755 1.1 ad {
756 1.1 ad
757 1.12 briggs return (AAC_GETREG4(sc, AAC_RX_MAILBOX + (mb * 4)));
758 1.1 ad }
759 1.1 ad
760 1.21 briggs static uint32_t
761 1.21 briggs aac_rkt_get_mailbox(struct aac_softc *sc, int mb)
762 1.21 briggs {
763 1.21 briggs
764 1.21 briggs return (AAC_GETREG4(sc, AAC_RKT_MAILBOX + (mb * 4)));
765 1.21 briggs }
766 1.21 briggs
767 1.1 ad /*
768 1.1 ad * Set/clear interrupt masks
769 1.1 ad */
770 1.15 thorpej static void
771 1.1 ad aac_sa_set_interrupts(struct aac_softc *sc, int enable)
772 1.1 ad {
773 1.1 ad
774 1.1 ad if (enable)
775 1.1 ad AAC_SETREG2((sc), AAC_SA_MASK0_CLEAR, AAC_DB_INTERRUPTS);
776 1.1 ad else
777 1.1 ad AAC_SETREG2((sc), AAC_SA_MASK0_SET, ~0);
778 1.1 ad }
779 1.1 ad
780 1.15 thorpej static void
781 1.1 ad aac_rx_set_interrupts(struct aac_softc *sc, int enable)
782 1.1 ad {
783 1.1 ad
784 1.21 briggs if (enable) {
785 1.21 briggs if (sc->sc_quirks & AAC_QUIRK_NEW_COMM)
786 1.21 briggs AAC_SETREG4(sc, AAC_RX_OIMR, ~AAC_DB_INT_NEW_COMM);
787 1.21 briggs else
788 1.21 briggs AAC_SETREG4(sc, AAC_RX_OIMR, ~AAC_DB_INTERRUPTS);
789 1.21 briggs } else {
790 1.1 ad AAC_SETREG4(sc, AAC_RX_OIMR, ~0);
791 1.21 briggs }
792 1.21 briggs }
793 1.21 briggs
794 1.21 briggs static void
795 1.21 briggs aac_rkt_set_interrupts(struct aac_softc *sc, int enable)
796 1.21 briggs {
797 1.21 briggs
798 1.21 briggs if (enable) {
799 1.21 briggs if (sc->sc_quirks & AAC_QUIRK_NEW_COMM)
800 1.21 briggs AAC_SETREG4(sc, AAC_RKT_OIMR, ~AAC_DB_INT_NEW_COMM);
801 1.21 briggs else
802 1.21 briggs AAC_SETREG4(sc, AAC_RKT_OIMR, ~AAC_DB_INTERRUPTS);
803 1.21 briggs } else {
804 1.21 briggs AAC_SETREG4(sc, AAC_RKT_OIMR, ~0);
805 1.21 briggs }
806 1.21 briggs }
807 1.21 briggs
808 1.21 briggs /*
809 1.21 briggs * New comm. interface: Send command functions
810 1.21 briggs */
811 1.21 briggs static int
812 1.21 briggs aac_rx_send_command(struct aac_softc *sc, struct aac_ccb *ac)
813 1.21 briggs {
814 1.21 briggs u_int32_t index, device;
815 1.21 briggs
816 1.21 briggs index = AAC_GETREG4(sc, AAC_RX_IQUE);
817 1.21 briggs if (index == 0xffffffffL)
818 1.21 briggs index = AAC_GETREG4(sc, AAC_RX_IQUE);
819 1.21 briggs if (index == 0xffffffffL)
820 1.21 briggs return index;
821 1.21 briggs #ifdef notyet
822 1.21 briggs aac_enqueue_busy(ac);
823 1.21 briggs #endif
824 1.21 briggs device = index;
825 1.21 briggs AAC_SETREG4(sc, device,
826 1.21 briggs htole32((u_int32_t)(ac->ac_fibphys & 0xffffffffUL)));
827 1.21 briggs device += 4;
828 1.21 briggs if (sizeof(bus_addr_t) > 4) {
829 1.21 briggs AAC_SETREG4(sc, device,
830 1.21 briggs htole32((u_int32_t)((u_int64_t)ac->ac_fibphys >> 32)));
831 1.21 briggs } else {
832 1.21 briggs AAC_SETREG4(sc, device, 0);
833 1.21 briggs }
834 1.21 briggs device += 4;
835 1.21 briggs AAC_SETREG4(sc, device, ac->ac_fib->Header.Size);
836 1.21 briggs AAC_SETREG4(sc, AAC_RX_IQUE, index);
837 1.21 briggs return 0;
838 1.21 briggs }
839 1.21 briggs
840 1.21 briggs static int
841 1.21 briggs aac_rkt_send_command(struct aac_softc *sc, struct aac_ccb *ac)
842 1.21 briggs {
843 1.21 briggs u_int32_t index, device;
844 1.21 briggs
845 1.21 briggs index = AAC_GETREG4(sc, AAC_RKT_IQUE);
846 1.21 briggs if (index == 0xffffffffL)
847 1.21 briggs index = AAC_GETREG4(sc, AAC_RKT_IQUE);
848 1.21 briggs if (index == 0xffffffffL)
849 1.21 briggs return index;
850 1.21 briggs #ifdef notyet
851 1.21 briggs aac_enqueue_busy(ac);
852 1.21 briggs #endif
853 1.21 briggs device = index;
854 1.21 briggs AAC_SETREG4(sc, device,
855 1.21 briggs htole32((u_int32_t)(ac->ac_fibphys & 0xffffffffUL)));
856 1.21 briggs device += 4;
857 1.21 briggs if (sizeof(bus_addr_t) > 4) {
858 1.21 briggs AAC_SETREG4(sc, device,
859 1.21 briggs htole32((u_int32_t)((u_int64_t)ac->ac_fibphys >> 32)));
860 1.21 briggs } else {
861 1.21 briggs AAC_SETREG4(sc, device, 0);
862 1.21 briggs }
863 1.21 briggs device += 4;
864 1.21 briggs AAC_SETREG4(sc, device, ac->ac_fib->Header.Size);
865 1.21 briggs AAC_SETREG4(sc, AAC_RKT_IQUE, index);
866 1.21 briggs return 0;
867 1.21 briggs }
868 1.21 briggs
869 1.21 briggs /*
870 1.21 briggs * New comm. interface: get, set outbound queue index
871 1.21 briggs */
872 1.21 briggs static int
873 1.21 briggs aac_rx_get_outb_queue(struct aac_softc *sc)
874 1.21 briggs {
875 1.21 briggs
876 1.21 briggs return AAC_GETREG4(sc, AAC_RX_OQUE);
877 1.21 briggs }
878 1.21 briggs
879 1.21 briggs static int
880 1.21 briggs aac_rkt_get_outb_queue(struct aac_softc *sc)
881 1.21 briggs {
882 1.21 briggs
883 1.21 briggs return AAC_GETREG4(sc, AAC_RKT_OQUE);
884 1.21 briggs }
885 1.21 briggs
886 1.21 briggs static void
887 1.21 briggs aac_rx_set_outb_queue(struct aac_softc *sc, int index)
888 1.21 briggs {
889 1.21 briggs
890 1.21 briggs AAC_SETREG4(sc, AAC_RX_OQUE, index);
891 1.21 briggs }
892 1.21 briggs
893 1.21 briggs static void
894 1.21 briggs aac_rkt_set_outb_queue(struct aac_softc *sc, int index)
895 1.21 briggs {
896 1.21 briggs
897 1.21 briggs AAC_SETREG4(sc, AAC_RKT_OQUE, index);
898 1.1 ad }
899