1 /* $NetBSD: aac_pci.c,v 1.29 2009/05/12 08:22:59 cegger Exp $ */
4 * Copyright (c) 2002 The NetBSD Foundation, Inc.
7 * This code is derived from software contributed to The NetBSD Foundation
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
33 * Copyright (c) 2000 Michael Smith
34 * Copyright (c) 2000 BSDi
35 * Copyright (c) 2000 Niklas Hallqvist
36 * All rights reserved.
38 * Redistribution and use in source and binary forms, with or without
39 * modification, are permitted provided that the following conditions
41 * 1. Redistributions of source code must retain the above copyright
42 * notice, this list of conditions and the following disclaimer.
43 * 2. Redistributions in binary form must reproduce the above copyright
44 * notice, this list of conditions and the following disclaimer in the
45 * documentation and/or other materials provided with the distribution.
47 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
48 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
49 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
50 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
51 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
52 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
53 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
54 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
55 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
56 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
59 * from FreeBSD: aac_pci.c,v 1.1 2000/09/13 03:20:34 msmith Exp
60 * via OpenBSD: aac_pci.c,v 1.7 2002/03/14 01:26:58 millert Exp
64 * PCI front-end for the `aac' driver.
67 #include <sys/cdefs.h>
68 __KERNEL_RCSID(0, "$NetBSD: aac_pci.c,v 1.29 2009/05/12 08:22:59 cegger Exp $");
70 #include <sys/param.h>
71 #include <sys/systm.h>
72 #include <sys/device.h>
73 #include <sys/kernel.h>
74 #include <sys/malloc.h>
75 #include <sys/queue.h>
78 #include <machine/endian.h>
81 #include <dev/pci/pcidevs.h>
82 #include <dev/pci/pcireg.h>
83 #include <dev/pci/pcivar.h>
85 #include <dev/ic/aacreg.h>
86 #include <dev/ic/aacvar.h>
88 struct aac_pci_softc
{
89 struct aac_softc sc_aac
;
90 pci_chipset_tag_t sc_pc
;
91 pci_intr_handle_t sc_ih
;
94 /* i960Rx interface */
95 static int aac_rx_get_fwstatus(struct aac_softc
*);
96 static void aac_rx_qnotify(struct aac_softc
*, int);
97 static int aac_rx_get_istatus(struct aac_softc
*);
98 static void aac_rx_clear_istatus(struct aac_softc
*, int);
99 static void aac_rx_set_mailbox(struct aac_softc
*, u_int32_t
, u_int32_t
,
100 u_int32_t
, u_int32_t
, u_int32_t
);
101 static uint32_t aac_rx_get_mailbox(struct aac_softc
*, int);
102 static void aac_rx_set_interrupts(struct aac_softc
*, int);
103 static int aac_rx_send_command(struct aac_softc
*, struct aac_ccb
*);
104 static int aac_rx_get_outb_queue(struct aac_softc
*);
105 static void aac_rx_set_outb_queue(struct aac_softc
*, int);
107 /* StrongARM interface */
108 static int aac_sa_get_fwstatus(struct aac_softc
*);
109 static void aac_sa_qnotify(struct aac_softc
*, int);
110 static int aac_sa_get_istatus(struct aac_softc
*);
111 static void aac_sa_clear_istatus(struct aac_softc
*, int);
112 static void aac_sa_set_mailbox(struct aac_softc
*, u_int32_t
, u_int32_t
,
113 u_int32_t
, u_int32_t
, u_int32_t
);
114 static uint32_t aac_sa_get_mailbox(struct aac_softc
*, int);
115 static void aac_sa_set_interrupts(struct aac_softc
*, int);
117 /* Rocket/MIPS interface */
118 static int aac_rkt_get_fwstatus(struct aac_softc
*);
119 static void aac_rkt_qnotify(struct aac_softc
*, int);
120 static int aac_rkt_get_istatus(struct aac_softc
*);
121 static void aac_rkt_clear_istatus(struct aac_softc
*, int);
122 static void aac_rkt_set_mailbox(struct aac_softc
*, u_int32_t
, u_int32_t
,
123 u_int32_t
, u_int32_t
, u_int32_t
);
124 static uint32_t aac_rkt_get_mailbox(struct aac_softc
*, int);
125 static void aac_rkt_set_interrupts(struct aac_softc
*, int);
126 static int aac_rkt_send_command(struct aac_softc
*, struct aac_ccb
*);
127 static int aac_rkt_get_outb_queue(struct aac_softc
*);
128 static void aac_rkt_set_outb_queue(struct aac_softc
*, int);
130 static const struct aac_interface aac_rx_interface
= {
134 aac_rx_clear_istatus
,
137 aac_rx_set_interrupts
,
139 aac_rx_get_outb_queue
,
140 aac_rx_set_outb_queue
143 static const struct aac_interface aac_sa_interface
= {
147 aac_sa_clear_istatus
,
150 aac_sa_set_interrupts
,
154 static const struct aac_interface aac_rkt_interface
= {
155 aac_rkt_get_fwstatus
,
158 aac_rkt_clear_istatus
,
161 aac_rkt_set_interrupts
,
162 aac_rkt_send_command
,
163 aac_rkt_get_outb_queue
,
164 aac_rkt_set_outb_queue
167 static struct aac_ident
{
175 } const aac_ident
[] = {
178 PCI_PRODUCT_DELL_PERC_2SI
,
180 PCI_PRODUCT_DELL_PERC_2SI
,
187 PCI_PRODUCT_DELL_PERC_3DI
,
189 PCI_PRODUCT_DELL_PERC_3DI
,
196 PCI_PRODUCT_DELL_PERC_3DI
,
198 PCI_PRODUCT_DELL_PERC_3DI_SUB2
,
205 PCI_PRODUCT_DELL_PERC_3DI
,
207 PCI_PRODUCT_DELL_PERC_3DI_SUB3
,
214 PCI_PRODUCT_DELL_PERC_3DI_2
,
216 PCI_PRODUCT_DELL_PERC_3DI_2_SUB
,
223 PCI_PRODUCT_DELL_PERC_3DI_3
,
225 PCI_PRODUCT_DELL_PERC_3DI_3_SUB
,
232 PCI_PRODUCT_DELL_PERC_3DI_3
,
234 PCI_PRODUCT_DELL_PERC_3DI_3_SUB2
,
241 PCI_PRODUCT_DELL_PERC_3DI_3
,
243 PCI_PRODUCT_DELL_PERC_3DI_3_SUB3
,
250 PCI_PRODUCT_DELL_PERC_3SI
,
252 PCI_PRODUCT_DELL_PERC_3SI
,
259 PCI_PRODUCT_DELL_PERC_3SI_2
,
261 PCI_PRODUCT_DELL_PERC_3SI_2_SUB
,
268 PCI_PRODUCT_ADP2_ASR2200S
,
270 PCI_PRODUCT_DELL_CERC_1_5
,
273 "Dell CERC SATA RAID 1.5/6ch"
277 PCI_PRODUCT_ADP2_AAC2622
,
279 PCI_PRODUCT_ADP2_AAC2622
,
286 PCI_PRODUCT_ADP2_ASR2200S
,
288 PCI_PRODUCT_ADP2_ASR2200S_SUB2M
,
290 AAC_QUIRK_NO4GB
| AAC_QUIRK_256FIBS
,
295 PCI_PRODUCT_ADP2_ASR2200S
,
297 PCI_PRODUCT_ADP2_ASR2200S_SUB2M
,
299 AAC_QUIRK_NO4GB
| AAC_QUIRK_256FIBS
,
304 PCI_PRODUCT_ADP2_ASR2200S
,
306 PCI_PRODUCT_ADP2_ASR2200S
,
308 AAC_QUIRK_NO4GB
| AAC_QUIRK_256FIBS
,
313 PCI_PRODUCT_ADP2_ASR2200S
,
315 PCI_PRODUCT_ADP2_AAR2810SA
,
322 PCI_PRODUCT_ADP2_ASR2200S
,
324 PCI_PRODUCT_ADP2_ASR2120S
,
326 AAC_QUIRK_NO4GB
| AAC_QUIRK_256FIBS
,
331 PCI_PRODUCT_ADP2_ASR2200S
,
333 PCI_PRODUCT_ADP2_ASR2410SA
,
340 PCI_PRODUCT_ADP2_ASR2200S
,
342 PCI_PRODUCT_ADP2_HP_M110_G2
,
345 "HP ML110 G2 (Adaptec ASR-2610SA)"
349 PCI_PRODUCT_ADP2_ASR2120S
,
351 PCI_PRODUCT_IBM_SERVERAID8K
,
358 PCI_PRODUCT_DEC_21554
,
360 PCI_PRODUCT_ADP2_AAC364
,
367 PCI_PRODUCT_DEC_21554
,
369 PCI_PRODUCT_ADP2_ASR5400S
,
371 AAC_QUIRK_BROKEN_MMAP
,
376 PCI_PRODUCT_DEC_21554
,
378 PCI_PRODUCT_ADP2_PERC_2QC
,
385 PCI_PRODUCT_DEC_21554
,
387 PCI_PRODUCT_ADP2_PERC_3QC
,
394 PCI_PRODUCT_DEC_21554
,
396 PCI_PRODUCT_HP_NETRAID_4M
,
403 static const struct aac_ident
*
404 aac_find_ident(struct pci_attach_args
*pa
)
406 const struct aac_ident
*m
, *mm
;
410 mm
= aac_ident
+ (sizeof(aac_ident
) / sizeof(aac_ident
[0]));
413 if (m
->vendor
== PCI_VENDOR(pa
->pa_id
) &&
414 m
->device
== PCI_PRODUCT(pa
->pa_id
)) {
415 subsysid
= pci_conf_read(pa
->pa_pc
, pa
->pa_tag
,
417 if (m
->subvendor
== PCI_VENDOR(subsysid
) &&
418 m
->subdevice
== PCI_PRODUCT(subsysid
))
428 aac_pci_intr_set(struct aac_softc
*sc
, int (*hand
)(void*), void *arg
)
430 struct aac_pci_softc
*pcisc
;
432 pcisc
= (struct aac_pci_softc
*) sc
;
434 pci_intr_disestablish(pcisc
->sc_pc
, sc
->sc_ih
);
435 sc
->sc_ih
= pci_intr_establish(pcisc
->sc_pc
, pcisc
->sc_ih
,
437 if (sc
->sc_ih
== NULL
) {
444 aac_pci_match(device_t parent
, cfdata_t match
, void *aux
)
446 struct pci_attach_args
*pa
;
450 if (PCI_CLASS(pa
->pa_class
) == PCI_CLASS_I2O
)
453 return (aac_find_ident(pa
) != NULL
);
457 aac_pci_attach(device_t parent
, device_t self
, void *aux
)
459 struct pci_attach_args
*pa
;
460 pci_chipset_tag_t pc
;
461 struct aac_pci_softc
*pcisc
;
462 struct aac_softc
*sc
;
468 const struct aac_ident
*m
;
472 pcisc
= device_private(self
);
477 aprint_naive(": RAID controller\n");
481 * Verify that the adapter is correctly set up in PCI space.
483 command
= pci_conf_read(pc
, pa
->pa_tag
, PCI_COMMAND_STATUS_REG
);
484 command
|= PCI_COMMAND_MASTER_ENABLE
;
485 pci_conf_write(pc
, pa
->pa_tag
, PCI_COMMAND_STATUS_REG
, command
);
486 command
= pci_conf_read(pc
, pa
->pa_tag
, PCI_COMMAND_STATUS_REG
);
487 AAC_DPRINTF(AAC_D_MISC
, ("pci command status reg 0x08x "));
489 if ((command
& PCI_COMMAND_MASTER_ENABLE
) == 0) {
490 aprint_error("can't enable bus-master feature\n");
494 if ((command
& PCI_COMMAND_MEM_ENABLE
) == 0) {
495 aprint_error("memory window not available\n");
500 * Map control/status registers.
502 if (pci_mapreg_map(pa
, PCI_MAPREG_START
,
503 PCI_MAPREG_TYPE_MEM
| PCI_MAPREG_MEM_TYPE_32BIT
, 0, &sc
->sc_memt
,
504 &sc
->sc_memh
, &membase
, &memsize
)) {
505 aprint_error("can't find mem space\n");
510 if (pci_intr_map(pa
, &pcisc
->sc_ih
)) {
511 aprint_error("couldn't map interrupt\n");
514 intrstr
= pci_intr_string(pc
, pcisc
->sc_ih
);
515 sc
->sc_ih
= pci_intr_establish(pc
, pcisc
->sc_ih
, IPL_BIO
, aac_intr
, sc
);
516 if (sc
->sc_ih
== NULL
) {
517 aprint_error("couldn't establish interrupt");
519 aprint_error(" at %s", intrstr
);
525 sc
->sc_dmat
= pa
->pa_dmat
;
527 m
= aac_find_ident(pa
);
528 aprint_normal("%s\n", m
->prodstr
);
530 aprint_normal_dev(&sc
->sc_dv
, "interrupting at %s\n",
533 sc
->sc_hwif
= m
->hwif
;
534 sc
->sc_quirks
= m
->quirks
;
535 switch (sc
->sc_hwif
) {
536 case AAC_HWIF_I960RX
:
537 AAC_DPRINTF(AAC_D_MISC
,
538 ("set hardware up for i960Rx"));
539 sc
->sc_if
= aac_rx_interface
;
542 case AAC_HWIF_STRONGARM
:
543 AAC_DPRINTF(AAC_D_MISC
,
544 ("set hardware up for StrongARM"));
545 sc
->sc_if
= aac_sa_interface
;
549 AAC_DPRINTF(AAC_D_MISC
,
550 ("set hardware up for MIPS/Rocket"));
551 sc
->sc_if
= aac_rkt_interface
;
554 sc
->sc_regsize
= memsize
;
555 sc
->sc_intr_set
= aac_pci_intr_set
;
562 pci_intr_disestablish(pc
, sc
->sc_ih
);
564 bus_space_unmap(sc
->sc_memt
, sc
->sc_memh
, memsize
);
567 CFATTACH_DECL(aac_pci
, sizeof(struct aac_pci_softc
),
568 aac_pci_match
, aac_pci_attach
, NULL
, NULL
);
571 * Read the current firmware status word.
574 aac_sa_get_fwstatus(struct aac_softc
*sc
)
577 return (AAC_GETREG4(sc
, AAC_SA_FWSTATUS
));
581 aac_rx_get_fwstatus(struct aac_softc
*sc
)
584 return (AAC_GETREG4(sc
, AAC_RX_FWSTATUS
));
588 aac_rkt_get_fwstatus(struct aac_softc
*sc
)
591 return (AAC_GETREG4(sc
, AAC_RKT_FWSTATUS
));
595 * Notify the controller of a change in a given queue
599 aac_sa_qnotify(struct aac_softc
*sc
, int qbit
)
602 AAC_SETREG2(sc
, AAC_SA_DOORBELL1_SET
, qbit
);
606 aac_rx_qnotify(struct aac_softc
*sc
, int qbit
)
609 AAC_SETREG4(sc
, AAC_RX_IDBR
, qbit
);
613 aac_rkt_qnotify(struct aac_softc
*sc
, int qbit
)
616 AAC_SETREG4(sc
, AAC_RKT_IDBR
, qbit
);
620 * Get the interrupt reason bits
623 aac_sa_get_istatus(struct aac_softc
*sc
)
626 return (AAC_GETREG2(sc
, AAC_SA_DOORBELL0
));
630 aac_rx_get_istatus(struct aac_softc
*sc
)
633 return (AAC_GETREG4(sc
, AAC_RX_ODBR
));
637 aac_rkt_get_istatus(struct aac_softc
*sc
)
640 return (AAC_GETREG4(sc
, AAC_RKT_ODBR
));
644 * Clear some interrupt reason bits
647 aac_sa_clear_istatus(struct aac_softc
*sc
, int mask
)
650 AAC_SETREG2(sc
, AAC_SA_DOORBELL0_CLEAR
, mask
);
654 aac_rx_clear_istatus(struct aac_softc
*sc
, int mask
)
657 AAC_SETREG4(sc
, AAC_RX_ODBR
, mask
);
661 aac_rkt_clear_istatus(struct aac_softc
*sc
, int mask
)
664 AAC_SETREG4(sc
, AAC_RKT_ODBR
, mask
);
668 * Populate the mailbox and set the command word
671 aac_sa_set_mailbox(struct aac_softc
*sc
, u_int32_t command
,
672 u_int32_t arg0
, u_int32_t arg1
, u_int32_t arg2
,
676 AAC_SETREG4(sc
, AAC_SA_MAILBOX
, command
);
677 AAC_SETREG4(sc
, AAC_SA_MAILBOX
+ 4, arg0
);
678 AAC_SETREG4(sc
, AAC_SA_MAILBOX
+ 8, arg1
);
679 AAC_SETREG4(sc
, AAC_SA_MAILBOX
+ 12, arg2
);
680 AAC_SETREG4(sc
, AAC_SA_MAILBOX
+ 16, arg3
);
684 aac_rx_set_mailbox(struct aac_softc
*sc
, u_int32_t command
,
685 u_int32_t arg0
, u_int32_t arg1
, u_int32_t arg2
,
689 AAC_SETREG4(sc
, AAC_RX_MAILBOX
, command
);
690 AAC_SETREG4(sc
, AAC_RX_MAILBOX
+ 4, arg0
);
691 AAC_SETREG4(sc
, AAC_RX_MAILBOX
+ 8, arg1
);
692 AAC_SETREG4(sc
, AAC_RX_MAILBOX
+ 12, arg2
);
693 AAC_SETREG4(sc
, AAC_RX_MAILBOX
+ 16, arg3
);
697 aac_rkt_set_mailbox(struct aac_softc
*sc
, u_int32_t command
,
698 u_int32_t arg0
, u_int32_t arg1
, u_int32_t arg2
,
702 AAC_SETREG4(sc
, AAC_RKT_MAILBOX
, command
);
703 AAC_SETREG4(sc
, AAC_RKT_MAILBOX
+ 4, arg0
);
704 AAC_SETREG4(sc
, AAC_RKT_MAILBOX
+ 8, arg1
);
705 AAC_SETREG4(sc
, AAC_RKT_MAILBOX
+ 12, arg2
);
706 AAC_SETREG4(sc
, AAC_RKT_MAILBOX
+ 16, arg3
);
710 * Fetch the specified mailbox
713 aac_sa_get_mailbox(struct aac_softc
*sc
, int mb
)
716 return (AAC_GETREG4(sc
, AAC_SA_MAILBOX
+ (mb
* 4)));
720 aac_rx_get_mailbox(struct aac_softc
*sc
, int mb
)
723 return (AAC_GETREG4(sc
, AAC_RX_MAILBOX
+ (mb
* 4)));
727 aac_rkt_get_mailbox(struct aac_softc
*sc
, int mb
)
730 return (AAC_GETREG4(sc
, AAC_RKT_MAILBOX
+ (mb
* 4)));
734 * Set/clear interrupt masks
737 aac_sa_set_interrupts(struct aac_softc
*sc
, int enable
)
741 AAC_SETREG2((sc
), AAC_SA_MASK0_CLEAR
, AAC_DB_INTERRUPTS
);
743 AAC_SETREG2((sc
), AAC_SA_MASK0_SET
, ~0);
747 aac_rx_set_interrupts(struct aac_softc
*sc
, int enable
)
751 if (sc
->sc_quirks
& AAC_QUIRK_NEW_COMM
)
752 AAC_SETREG4(sc
, AAC_RX_OIMR
, ~AAC_DB_INT_NEW_COMM
);
754 AAC_SETREG4(sc
, AAC_RX_OIMR
, ~AAC_DB_INTERRUPTS
);
756 AAC_SETREG4(sc
, AAC_RX_OIMR
, ~0);
761 aac_rkt_set_interrupts(struct aac_softc
*sc
, int enable
)
765 if (sc
->sc_quirks
& AAC_QUIRK_NEW_COMM
)
766 AAC_SETREG4(sc
, AAC_RKT_OIMR
, ~AAC_DB_INT_NEW_COMM
);
768 AAC_SETREG4(sc
, AAC_RKT_OIMR
, ~AAC_DB_INTERRUPTS
);
770 AAC_SETREG4(sc
, AAC_RKT_OIMR
, ~0);
775 * New comm. interface: Send command functions
778 aac_rx_send_command(struct aac_softc
*sc
, struct aac_ccb
*ac
)
780 u_int32_t index
, device
;
782 index
= AAC_GETREG4(sc
, AAC_RX_IQUE
);
783 if (index
== 0xffffffffL
)
784 index
= AAC_GETREG4(sc
, AAC_RX_IQUE
);
785 if (index
== 0xffffffffL
)
788 aac_enqueue_busy(ac
);
791 AAC_SETREG4(sc
, device
,
792 htole32((u_int32_t
)(ac
->ac_fibphys
& 0xffffffffUL
)));
794 if (sizeof(bus_addr_t
) > 4) {
795 AAC_SETREG4(sc
, device
,
796 htole32((u_int32_t
)((u_int64_t
)ac
->ac_fibphys
>> 32)));
798 AAC_SETREG4(sc
, device
, 0);
801 AAC_SETREG4(sc
, device
, ac
->ac_fib
->Header
.Size
);
802 AAC_SETREG4(sc
, AAC_RX_IQUE
, index
);
807 aac_rkt_send_command(struct aac_softc
*sc
, struct aac_ccb
*ac
)
809 u_int32_t index
, device
;
811 index
= AAC_GETREG4(sc
, AAC_RKT_IQUE
);
812 if (index
== 0xffffffffL
)
813 index
= AAC_GETREG4(sc
, AAC_RKT_IQUE
);
814 if (index
== 0xffffffffL
)
817 aac_enqueue_busy(ac
);
820 AAC_SETREG4(sc
, device
,
821 htole32((u_int32_t
)(ac
->ac_fibphys
& 0xffffffffUL
)));
823 if (sizeof(bus_addr_t
) > 4) {
824 AAC_SETREG4(sc
, device
,
825 htole32((u_int32_t
)((u_int64_t
)ac
->ac_fibphys
>> 32)));
827 AAC_SETREG4(sc
, device
, 0);
830 AAC_SETREG4(sc
, device
, ac
->ac_fib
->Header
.Size
);
831 AAC_SETREG4(sc
, AAC_RKT_IQUE
, index
);
836 * New comm. interface: get, set outbound queue index
839 aac_rx_get_outb_queue(struct aac_softc
*sc
)
842 return AAC_GETREG4(sc
, AAC_RX_OQUE
);
846 aac_rkt_get_outb_queue(struct aac_softc
*sc
)
849 return AAC_GETREG4(sc
, AAC_RKT_OQUE
);
853 aac_rx_set_outb_queue(struct aac_softc
*sc
, int index
)
856 AAC_SETREG4(sc
, AAC_RX_OQUE
, index
);
860 aac_rkt_set_outb_queue(struct aac_softc
*sc
, int index
)
863 AAC_SETREG4(sc
, AAC_RKT_OQUE
, index
);