Index: sys/dev/aacraid/aacraid.c =================================================================== --- sys/dev/aacraid/aacraid.c +++ sys/dev/aacraid/aacraid.c @@ -104,6 +104,33 @@ static int aac_setup_intr(struct aac_softc *sc); static int aac_check_config(struct aac_softc *sc); +/* i960Rx interface */ +static int aac_rx_get_fwstatus(struct aac_softc *sc); +static void aac_rx_qnotify(struct aac_softc *sc, int qbit); +static int aac_rx_get_istatus(struct aac_softc *sc); +static void aac_rx_clear_istatus(struct aac_softc *sc, int mask); +static void aac_rx_set_mailbox(struct aac_softc *sc, u_int32_t command, + u_int32_t arg0, u_int32_t arg1, + u_int32_t arg2, u_int32_t arg3); +static int aac_rx_get_mailbox(struct aac_softc *sc, int mb); +static void aac_rx_set_interrupts(struct aac_softc *sc, int mode); +static int aac_rx_send_command(struct aac_softc *sc, struct aac_command *cm); +static int aac_rx_get_outb_queue(struct aac_softc *sc); +static void aac_rx_set_outb_queue(struct aac_softc *sc, int index); + +struct aac_interface aacraid_rx_interface = { + aac_rx_get_fwstatus, + aac_rx_qnotify, + aac_rx_get_istatus, + aac_rx_clear_istatus, + aac_rx_set_mailbox, + aac_rx_get_mailbox, + aac_rx_set_interrupts, + aac_rx_send_command, + aac_rx_get_outb_queue, + aac_rx_set_outb_queue +}; + /* PMC SRC interface */ static int aac_src_get_fwstatus(struct aac_softc *sc); static void aac_src_qnotify(struct aac_softc *sc, int qbit); @@ -611,11 +638,13 @@ /* * Create DMA tag for mapping FIBs into controller-addressable space.. */ - if (sc->flags & AAC_FLAGS_NEW_COMM_TYPE1) + if (sc->flags & AAC_FLAGS_NEW_COMM_TYPE1) maxsize = sc->aac_max_fibs_alloc * (sc->aac_max_fib_size + sizeof(struct aac_fib_xporthdr) + 31); - else + else if (sc->flags & AAC_FLAGS_NEW_COMM_TYPE2) maxsize = sc->aac_max_fibs_alloc * (sc->aac_max_fib_size + 31); + else + maxsize = sc->aac_max_fibs_alloc * sc->aac_max_fib_size; if (bus_dma_tag_create(sc->aac_parent_dmat, /* parent */ 1, 0, /* algnmnt, boundary */ (sc->flags & AAC_FLAGS_4GB_WINDOW) ? @@ -636,8 +665,10 @@ /* * Create DMA tag for the common structure and allocate it. */ - maxsize = sizeof(struct aac_common); - maxsize += sc->aac_max_fibs * sizeof(u_int32_t); + maxsize = 8192 + sizeof(struct aac_common); + if ((sc->flags & AAC_FLAGS_NEW_COMM_TYPE1) || + (sc->flags & AAC_FLAGS_NEW_COMM_TYPE2)) + maxsize += sc->aac_max_fibs * sizeof(u_int32_t); if (bus_dma_tag_create(sc->aac_parent_dmat, /* parent */ 1, 0, /* algnmnt, boundary */ (sc->flags & AAC_FLAGS_4GB_WINDOW) ? @@ -740,7 +771,8 @@ if (sc->aac_regs_res0 != NULL) bus_release_resource(sc->aac_dev, SYS_RES_MEMORY, sc->aac_regs_rid0, sc->aac_regs_res0); - if (sc->aac_regs_res1 != NULL) + if ((sc->aac_hwif == AAC_HWIF_SRC || sc->aac_hwif == AAC_HWIF_SRCV) && + sc->aac_regs_res1 != NULL) bus_release_resource(sc->aac_dev, SYS_RES_MEMORY, sc->aac_regs_rid1, sc->aac_regs_res1); } @@ -1021,6 +1053,89 @@ } /* + * Interrupt handler for NEW_COMM interface. + */ +void +aacraid_new_intr(void *arg) +{ + struct aac_softc *sc; + u_int32_t index, fast; + struct aac_command *cm; + struct aac_fib *fib; + int i; + + sc = (struct aac_softc *)arg; + + fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); + mtx_lock(&sc->aac_io_lock); + while (1) { + index = AAC_GET_OUTB_QUEUE(sc); + if (index == 0xffffffff) + index = AAC_GET_OUTB_QUEUE(sc); + if (index == 0xffffffff) + break; + if (index & 2) { + if (index == 0xfffffffe) { + /* XXX This means that the controller wants + * more work. Ignore it for now. + */ + continue; + } + /* AIF */ + fib = (struct aac_fib *)malloc(sizeof *fib, M_AACRAIDBUF, + M_NOWAIT | M_ZERO); + if (fib == NULL) { + /* If we're really this short on memory, + * hopefully breaking out of the handler will + * allow something to get freed. This + * actually sucks a whole lot. + */ + break; + } + index &= ~2; + for (i = 0; i < sizeof(struct aac_fib)/4; ++i) + ((u_int32_t *)fib)[i] = AAC_MEM1_GETREG4(sc, index + i*4); + aac_handle_aif(sc, fib); + free(fib, M_AACRAIDBUF); + + /* + * AIF memory is owned by the adapter, so let it + * know that we are done with it. + */ + AAC_SET_OUTB_QUEUE(sc, index); + AAC_CLEAR_ISTATUS(sc, AAC_DB_RESPONSE_READY); + } else { + fast = index & 1; + cm = sc->aac_commands + (index >> 2); + fib = cm->cm_fib; + if (fast) { + fib->Header.XferState |= AAC_FIBSTATE_DONEADAP; + *((u_int32_t *)(fib->data)) = ST_OK; + } + aac_remove_busy(cm); + aac_unmap_command(cm); + cm->cm_flags |= AAC_CMD_COMPLETED; + + /* is there a completion handler? */ + if (cm->cm_complete != NULL) { + cm->cm_complete(cm); + } else { + /* assume that someone is sleeping on this + * command + */ + wakeup(cm); + } + sc->flags &= ~AAC_QUEUE_FRZN; + } + } + /* see if we can start some more I/O */ + if ((sc->flags & AAC_QUEUE_FRZN) == 0) + aacraid_startio(sc); + + mtx_unlock(&sc->aac_io_lock); +} + +/* * Handle notification of one or more FIBs coming from the controller. */ static void @@ -1213,9 +1328,12 @@ return (ENOMEM); } - maxsize = sc->aac_max_fib_size + 31; - if (sc->flags & AAC_FLAGS_NEW_COMM_TYPE1) - maxsize += sizeof(struct aac_fib_xporthdr); + maxsize = sc->aac_max_fib_size; + if (sc->flags & AAC_FLAGS_NEW_COMM_TYPE1) + maxsize += sizeof(struct aac_fib_xporthdr) + 31; + else if (sc->flags & AAC_FLAGS_NEW_COMM_TYPE2) + maxsize += 31; + /* Ignore errors since this doesn't bounce */ (void)bus_dmamap_load(sc->aac_fib_dmat, fm->aac_fibmap, fm->aac_fibs, sc->aac_max_fibs_alloc * maxsize, @@ -1238,7 +1356,7 @@ cm->cm_fib = (struct aac_fib *) ((u_int8_t *)cm->cm_fib + (fibphys_aligned - cm->cm_fibphys)); cm->cm_fibphys = fibphys_aligned; - } else { + } else if (sc->flags & AAC_FLAGS_NEW_COMM_TYPE2) { u_int64_t fibphys_aligned; fibphys_aligned = (cm->cm_fibphys + 31) & ~31; cm->cm_fib = (struct aac_fib *) @@ -1635,6 +1753,8 @@ sc->flags |= AAC_FLAGS_NEW_COMM | AAC_FLAGS_NEW_COMM_TYPE1; else if (options & AAC_SUPPORTED_NEW_COMM_TYPE2) sc->flags |= AAC_FLAGS_NEW_COMM | AAC_FLAGS_NEW_COMM_TYPE2; + else if (options & AAC_SUPPORTED_NEW_COMM) + sc->flags |= AAC_FLAGS_NEW_COMM; } if (options & AAC_SUPPORTED_64BIT_ARRAYSIZE) sc->flags |= AAC_FLAGS_ARRAY_64BIT; @@ -1678,6 +1798,13 @@ } sc->aac_btag0 = rman_get_bustag(sc->aac_regs_res0); sc->aac_bhandle0 = rman_get_bushandle(sc->aac_regs_res0); + + if (!(sc->aac_hwif == AAC_HWIF_SRC || sc->aac_hwif == AAC_HWIF_SRCV)) { + sc->aac_regs_res1 = sc->aac_regs_res0; + sc->aac_regs_rid1 = sc->aac_regs_rid0; + sc->aac_btag1 = sc->aac_btag0; + sc->aac_bhandle1 = sc->aac_bhandle0; + } } /* Read preferred settings */ @@ -1709,11 +1836,13 @@ sc->aac_max_msix =(sc->flags & AAC_FLAGS_NEW_COMM_TYPE2) ? options : 0; } - maxsize = sc->aac_max_fib_size + 31; - if (sc->flags & AAC_FLAGS_NEW_COMM_TYPE1) - maxsize += sizeof(struct aac_fib_xporthdr); + maxsize = sc->aac_max_fib_size; + if (sc->flags & AAC_FLAGS_NEW_COMM_TYPE1) + maxsize += sizeof(struct aac_fib_xporthdr) + 31; + else if (sc->flags & AAC_FLAGS_NEW_COMM_TYPE2) + maxsize += 31; if (maxsize > PAGE_SIZE) { - sc->aac_max_fib_size -= (maxsize - PAGE_SIZE); + sc->aac_max_fib_size -= (maxsize - PAGE_SIZE); maxsize = PAGE_SIZE; } sc->aac_max_fibs_alloc = PAGE_SIZE / maxsize; @@ -1793,6 +1922,8 @@ ip->InitFlags |= (AAC_INITFLAGS_NEW_COMM_TYPE2_SUPPORTED | AAC_INITFLAGS_FAST_JBOD_SUPPORTED); device_printf(sc->aac_dev, "New comm. interface type2 enabled\n"); + } else if (sc->flags & AAC_FLAGS_NEW_COMM) { + device_printf(sc->aac_dev, "New comm. interface enabled\n"); } ip->MaxNumAif = sc->aac_max_aif; ip->HostRRQ_AddrLow = @@ -1813,8 +1944,17 @@ /* * Do controller-type-specific initialisation */ - AAC_MEM0_SETREG4(sc, AAC_SRC_ODBR_C, ~0); - + switch (sc->aac_hwif) { + case AAC_HWIF_I960RX: + AAC_MEM0_SETREG4(sc, AAC_RX_ODBR, ~0); + break; + case AAC_HWIF_SRC: + case AAC_HWIF_SRCV: + AAC_MEM0_SETREG4(sc, AAC_SRC_ODBR_C, ~0); + break; + default: + break; + } /* * Give the init structure to the controller. */ @@ -1965,11 +2105,22 @@ } sc->aac_irq_rid[i] = rid; sc->aac_irq[i] = res; - if (aac_bus_setup_intr(sc->aac_dev, res, - INTR_MPSAFE | INTR_TYPE_BIO, NULL, - aacraid_new_intr_type1, &sc->aac_msix[i], &tag)) { - device_printf(sc->aac_dev, "can't set up interrupt\n"); - return (EINVAL); + if ((sc->flags & AAC_FLAGS_NEW_COMM_TYPE1) || + (sc->flags & AAC_FLAGS_NEW_COMM_TYPE2) || + (sc->flags & AAC_FLAGS_NEW_COMM_TYPE34)) { + if (aac_bus_setup_intr(sc->aac_dev, res, + INTR_MPSAFE | INTR_TYPE_BIO, NULL, + aacraid_new_intr_type1, &sc->aac_msix[i], &tag)) { + device_printf(sc->aac_dev, "can't set up interrupt\n"); + return (EINVAL); + } + } else { + if (aac_bus_setup_intr(sc->aac_dev, res, + INTR_MPSAFE | INTR_TYPE_BIO, NULL, + aacraid_new_intr, sc, &tag)) { + device_printf(sc->aac_dev, "can't set up interrupt\n"); + return (EINVAL); + } } sc->aac_msix[i].vector_no = i; sc->aac_msix[i].sc = sc; @@ -2157,6 +2308,114 @@ * Interface Function Vectors */ +static int +aac_rx_get_fwstatus(struct aac_softc *sc) +{ + fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); + + return(AAC_MEM0_GETREG4(sc, AAC_RX_OMR0)); +} + +static void +aac_rx_qnotify(struct aac_softc *sc, int qbit) +{ + fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); + + AAC_MEM0_SETREG4(sc, AAC_RX_IDBR, qbit); +} + +static int +aac_rx_get_istatus(struct aac_softc *sc) +{ + fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); + + return(AAC_MEM0_GETREG4(sc, AAC_RX_ODBR)); +} + +static void +aac_rx_clear_istatus(struct aac_softc *sc, int mask) +{ + fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); + + AAC_MEM0_SETREG4(sc, AAC_RX_ODBR, mask); +} + +static void +aac_rx_set_mailbox(struct aac_softc *sc, u_int32_t command, + u_int32_t arg0, u_int32_t arg1, u_int32_t arg2, u_int32_t arg3) +{ + fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); + + AAC_MEM1_SETREG4(sc, AAC_RX_MAILBOX, command); + AAC_MEM1_SETREG4(sc, AAC_RX_MAILBOX + 4, arg0); + AAC_MEM1_SETREG4(sc, AAC_RX_MAILBOX + 8, arg1); + AAC_MEM1_SETREG4(sc, AAC_RX_MAILBOX + 12, arg2); + AAC_MEM1_SETREG4(sc, AAC_RX_MAILBOX + 16, arg3); +} + +static int +aac_rx_get_mailbox(struct aac_softc *sc, int mb) +{ + fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); + + return(AAC_MEM1_GETREG4(sc, AAC_RX_MAILBOX + (mb * 4))); +} + +static void +aac_rx_set_interrupts(struct aac_softc *sc, int mode) +{ + fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "%sable interrupts", + mode == AAC_ENABLE_INTERRUPT ? "en" : "dis"); + + if (mode == AAC_ENABLE_INTERRUPT) { + if (sc->flags & AAC_FLAGS_NEW_COMM) + AAC_MEM0_SETREG4(sc, AAC_RX_OIMR, ~AAC_DB_INT_NEW_COMM); + else + AAC_MEM0_SETREG4(sc, AAC_RX_OIMR, ~AAC_DB_INTERRUPTS); + } else if (mode == AAC_DISABLE_INTERRUPT) { + AAC_MEM0_SETREG4(sc, AAC_RX_OIMR, ~0); + } +} + +static int +aac_rx_send_command(struct aac_softc *sc, struct aac_command *cm) +{ + u_int32_t index, device; + + fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "send command (new comm.)"); + + index = AAC_MEM0_GETREG4(sc, AAC_RX_IQUE); + if (index == 0xffffffffL) + index = AAC_MEM0_GETREG4(sc, AAC_RX_IQUE); + if (index == 0xffffffffL) + return index; + aac_enqueue_busy(cm); + device = index; + AAC_MEM1_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys & 0xffffffffUL)); + device += 4; + AAC_MEM1_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys >> 32)); + device += 4; + AAC_MEM1_SETREG4(sc, device, cm->cm_fib->Header.Size); + AAC_MEM0_SETREG4(sc, AAC_RX_IQUE, index); + return 0; +} + +static int +aac_rx_get_outb_queue(struct aac_softc *sc) +{ + fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); + + return(AAC_MEM0_GETREG4(sc, AAC_RX_OQUE)); +} + +static void +aac_rx_set_outb_queue(struct aac_softc *sc, int index) +{ + fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); + + AAC_MEM0_SETREG4(sc, AAC_RX_OQUE, index); +} + /* * Read the current firmware status word. */ Index: sys/dev/aacraid/aacraid_cam.c =================================================================== --- sys/dev/aacraid/aacraid_cam.c +++ sys/dev/aacraid/aacraid_cam.c @@ -1028,14 +1028,25 @@ * causes problems. */ cpi->hba_misc = PIM_NOBUSRESET; - cpi->hba_inquiry = PI_TAG_ABLE; - cpi->base_transfer_speed = 300000; + if (sc->aac_hwif == AAC_HWIF_SRC || sc->aac_hwif == AAC_HWIF_SRCV) { + cpi->hba_inquiry = PI_TAG_ABLE; + cpi->base_transfer_speed = 300000; + } else { + cpi->hba_inquiry = PI_SDTR_ABLE|PI_TAG_ABLE|PI_WIDE_16; + cpi->base_transfer_speed = 150000; + } #ifdef CAM_NEW_TRAN_CODE cpi->hba_misc |= PIM_SEQSCAN; cpi->protocol = PROTO_SCSI; - cpi->transport = XPORT_SAS; - cpi->transport_version = 0; - cpi->protocol_version = SCSI_REV_SPC2; + if (sc->aac_hwif == AAC_HWIF_SRC || sc->aac_hwif == AAC_HWIF_SRCV) { + cpi->transport = XPORT_SAS; + cpi->transport_version = 0; + cpi->protocol_version = SCSI_REV_SPC2; + } else { + cpi->transport = XPORT_SPI; + cpi->transport_version = 2; + cpi->protocol_version = SCSI_REV_2; + } #endif strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); strlcpy(cpi->hba_vid, "PMC-Sierra", HBA_IDLEN); @@ -1053,9 +1064,15 @@ struct ccb_trans_settings_spi *spi = &ccb->cts.xport_specific.spi; ccb->cts.protocol = PROTO_SCSI; - ccb->cts.protocol_version = SCSI_REV_SPC2; - ccb->cts.transport = XPORT_SAS; - ccb->cts.transport_version = 0; + if (sc->aac_hwif == AAC_HWIF_SRC || sc->aac_hwif == AAC_HWIF_SRCV) { + ccb->cts.protocol_version = SCSI_REV_SPC2; + ccb->cts.transport = XPORT_SAS; + ccb->cts.transport_version = 0; + } else { + ccb->cts.protocol_version = SCSI_REV_2; + ccb->cts.transport = XPORT_SPI; + ccb->cts.transport_version = 2; + } scsi->valid = CTS_SCSI_VALID_TQ; scsi->flags = CTS_SCSI_FLAGS_TAG_ENB; spi->valid |= CTS_SPI_VALID_DISC; Index: sys/dev/aacraid/aacraid_pci.c =================================================================== --- sys/dev/aacraid/aacraid_pci.c +++ sys/dev/aacraid/aacraid_pci.c @@ -96,6 +96,8 @@ int quirks; char *desc; } aacraid_family_identifiers[] = { + {0x9005, 0x0285, 0, 0, AAC_HWIF_I960RX, 0, + "Adaptec RAID Controller"}, {0x9005, 0x028b, 0, 0, AAC_HWIF_SRC, 0, "Adaptec RAID Controller"}, {0x9005, 0x028c, 0, 0, AAC_HWIF_SRCV, 0, @@ -179,6 +181,11 @@ id = aac_find_ident(dev); sc->aac_hwif = id->hwif; switch(sc->aac_hwif) { + case AAC_HWIF_I960RX: + fwprintf(sc, HBA_FLAGS_DBG_INIT_B, + "set hardware up for i960Rx/NARK"); + sc->aac_if = aacraid_rx_interface; + break; case AAC_HWIF_SRC: fwprintf(sc, HBA_FLAGS_DBG_INIT_B, "set hardware up for PMC SRC"); sc->aac_if = aacraid_src_interface; @@ -210,19 +217,25 @@ sc->aac_btag0 = rman_get_bustag(sc->aac_regs_res0); sc->aac_bhandle0 = rman_get_bushandle(sc->aac_regs_res0); - sc->aac_regs_rid1 = PCIR_BAR(2); - if ((sc->aac_regs_res1 = bus_alloc_resource_any(sc->aac_dev, - SYS_RES_MEMORY, &sc->aac_regs_rid1, RF_ACTIVE)) == NULL) { - device_printf(sc->aac_dev, - "couldn't allocate register window 1\n"); - goto out; + if (sc->aac_hwif == AAC_HWIF_SRC || sc->aac_hwif == AAC_HWIF_SRCV) { + sc->aac_regs_rid1 = PCIR_BAR(2); + if ((sc->aac_regs_res1 = bus_alloc_resource_any(sc->aac_dev, + SYS_RES_MEMORY, &sc->aac_regs_rid1, RF_ACTIVE)) == NULL) { + device_printf(sc->aac_dev, + "couldn't allocate register window 1\n"); + goto out; + } + sc->aac_btag1 = rman_get_bustag(sc->aac_regs_res1); + sc->aac_bhandle1 = rman_get_bushandle(sc->aac_regs_res1); + } else { + sc->aac_regs_res1 = sc->aac_regs_res0; + sc->aac_regs_rid1 = sc->aac_regs_rid0; + sc->aac_btag1 = sc->aac_btag0; + sc->aac_bhandle1 = sc->aac_bhandle0; } - sc->aac_btag1 = rman_get_bustag(sc->aac_regs_res1); - sc->aac_bhandle1 = rman_get_bushandle(sc->aac_regs_res1); - /* * Allocate the parent bus DMA tag appropriate for our PCI interface. - * + * * Note that some of these controllers are 64-bit capable. */ if (bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ Index: sys/dev/aacraid/aacraid_reg.h =================================================================== --- sys/dev/aacraid/aacraid_reg.h +++ sys/dev/aacraid/aacraid_reg.h @@ -1563,6 +1563,24 @@ }; /* + * Register definitions for the Adaptec 'Pablano' adapters, based on the i960Rx, + * and other related adapters. + */ +#define AAC_RX_OMR0 0x18 /* outbound message register 0 */ +#define AAC_RX_OMR1 0x1c /* outbound message register 1 */ +#define AAC_RX_IDBR 0x20 /* inbound doorbell register */ +#define AAC_RX_IISR 0x24 /* inbound interrupt status register */ +#define AAC_RX_IIMR 0x28 /* inbound interrupt mask register */ +#define AAC_RX_ODBR 0x2c /* outbound doorbell register */ +#define AAC_RX_OISR 0x30 /* outbound interrupt status register */ +#define AAC_RX_OIMR 0x34 /* outbound interrupt mask register */ +#define AAC_RX_IQUE 0x40 /* inbound queue */ +#define AAC_RX_OQUE 0x44 /* outbound queue */ + +#define AAC_RX_MAILBOX 0x50 /* mailbox (20 bytes) */ +#define AAC_RX_FWSTATUS 0x6c + +/* * Register definitions for the Adaptec PMC SRC/SRCv adapters. */ /* accessible via BAR0 */ @@ -1597,6 +1615,8 @@ * Status bits in the doorbell registers. */ #define AAC_DB_SYNC_COMMAND (1<<0) /* send/completed synchronous FIB */ +#define AAC_DB_COMMAND_READY (1<<1) /* posted one or more commands */ +#define AAC_DB_RESPONSE_READY (1<<2) /* one or more commands complete */ #define AAC_DB_AIF_PENDING (1<<6) /* pending AIF (new comm. type1) */ /* PMC specific outbound doorbell bits */ #define AAC_DB_RESPONSE_SENT_NS (1<<1) /* response sent (not shifted)*/ @@ -1612,6 +1632,16 @@ #define AAC_PRINTF_DONE (1<<5) /* Host completed printf processing */ /* + * Mask containing the interrupt bits we care about. We don't anticipate (or + * want) interrupts not in this mask. + */ +#define AAC_DB_INTERRUPTS (AAC_DB_COMMAND_READY | \ + AAC_DB_RESPONSE_READY | \ + AAC_DB_PRINTF) +#define AAC_DB_INT_NEW_COMM 0x08 +#define AAC_DB_INT_NEW_COMM_TYPE1 0x04 + +/* * Interrupts */ #define AAC_MAX_MSIX 32 /* vectors */ Index: sys/dev/aacraid/aacraid_var.h =================================================================== --- sys/dev/aacraid/aacraid_var.h +++ sys/dev/aacraid/aacraid_var.h @@ -282,6 +282,7 @@ int (*aif_get_outb_queue)(struct aac_softc *sc); void (*aif_set_outb_queue)(struct aac_softc *sc, int index); }; +extern struct aac_interface aacraid_rx_interface; extern struct aac_interface aacraid_src_interface; extern struct aac_interface aacraid_srcv_interface; @@ -377,6 +378,7 @@ /* controller hardware interface */ int aac_hwif; +#define AAC_HWIF_I960RX 0 #define AAC_HWIF_SRC 5 #define AAC_HWIF_SRCV 6 #define AAC_HWIF_UNKNOWN -1 @@ -519,6 +521,7 @@ extern int aacraid_suspend(device_t dev); extern int aacraid_resume(device_t dev); extern void aacraid_new_intr_type1(void *arg); +extern void aacraid_new_intr(void *arg); extern void aacraid_submit_bio(struct bio *bp); extern void aacraid_biodone(struct bio *bp); extern void aacraid_startio(struct aac_softc *sc);