Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 59019
b: refs/heads/master
c: b8a7ce7
h: refs/heads/master
i:
  59017: ff70167
  59015: 4abd642
v: v3
  • Loading branch information
Michael Chan authored and David S. Miller committed Jul 11, 2007
1 parent 6b73fe4 commit 81236b0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9b1084b8f99a6b5e97c0c9bc1b4455db4fa51a07
refs/heads/master: b8a7ce7bedb2134acb731e08e588ad92087a40ff
13 changes: 11 additions & 2 deletions trunk/drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2547,14 +2547,15 @@ bnx2_interrupt(int irq, void *dev_instance)
{
struct net_device *dev = dev_instance;
struct bnx2 *bp = netdev_priv(dev);
struct status_block *sblk = bp->status_blk;

/* When using INTx, it is possible for the interrupt to arrive
* at the CPU before the status block posted prior to the
* interrupt. Reading a register will flush the status block.
* When using MSI, the MSI message will always complete after
* the status block write.
*/
if ((bp->status_blk->status_idx == bp->last_status_idx) &&
if ((sblk->status_idx == bp->last_status_idx) &&
(REG_RD(bp, BNX2_PCICFG_MISC_STATUS) &
BNX2_PCICFG_MISC_STATUS_INTA_VALUE))
return IRQ_NONE;
Expand All @@ -2563,11 +2564,19 @@ bnx2_interrupt(int irq, void *dev_instance)
BNX2_PCICFG_INT_ACK_CMD_USE_INT_HC_PARAM |
BNX2_PCICFG_INT_ACK_CMD_MASK_INT);

/* Read back to deassert IRQ immediately to avoid too many
* spurious interrupts.
*/
REG_RD(bp, BNX2_PCICFG_INT_ACK_CMD);

/* Return here if interrupt is shared and is disabled. */
if (unlikely(atomic_read(&bp->intr_sem) != 0))
return IRQ_HANDLED;

netif_rx_schedule(dev);
if (netif_rx_schedule_prep(dev)) {
bp->last_status_idx = sblk->status_idx;
__netif_rx_schedule(dev);
}

return IRQ_HANDLED;
}
Expand Down

0 comments on commit 81236b0

Please sign in to comment.