b43: Implement RC calibration for rev.0/1 LP-PHYs
[pandora-kernel.git] / drivers / net / r6040.c
index ed63d23..840677f 100644 (file)
@@ -49,8 +49,8 @@
 #include <asm/processor.h>
 
 #define DRV_NAME       "r6040"
-#define DRV_VERSION    "0.23"
-#define DRV_RELDATE    "05May2009"
+#define DRV_VERSION    "0.24"
+#define DRV_RELDATE    "08Jul2009"
 
 /* PHY CHIP Address */
 #define PHY1_ADDR      1       /* For MAC1 */
@@ -704,8 +704,11 @@ static irqreturn_t r6040_interrupt(int irq, void *dev_id)
        /* Read MISR status and clear */
        status = ioread16(ioaddr + MISR);
 
-       if (status == 0x0000 || status == 0xffff)
+       if (status == 0x0000 || status == 0xffff) {
+               /* Restore RDC MAC interrupt */
+               iowrite16(misr, ioaddr + MIER);
                return IRQ_NONE;
+       }
 
        /* RX interrupt request */
        if (status & RX_INTS) {
@@ -1112,13 +1115,13 @@ static int __devinit r6040_init_one(struct pci_dev *pdev,
        }
 
        /* IO Size check */
-       if (pci_resource_len(pdev, 0) < io_size) {
+       if (pci_resource_len(pdev, bar) < io_size) {
                printk(KERN_ERR DRV_NAME ": Insufficient PCI resources, aborting\n");
                err = -EIO;
                goto err_out;
        }
 
-       pioaddr = pci_resource_start(pdev, 0);  /* IO map base address */
+       pioaddr = pci_resource_start(pdev, bar);        /* IO map base address */
        pci_set_master(pdev);
 
        dev = alloc_etherdev(sizeof(struct r6040_private));