Commit 5d0d4b91 authored by Baoquan He's avatar Baoquan He Committed by David S. Miller

Revert "bnx2: Reset device during driver initialization"

This reverts commit 3e1be7ad.

When people build bnx2 driver into kernel, it will fail to detect
and load firmware because firmware is contained in initramfs and
initramfs has not been uncompressed yet during do_initcalls. So
revert commit 3e1be7ad and work out a new way in the later patch.
Signed-off-by: default avatarBaoquan He <bhe@redhat.com>
Acked-by: default avatarPaul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7020637b
...@@ -6361,6 +6361,10 @@ bnx2_open(struct net_device *dev) ...@@ -6361,6 +6361,10 @@ bnx2_open(struct net_device *dev)
struct bnx2 *bp = netdev_priv(dev); struct bnx2 *bp = netdev_priv(dev);
int rc; int rc;
rc = bnx2_request_firmware(bp);
if (rc < 0)
goto out;
netif_carrier_off(dev); netif_carrier_off(dev);
bnx2_disable_int(bp); bnx2_disable_int(bp);
...@@ -6429,6 +6433,7 @@ bnx2_open(struct net_device *dev) ...@@ -6429,6 +6433,7 @@ bnx2_open(struct net_device *dev)
bnx2_free_irq(bp); bnx2_free_irq(bp);
bnx2_free_mem(bp); bnx2_free_mem(bp);
bnx2_del_napi(bp); bnx2_del_napi(bp);
bnx2_release_firmware(bp);
goto out; goto out;
} }
...@@ -8575,12 +8580,6 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -8575,12 +8580,6 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
pci_set_drvdata(pdev, dev); pci_set_drvdata(pdev, dev);
rc = bnx2_request_firmware(bp);
if (rc < 0)
goto error;
bnx2_reset_chip(bp, BNX2_DRV_MSG_CODE_RESET);
memcpy(dev->dev_addr, bp->mac_addr, ETH_ALEN); memcpy(dev->dev_addr, bp->mac_addr, ETH_ALEN);
dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_SG | dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_SG |
...@@ -8613,7 +8612,6 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -8613,7 +8612,6 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
return 0; return 0;
error: error:
bnx2_release_firmware(bp);
pci_iounmap(pdev, bp->regview); pci_iounmap(pdev, bp->regview);
pci_release_regions(pdev); pci_release_regions(pdev);
pci_disable_device(pdev); pci_disable_device(pdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment