summaryrefslogtreecommitdiff
path: root/lib/librte_pmd_e1000
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2013-05-30 19:12:39 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2013-09-17 14:09:22 +0200
commiteee16c964cd6b90622c36a7976ad951313b2ccd3 (patch)
tree138c186cb51c366e497bcbdb67be0033e93771d7 /lib/librte_pmd_e1000
parentc7f4888629bd4a36a34f499f80412369e90a8222 (diff)
downloaddpdk-eee16c964cd6b90622c36a7976ad951313b2ccd3.zip
dpdk-eee16c964cd6b90622c36a7976ad951313b2ccd3.tar.gz
dpdk-eee16c964cd6b90622c36a7976ad951313b2ccd3.tar.xz
pci: support multiple PCI regions per device
Need to change PCI code to support multiple I/O regions on a single device. Some devices like VMXNET3 have multiple PCI memory regions, and some have none. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Intel
Diffstat (limited to 'lib/librte_pmd_e1000')
-rw-r--r--lib/librte_pmd_e1000/em_ethdev.c2
-rw-r--r--lib/librte_pmd_e1000/igb_ethdev.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/librte_pmd_e1000/em_ethdev.c b/lib/librte_pmd_e1000/em_ethdev.c
index b53afc8..2cd6c01 100644
--- a/lib/librte_pmd_e1000/em_ethdev.c
+++ b/lib/librte_pmd_e1000/em_ethdev.c
@@ -233,7 +233,7 @@ eth_em_dev_init(__attribute__((unused)) struct eth_driver *eth_drv,
return 0;
}
- hw->hw_addr = (void *)pci_dev->mem_resource.addr;
+ hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
hw->device_id = pci_dev->id.device_id;
/* For ICH8 support we'll need to map the flash memory BAR */
diff --git a/lib/librte_pmd_e1000/igb_ethdev.c b/lib/librte_pmd_e1000/igb_ethdev.c
index f0071bf..5647dae 100644
--- a/lib/librte_pmd_e1000/igb_ethdev.c
+++ b/lib/librte_pmd_e1000/igb_ethdev.c
@@ -299,10 +299,9 @@ eth_igb_dev_init(__attribute__((unused)) struct eth_driver *eth_drv,
return 0;
}
- hw->hw_addr= (void *)pci_dev->mem_resource.addr;
+ hw->hw_addr= (void *)pci_dev->mem_resource[0].addr;
igb_identify_hardware(eth_dev);
-
if (e1000_setup_init_funcs(hw, TRUE) != E1000_SUCCESS) {
error = -EIO;
goto err_late;
@@ -415,7 +414,7 @@ eth_igbvf_dev_init(__attribute__((unused)) struct eth_driver *eth_drv,
hw->device_id = pci_dev->id.device_id;
hw->vendor_id = pci_dev->id.vendor_id;
- hw->hw_addr = (void *)pci_dev->mem_resource.addr;
+ hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
/* Initialize the shared code */
diag = e1000_setup_init_funcs(hw, TRUE);