aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/e1000/e1000_main.c')
-rw-r--r--drivers/net/e1000/e1000_main.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 7c5b05a82f0e..d4ee8ec34b56 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -926,8 +926,6 @@ e1000_probe(struct pci_dev *pdev,
926{ 926{
927 struct net_device *netdev; 927 struct net_device *netdev;
928 struct e1000_adapter *adapter; 928 struct e1000_adapter *adapter;
929 unsigned long mmio_start, mmio_len;
930 unsigned long flash_start, flash_len;
931 929
932 static int cards_found = 0; 930 static int cards_found = 0;
933 static int global_quad_port_a = 0; /* global ksp3 port a indication */ 931 static int global_quad_port_a = 0; /* global ksp3 port a indication */
@@ -970,11 +968,9 @@ e1000_probe(struct pci_dev *pdev,
970 adapter->hw.back = adapter; 968 adapter->hw.back = adapter;
971 adapter->msg_enable = (1 << debug) - 1; 969 adapter->msg_enable = (1 << debug) - 1;
972 970
973 mmio_start = pci_resource_start(pdev, BAR_0);
974 mmio_len = pci_resource_len(pdev, BAR_0);
975
976 err = -EIO; 971 err = -EIO;
977 adapter->hw.hw_addr = ioremap(mmio_start, mmio_len); 972 adapter->hw.hw_addr = ioremap(pci_resource_start(pdev, BAR_0),
973 pci_resource_len(pdev, BAR_0));
978 if (!adapter->hw.hw_addr) 974 if (!adapter->hw.hw_addr)
979 goto err_ioremap; 975 goto err_ioremap;
980 976
@@ -1009,10 +1005,6 @@ e1000_probe(struct pci_dev *pdev,
1009#endif 1005#endif
1010 strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1); 1006 strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1);
1011 1007
1012 netdev->mem_start = mmio_start;
1013 netdev->mem_end = mmio_start + mmio_len;
1014 netdev->base_addr = adapter->hw.io_base;
1015
1016 adapter->bd_number = cards_found; 1008 adapter->bd_number = cards_found;
1017 1009
1018 /* setup the private structure */ 1010 /* setup the private structure */
@@ -1025,9 +1017,9 @@ e1000_probe(struct pci_dev *pdev,
1025 * because it depends on mac_type */ 1017 * because it depends on mac_type */
1026 if ((adapter->hw.mac_type == e1000_ich8lan) && 1018 if ((adapter->hw.mac_type == e1000_ich8lan) &&
1027 (pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) { 1019 (pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) {
1028 flash_start = pci_resource_start(pdev, 1); 1020 adapter->hw.flash_address =
1029 flash_len = pci_resource_len(pdev, 1); 1021 ioremap(pci_resource_start(pdev, 1),
1030 adapter->hw.flash_address = ioremap(flash_start, flash_len); 1022 pci_resource_len(pdev, 1));
1031 if (!adapter->hw.flash_address) 1023 if (!adapter->hw.flash_address)
1032 goto err_flashmap; 1024 goto err_flashmap;
1033 } 1025 }