aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/bnx2.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 418190b79f6c..7babf6af4e28 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -14,8 +14,8 @@
14 14
15#define DRV_MODULE_NAME "bnx2" 15#define DRV_MODULE_NAME "bnx2"
16#define PFX DRV_MODULE_NAME ": " 16#define PFX DRV_MODULE_NAME ": "
17#define DRV_MODULE_VERSION "1.2.19" 17#define DRV_MODULE_VERSION "1.2.20"
18#define DRV_MODULE_RELDATE "May 23, 2005" 18#define DRV_MODULE_RELDATE "August 22, 2005"
19 19
20#define RUN_AT(x) (jiffies + (x)) 20#define RUN_AT(x) (jiffies + (x))
21 21
@@ -1538,15 +1538,12 @@ bnx2_msi(int irq, void *dev_instance, struct pt_regs *regs)
1538 BNX2_PCICFG_INT_ACK_CMD_MASK_INT); 1538 BNX2_PCICFG_INT_ACK_CMD_MASK_INT);
1539 1539
1540 /* Return here if interrupt is disabled. */ 1540 /* Return here if interrupt is disabled. */
1541 if (unlikely(atomic_read(&bp->intr_sem) != 0)) { 1541 if (unlikely(atomic_read(&bp->intr_sem) != 0))
1542 return IRQ_RETVAL(1); 1542 return IRQ_HANDLED;
1543 }
1544 1543
1545 if (netif_rx_schedule_prep(dev)) { 1544 netif_rx_schedule(dev);
1546 __netif_rx_schedule(dev);
1547 }
1548 1545
1549 return IRQ_RETVAL(1); 1546 return IRQ_HANDLED;
1550} 1547}
1551 1548
1552static irqreturn_t 1549static irqreturn_t
@@ -1564,22 +1561,19 @@ bnx2_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
1564 if ((bp->status_blk->status_idx == bp->last_status_idx) || 1561 if ((bp->status_blk->status_idx == bp->last_status_idx) ||
1565 (REG_RD(bp, BNX2_PCICFG_MISC_STATUS) & 1562 (REG_RD(bp, BNX2_PCICFG_MISC_STATUS) &
1566 BNX2_PCICFG_MISC_STATUS_INTA_VALUE)) 1563 BNX2_PCICFG_MISC_STATUS_INTA_VALUE))
1567 return IRQ_RETVAL(0); 1564 return IRQ_NONE;
1568 1565
1569 REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD, 1566 REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD,
1570 BNX2_PCICFG_INT_ACK_CMD_USE_INT_HC_PARAM | 1567 BNX2_PCICFG_INT_ACK_CMD_USE_INT_HC_PARAM |
1571 BNX2_PCICFG_INT_ACK_CMD_MASK_INT); 1568 BNX2_PCICFG_INT_ACK_CMD_MASK_INT);
1572 1569
1573 /* Return here if interrupt is shared and is disabled. */ 1570 /* Return here if interrupt is shared and is disabled. */
1574 if (unlikely(atomic_read(&bp->intr_sem) != 0)) { 1571 if (unlikely(atomic_read(&bp->intr_sem) != 0))
1575 return IRQ_RETVAL(1); 1572 return IRQ_HANDLED;
1576 }
1577 1573
1578 if (netif_rx_schedule_prep(dev)) { 1574 netif_rx_schedule(dev);
1579 __netif_rx_schedule(dev);
1580 }
1581 1575
1582 return IRQ_RETVAL(1); 1576 return IRQ_HANDLED;
1583} 1577}
1584 1578
1585static int 1579static int
@@ -5071,6 +5065,9 @@ bnx2_change_mac_addr(struct net_device *dev, void *p)
5071 struct sockaddr *addr = p; 5065 struct sockaddr *addr = p;
5072 struct bnx2 *bp = dev->priv; 5066 struct bnx2 *bp = dev->priv;
5073 5067
5068 if (!is_valid_ether_addr(addr->sa_data))
5069 return -EINVAL;
5070
5074 memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); 5071 memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
5075 if (netif_running(dev)) 5072 if (netif_running(dev))
5076 bnx2_set_mac_addr(bp); 5073 bnx2_set_mac_addr(bp);
@@ -5369,6 +5366,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
5369err_out_unmap: 5366err_out_unmap:
5370 if (bp->regview) { 5367 if (bp->regview) {
5371 iounmap(bp->regview); 5368 iounmap(bp->regview);
5369 bp->regview = NULL;
5372 } 5370 }
5373 5371
5374err_out_release: 5372err_out_release: