Commit dc12d359 authored by Scott Feldman's avatar Scott Feldman Committed by Stephen Hemminger

[e100] trying to pci_alloc before pci_enable

* Some archs don't like calling pci_alloc_consistent before calling
pci_enable_device.  (Imagine that).  This corrects that.
parent aae84e64
...@@ -572,10 +572,6 @@ e100_found1(struct pci_dev *pcid, const struct pci_device_id *ent) ...@@ -572,10 +572,6 @@ e100_found1(struct pci_dev *pcid, const struct pci_device_id *ent)
pci_set_drvdata(pcid, dev); pci_set_drvdata(pcid, dev);
SET_NETDEV_DEV(dev, &pcid->dev); SET_NETDEV_DEV(dev, &pcid->dev);
if ((rc = e100_alloc_space(bdp)) != 0) {
goto err_dev;
}
bdp->flags = 0; bdp->flags = 0;
bdp->ifs_state = 0; bdp->ifs_state = 0;
bdp->ifs_value = 0; bdp->ifs_value = 0;
...@@ -592,7 +588,11 @@ e100_found1(struct pci_dev *pcid, const struct pci_device_id *ent) ...@@ -592,7 +588,11 @@ e100_found1(struct pci_dev *pcid, const struct pci_device_id *ent)
bdp->watchdog_timer.function = (void *) &e100_watchdog; bdp->watchdog_timer.function = (void *) &e100_watchdog;
if ((rc = e100_pci_setup(pcid, bdp)) != 0) { if ((rc = e100_pci_setup(pcid, bdp)) != 0) {
goto err_dealloc; goto err_dev;
}
if ((rc = e100_alloc_space(bdp)) != 0) {
goto err_pci;
} }
if (((bdp->pdev->device > 0x1030) if (((bdp->pdev->device > 0x1030)
...@@ -637,7 +637,7 @@ e100_found1(struct pci_dev *pcid, const struct pci_device_id *ent) ...@@ -637,7 +637,7 @@ e100_found1(struct pci_dev *pcid, const struct pci_device_id *ent)
NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
if ((rc = register_netdev(dev)) != 0) { if ((rc = register_netdev(dev)) != 0) {
goto err_pci; goto err_dealloc;
} }
e100_check_options(e100nics, bdp); e100_check_options(e100nics, bdp);
...@@ -688,12 +688,12 @@ e100_found1(struct pci_dev *pcid, const struct pci_device_id *ent) ...@@ -688,12 +688,12 @@ e100_found1(struct pci_dev *pcid, const struct pci_device_id *ent)
err_unregister_netdev: err_unregister_netdev:
unregister_netdev(dev); unregister_netdev(dev);
err_dealloc:
e100_dealloc_space(bdp);
err_pci: err_pci:
iounmap(bdp->scb); iounmap(bdp->scb);
pci_release_regions(pcid); pci_release_regions(pcid);
pci_disable_device(pcid); pci_disable_device(pcid);
err_dealloc:
e100_dealloc_space(bdp);
err_dev: err_dev:
pci_set_drvdata(pcid, NULL); pci_set_drvdata(pcid, NULL);
kfree(dev); kfree(dev);
......
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