md/raid5: use conf->raid_disks in preference to mddev->raid_disk
[safe/jmp/linux-2.6] / drivers / net / r6040.c
index cc0f886..6f97b47 100644 (file)
 #include <asm/processor.h>
 
 #define DRV_NAME       "r6040"
-#define DRV_VERSION    "0.21"
-#define DRV_RELDATE    "09Jan2009"
+#define DRV_VERSION    "0.22"
+#define DRV_RELDATE    "25Mar2009"
 
 /* PHY CHIP Address */
 #define PHY1_ADDR      1       /* For MAC1 */
-#define PHY2_ADDR      2       /* For MAC2 */
+#define PHY2_ADDR      3       /* For MAC2 */
 #define PHY_MODE       0x3100  /* PHY CHIP Register 0 */
 #define PHY_CAP                0x01E1  /* PHY CHIP Register 4 */
 
@@ -160,6 +160,7 @@ MODULE_AUTHOR("Sten Wang <sten.wang@rdc.com.tw>,"
        "Florian Fainelli <florian@openwrt.org>");
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("RDC R6040 NAPI PCI FastEthernet driver");
+MODULE_VERSION(DRV_VERSION " " DRV_RELDATE);
 
 /* RX and TX interrupts that we handle */
 #define RX_INTS                        (RX_FIFO_FULL | RX_NO_DESC | RX_FINISH)
@@ -438,7 +439,6 @@ static void r6040_down(struct net_device *dev)
 {
        struct r6040_private *lp = netdev_priv(dev);
        void __iomem *ioaddr = lp->base;
-       struct pci_dev *pdev = lp->pdev;
        int limit = 2048;
        u16 *adrp;
        u16 cmd;
@@ -485,12 +485,12 @@ static int r6040_close(struct net_device *dev)
        /* Free Descriptor memory */
        if (lp->rx_ring) {
                pci_free_consistent(pdev, RX_DESC_SIZE, lp->rx_ring, lp->rx_ring_dma);
-               lp->rx_ring = 0;
+               lp->rx_ring = NULL;
        }
 
        if (lp->tx_ring) {
                pci_free_consistent(pdev, TX_DESC_SIZE, lp->tx_ring, lp->tx_ring_dma);
-               lp->tx_ring = 0;
+               lp->tx_ring = NULL;
        }
 
        return 0;
@@ -1086,13 +1086,13 @@ static int __devinit r6040_init_one(struct pci_dev *pdev,
                goto err_out;
 
        /* this should always be supported */
-       err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (err) {
                printk(KERN_ERR DRV_NAME ": 32-bit PCI DMA addresses"
                                "not supported by the card\n");
                goto err_out;
        }
-       err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+       err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
        if (err) {
                printk(KERN_ERR DRV_NAME ": 32-bit PCI DMA addresses"
                                "not supported by the card\n");