Merge branch 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wirel...
[powerpc.git] / drivers / net / wireless / bcm43xx / bcm43xx_main.c
index 23aaf1e..2e400aa 100644 (file)
@@ -95,13 +95,9 @@ static int modparam_noleds;
 module_param_named(noleds, modparam_noleds, int, 0444);
 MODULE_PARM_DESC(noleds, "Turn off all LED activity");
 
-#ifdef CONFIG_BCM43XX_DEBUG
 static char modparam_fwpostfix[64];
 module_param_string(fwpostfix, modparam_fwpostfix, 64, 0444);
-MODULE_PARM_DESC(fwpostfix, "Postfix for .fw files. Useful for debugging.");
-#else
-# define modparam_fwpostfix  ""
-#endif /* CONFIG_BCM43XX_DEBUG*/
+MODULE_PARM_DESC(fwpostfix, "Postfix for .fw files. Useful for using multiple firmware image versions.");
 
 
 /* If you want to debug with just a single device, enable this,
@@ -2983,8 +2979,10 @@ static int bcm43xx_chipset_attach(struct bcm43xx_private *bcm)
        err = bcm43xx_pctl_set_crystal(bcm, 1);
        if (err)
                goto out;
-       bcm43xx_pci_read_config16(bcm, PCI_STATUS, &pci_status);
-       bcm43xx_pci_write_config16(bcm, PCI_STATUS, pci_status & ~PCI_STATUS_SIG_TARGET_ABORT);
+       err = bcm43xx_pci_read_config16(bcm, PCI_STATUS, &pci_status);
+       if (err)
+               goto out;
+       err = bcm43xx_pci_write_config16(bcm, PCI_STATUS, pci_status & ~PCI_STATUS_SIG_TARGET_ABORT);
 
 out:
        return err;
@@ -3796,12 +3794,18 @@ static int bcm43xx_attach_board(struct bcm43xx_private *bcm)
        }
        net_dev->base_addr = (unsigned long)bcm->mmio_addr;
 
-       bcm43xx_pci_read_config16(bcm, PCI_SUBSYSTEM_VENDOR_ID,
+       err = bcm43xx_pci_read_config16(bcm, PCI_SUBSYSTEM_VENDOR_ID,
                                  &bcm->board_vendor);
-       bcm43xx_pci_read_config16(bcm, PCI_SUBSYSTEM_ID,
+       if (err)
+               goto err_iounmap;
+       err = bcm43xx_pci_read_config16(bcm, PCI_SUBSYSTEM_ID,
                                  &bcm->board_type);
-       bcm43xx_pci_read_config16(bcm, PCI_REVISION_ID,
+       if (err)
+               goto err_iounmap;
+       err = bcm43xx_pci_read_config16(bcm, PCI_REVISION_ID,
                                  &bcm->board_revision);
+       if (err)
+               goto err_iounmap;
 
        err = bcm43xx_chipset_attach(bcm);
        if (err)
@@ -3892,6 +3896,7 @@ err_pci_release:
        pci_release_regions(pci_dev);
 err_pci_disable:
        pci_disable_device(pci_dev);
+       printk(KERN_ERR PFX "Unable to attach board\n");
        goto out;
 }