summaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.c
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2006-01-23 16:11:03 -0800
committerDavid S. Miller <davem@davemloft.net>2006-01-23 16:11:03 -0800
commit1269a8a64a37c8a06af672f4cff4fed16a478734 (patch)
tree5d068c5d6af9928eb9652a24862826fd806df869 /drivers/net/bnx2.c
parentade2bfe7d1f0ea804d2e63209cc6318ad8bf17ae (diff)
downloadtalos-obmc-linux-1269a8a64a37c8a06af672f4cff4fed16a478734.tar.gz
talos-obmc-linux-1269a8a64a37c8a06af672f4cff4fed16a478734.zip
[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: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r--drivers/net/bnx2.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index ec08f833c32d..7b99cf26a129 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -316,6 +316,10 @@ bnx2_enable_int(struct bnx2 *bp)
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,
BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID | bp->last_status_idx);
val = REG_RD(bp, BNX2_HC_COMMAND);
@@ -1892,9 +1896,20 @@ bnx2_poll(struct net_device *dev, int *budget)
if (!bnx2_has_work(bp)) {
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,
- BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID |
- bp->last_status_idx);
+ BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID |
+ bp->last_status_idx);
return 0;
}
OpenPOWER on IntegriCloud