]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/net/bnx2.c
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[karo-tx-linux.git] / drivers / net / bnx2.c
index 55a72c7ad001a20ae03b4c3ebf3fe61281688884..11d25231822112b08fc478e64fea577b983a12e7 100644 (file)
@@ -14,8 +14,8 @@
 
 #define DRV_MODULE_NAME                "bnx2"
 #define PFX DRV_MODULE_NAME    ": "
-#define DRV_MODULE_VERSION     "1.2.20"
-#define DRV_MODULE_RELDATE     "August 22, 2005"
+#define DRV_MODULE_VERSION     "1.2.21"
+#define DRV_MODULE_RELDATE     "September 7, 2005"
 
 #define RUN_AT(x) (jiffies + (x))
 
@@ -314,20 +314,16 @@ bnx2_free_mem(struct bnx2 *bp)
                                    bp->tx_desc_ring, bp->tx_desc_mapping);
                bp->tx_desc_ring = NULL;
        }
-       if (bp->tx_buf_ring) {
-               kfree(bp->tx_buf_ring);
-               bp->tx_buf_ring = NULL;
-       }
+       kfree(bp->tx_buf_ring);
+       bp->tx_buf_ring = NULL;
        if (bp->rx_desc_ring) {
                pci_free_consistent(bp->pdev,
                                    sizeof(struct rx_bd) * RX_DESC_CNT,
                                    bp->rx_desc_ring, bp->rx_desc_mapping);
                bp->rx_desc_ring = NULL;
        }
-       if (bp->rx_buf_ring) {
-               kfree(bp->rx_buf_ring);
-               bp->rx_buf_ring = NULL;
-       }
+       kfree(bp->rx_buf_ring);
+       bp->rx_buf_ring = NULL;
 }
 
 static int
@@ -1533,6 +1529,7 @@ bnx2_msi(int irq, void *dev_instance, struct pt_regs *regs)
        struct net_device *dev = dev_instance;
        struct bnx2 *bp = dev->priv;
 
+       prefetch(bp->status_blk);
        REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD,
                BNX2_PCICFG_INT_ACK_CMD_USE_INT_HC_PARAM |
                BNX2_PCICFG_INT_ACK_CMD_MASK_INT);
@@ -1558,7 +1555,7 @@ bnx2_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
         * 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 ((bp->status_blk->status_idx == bp->last_status_idx) &&
            (REG_RD(bp, BNX2_PCICFG_MISC_STATUS) &
             BNX2_PCICFG_MISC_STATUS_INTA_VALUE))
                return IRQ_NONE;
@@ -5014,6 +5011,7 @@ static struct ethtool_ops bnx2_ethtool_ops = {
        .phys_id                = bnx2_phys_id,
        .get_stats_count        = bnx2_get_stats_count,
        .get_ethtool_stats      = bnx2_get_ethtool_stats,
+       .get_perm_addr          = ethtool_op_get_perm_addr,
 };
 
 /* Called with rtnl_lock */
@@ -5441,6 +5439,7 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        pci_set_drvdata(pdev, dev);
 
        memcpy(dev->dev_addr, bp->mac_addr, 6);
+       memcpy(dev->perm_addr, bp->mac_addr, 6);
        bp->name = board_info[ent->driver_data].name,
        printk(KERN_INFO "%s: %s (%c%d) PCI%s %s %dMHz found at mem %lx, "
                "IRQ %d, ",