aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r--drivers/net/bnx2.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 5502b9aeda53..64b6a72b4f6a 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -5575,13 +5575,12 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
5575 /* enable device (incl. PCI PM wakeup), and bus-mastering */ 5575 /* enable device (incl. PCI PM wakeup), and bus-mastering */
5576 rc = pci_enable_device(pdev); 5576 rc = pci_enable_device(pdev);
5577 if (rc) { 5577 if (rc) {
5578 dev_printk(KERN_ERR, &pdev->dev, 5578 dev_err(&pdev->dev, "Cannot enable PCI device, aborting.");
5579 "Cannot enable PCI device, aborting.");
5580 goto err_out; 5579 goto err_out;
5581 } 5580 }
5582 5581
5583 if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) { 5582 if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) {
5584 dev_printk(KERN_ERR, &pdev->dev, 5583 dev_err(&pdev->dev,
5585 "Cannot find PCI device base address, aborting.\n"); 5584 "Cannot find PCI device base address, aborting.\n");
5586 rc = -ENODEV; 5585 rc = -ENODEV;
5587 goto err_out_disable; 5586 goto err_out_disable;
@@ -5589,8 +5588,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
5589 5588
5590 rc = pci_request_regions(pdev, DRV_MODULE_NAME); 5589 rc = pci_request_regions(pdev, DRV_MODULE_NAME);
5591 if (rc) { 5590 if (rc) {
5592 dev_printk(KERN_ERR, &pdev->dev, 5591 dev_err(&pdev->dev, "Cannot obtain PCI resources, aborting.\n");
5593 "Cannot obtain PCI resources, aborting.\n");
5594 goto err_out_disable; 5592 goto err_out_disable;
5595 } 5593 }
5596 5594
@@ -5598,7 +5596,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
5598 5596
5599 bp->pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM); 5597 bp->pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM);
5600 if (bp->pm_cap == 0) { 5598 if (bp->pm_cap == 0) {
5601 dev_printk(KERN_ERR, &pdev->dev, 5599 dev_err(&pdev->dev,
5602 "Cannot find power management capability, aborting.\n"); 5600 "Cannot find power management capability, aborting.\n");
5603 rc = -EIO; 5601 rc = -EIO;
5604 goto err_out_release; 5602 goto err_out_release;
@@ -5606,8 +5604,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
5606 5604
5607 bp->pcix_cap = pci_find_capability(pdev, PCI_CAP_ID_PCIX); 5605 bp->pcix_cap = pci_find_capability(pdev, PCI_CAP_ID_PCIX);
5608 if (bp->pcix_cap == 0) { 5606 if (bp->pcix_cap == 0) {
5609 dev_printk(KERN_ERR, &pdev->dev, 5607 dev_err(&pdev->dev, "Cannot find PCIX capability, aborting.\n");
5610 "Cannot find PCIX capability, aborting.\n");
5611 rc = -EIO; 5608 rc = -EIO;
5612 goto err_out_release; 5609 goto err_out_release;
5613 } 5610 }
@@ -5615,15 +5612,14 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
5615 if (pci_set_dma_mask(pdev, DMA_64BIT_MASK) == 0) { 5612 if (pci_set_dma_mask(pdev, DMA_64BIT_MASK) == 0) {
5616 bp->flags |= USING_DAC_FLAG; 5613 bp->flags |= USING_DAC_FLAG;
5617 if (pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK) != 0) { 5614 if (pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK) != 0) {
5618 dev_printk(KERN_ERR, &pdev->dev, 5615 dev_err(&pdev->dev,
5619 "pci_set_consistent_dma_mask failed, aborting.\n"); 5616 "pci_set_consistent_dma_mask failed, aborting.\n");
5620 rc = -EIO; 5617 rc = -EIO;
5621 goto err_out_release; 5618 goto err_out_release;
5622 } 5619 }
5623 } 5620 }
5624 else if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) != 0) { 5621 else if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) != 0) {
5625 dev_printk(KERN_ERR, &pdev->dev, 5622 dev_err(&pdev->dev, "System does not support DMA, aborting.\n");
5626 "System does not support DMA, aborting.\n");
5627 rc = -EIO; 5623 rc = -EIO;
5628 goto err_out_release; 5624 goto err_out_release;
5629 } 5625 }
@@ -5643,8 +5639,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
5643 bp->regview = ioremap_nocache(dev->base_addr, mem_len); 5639 bp->regview = ioremap_nocache(dev->base_addr, mem_len);
5644 5640
5645 if (!bp->regview) { 5641 if (!bp->regview) {
5646 dev_printk(KERN_ERR, &pdev->dev, 5642 dev_err(&pdev->dev, "Cannot map register space, aborting.\n");
5647 "Cannot map register space, aborting.\n");
5648 rc = -ENOMEM; 5643 rc = -ENOMEM;
5649 goto err_out_release; 5644 goto err_out_release;
5650 } 5645 }
@@ -5716,7 +5711,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
5716 else if ((CHIP_ID(bp) == CHIP_ID_5706_A1) && 5711 else if ((CHIP_ID(bp) == CHIP_ID_5706_A1) &&
5717 !(bp->flags & PCIX_FLAG)) { 5712 !(bp->flags & PCIX_FLAG)) {
5718 5713
5719 dev_printk(KERN_ERR, &pdev->dev, 5714 dev_err(&pdev->dev,
5720 "5706 A1 can only be used in a PCIX bus, aborting.\n"); 5715 "5706 A1 can only be used in a PCIX bus, aborting.\n");
5721 goto err_out_unmap; 5716 goto err_out_unmap;
5722 } 5717 }
@@ -5738,8 +5733,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
5738 5733
5739 if ((reg & BNX2_DEV_INFO_SIGNATURE_MAGIC_MASK) != 5734 if ((reg & BNX2_DEV_INFO_SIGNATURE_MAGIC_MASK) !=
5740 BNX2_DEV_INFO_SIGNATURE_MAGIC) { 5735 BNX2_DEV_INFO_SIGNATURE_MAGIC) {
5741 dev_printk(KERN_ERR, &pdev->dev, 5736 dev_err(&pdev->dev, "Firmware not running, aborting.\n");
5742 "Firmware not running, aborting.\n");
5743 rc = -ENODEV; 5737 rc = -ENODEV;
5744 goto err_out_unmap; 5738 goto err_out_unmap;
5745 } 5739 }
@@ -5901,8 +5895,7 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
5901#endif 5895#endif
5902 5896
5903 if ((rc = register_netdev(dev))) { 5897 if ((rc = register_netdev(dev))) {
5904 dev_printk(KERN_ERR, &pdev->dev, 5898 dev_err(&pdev->dev, "Cannot register net device\n");
5905 "Cannot register net device\n");
5906 if (bp->regview) 5899 if (bp->regview)
5907 iounmap(bp->regview); 5900 iounmap(bp->regview);
5908 pci_release_regions(pdev); 5901 pci_release_regions(pdev);