summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsias He <asias.hejun@gmail.com>2014-01-04 14:07:34 +0800
committerThomas Monjalon <thomas.monjalon@6wind.com>2014-01-06 10:13:52 +0100
commit040afd211ddaa8cd55c3462b833c3f6220118aa2 (patch)
tree2302f3f02be64f6888f62c1203b1960d84d3ef12
parentfcacdaf6d110bf8a58d3d259ec1d2746be622492 (diff)
downloadvirtio-net-pmd-040afd211ddaa8cd55c3462b833c3f6220118aa2.zip
virtio-net-pmd-040afd211ddaa8cd55c3462b833c3f6220118aa2.tar.gz
virtio-net-pmd-040afd211ddaa8cd55c3462b833c3f6220118aa2.tar.xz
pmd: fix PCI id match when probing
Hex numbers in /proc/ioports are lowercase. We should make it lowercase in pci_id as well. Otherwise devices like: 00:0a.0 Ethernet controller: Red Hat, Inc Virtio network device would not be handled by virtio-net-pmd. Signed-off-by: Asias He <asias.hejun@gmail.com> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
-rw-r--r--virtio_user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/virtio_user.c b/virtio_user.c
index e864b79..1074bd8 100644
--- a/virtio_user.c
+++ b/virtio_user.c
@@ -1385,7 +1385,7 @@ eth_virtio_dev_init(struct eth_driver *eth_drv, struct rte_eth_dev *eth_dev)
priv->pci_addr = eth_dev->pci_dev->addr;
- snprintf(pci_id, sizeof(pci_id), "%04X:%02X:%02X.%d",
+ snprintf(pci_id, sizeof(pci_id), "%04x:%02x:%02x.%d",
eth_dev->pci_dev->addr.domain,
eth_dev->pci_dev->addr.bus,
eth_dev->pci_dev->addr.devid,