Commit 1269a8a6 authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

[BNX2]: Workaround hw interrupt bug

Add workaround for a hardware interrupt issue. When using INTA,
unmasking of the interrupt and the tag update should be done
separately to avoid some spurious interrupts,
Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ade2bfe7
...@@ -315,6 +315,10 @@ bnx2_enable_int(struct bnx2 *bp) ...@@ -315,6 +315,10 @@ bnx2_enable_int(struct bnx2 *bp)
{ {
u32 val; u32 val;
REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD,
BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID |
BNX2_PCICFG_INT_ACK_CMD_MASK_INT | bp->last_status_idx);
REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD, REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD,
BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID | bp->last_status_idx); BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID | bp->last_status_idx);
...@@ -1892,6 +1896,17 @@ bnx2_poll(struct net_device *dev, int *budget) ...@@ -1892,6 +1896,17 @@ bnx2_poll(struct net_device *dev, int *budget)
if (!bnx2_has_work(bp)) { if (!bnx2_has_work(bp)) {
netif_rx_complete(dev); netif_rx_complete(dev);
if (likely(bp->flags & USING_MSI_FLAG)) {
REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD,
BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID |
bp->last_status_idx);
return 0;
}
REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD,
BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID |
BNX2_PCICFG_INT_ACK_CMD_MASK_INT |
bp->last_status_idx);
REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD, REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD,
BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID | BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID |
bp->last_status_idx); bp->last_status_idx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment