diff options
Diffstat (limited to 'drivers/net/bna/bnad.c')
-rw-r--r-- | drivers/net/bna/bnad.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/bna/bnad.c b/drivers/net/bna/bnad.c index dd77156..00273e5 100644 --- a/drivers/net/bna/bnad.c +++ b/drivers/net/bna/bnad.c @@ -60,7 +60,7 @@ static const u8 bnad_bcast_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; #define BNAD_GET_MBOX_IRQ(_bnad) \ (((_bnad)->cfg_flags & BNAD_CF_MSIX) ? \ - ((_bnad)->msix_table[(_bnad)->msix_num - 1].vector) : \ + ((_bnad)->msix_table[BNAD_MAILBOX_MSIX_INDEX].vector) : \ ((_bnad)->pcidev->irq)) #define BNAD_FILL_UNMAPQ_MEM_REQ(_res_info, _num, _depth) \ @@ -1116,17 +1116,17 @@ bnad_mbox_irq_alloc(struct bnad *bnad, spin_lock_irqsave(&bnad->bna_lock, flags); if (bnad->cfg_flags & BNAD_CF_MSIX) { irq_handler = (irq_handler_t)bnad_msix_mbox_handler; - irq = bnad->msix_table[bnad->msix_num - 1].vector; + irq = bnad->msix_table[BNAD_MAILBOX_MSIX_INDEX].vector; irq_flags = 0; intr_info->intr_type = BNA_INTR_T_MSIX; - intr_info->idl[0].vector = bnad->msix_num - 1; + intr_info->idl[0].vector = BNAD_MAILBOX_MSIX_INDEX; } else { irq_handler = (irq_handler_t)bnad_isr; irq = bnad->pcidev->irq; irq_flags = IRQF_SHARED; intr_info->intr_type = BNA_INTR_T_INTX; - /* intr_info->idl.vector = 0 ? */ } + spin_unlock_irqrestore(&bnad->bna_lock, flags); sprintf(bnad->mbox_irq_name, "%s", BNAD_NAME); @@ -1179,11 +1179,12 @@ bnad_txrx_irq_alloc(struct bnad *bnad, enum bnad_intr_source src, switch (src) { case BNAD_INTR_TX: - vector_start = txrx_id; + vector_start = BNAD_MAILBOX_MSIX_VECTORS + txrx_id; break; case BNAD_INTR_RX: - vector_start = bnad->num_tx * bnad->num_txq_per_tx + + vector_start = BNAD_MAILBOX_MSIX_VECTORS + + (bnad->num_tx * bnad->num_txq_per_tx) + txrx_id; break; @@ -1204,11 +1205,11 @@ bnad_txrx_irq_alloc(struct bnad *bnad, enum bnad_intr_source src, switch (src) { case BNAD_INTR_TX: - intr_info->idl[0].vector = 0x1; /* Bit mask : Tx IB */ + intr_info->idl[0].vector = BNAD_INTX_TX_IB_BITMASK; break; case BNAD_INTR_RX: - intr_info->idl[0].vector = 0x2; /* Bit mask : Rx IB */ + intr_info->idl[0].vector = BNAD_INTX_RX_IB_BITMASK; break; } } @@ -2075,7 +2076,7 @@ bnad_mbox_irq_sync(struct bnad *bnad) spin_lock_irqsave(&bnad->bna_lock, flags); if (bnad->cfg_flags & BNAD_CF_MSIX) - irq = bnad->msix_table[bnad->msix_num - 1].vector; + irq = bnad->msix_table[BNAD_MAILBOX_MSIX_INDEX].vector; else irq = bnad->pcidev->irq; spin_unlock_irqrestore(&bnad->bna_lock, flags); |