bus/pci: fix resource mapping override
authorQi Zhang <qi.z.zhang@intel.com>
Tue, 30 Oct 2018 15:27:20 +0000 (23:27 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 31 Oct 2018 18:43:34 +0000 (19:43 +0100)
commit55e411b301c31ec8a0096f0f8d92cb544bd8274b
treed99101d96d7c5614b47699cafe22eb7ba02e7be2
parent04854a39e6f61a376bf3cc93087dfc15ab31e3be
bus/pci: fix resource mapping override

When scanning an already plugged device, the virtual address
of mapped PCI resource in rte_pci_device will be overridden
with 0, that may cause driver does not work correctly.
The fix is not to update any rte_pci_device's field if the being
scanned device's driver is already probed.

Bugzilla ID: 85
Fixes: c752998b5e2e ("pci: introduce library and driver")
Cc: stable@dpdk.org
Reported-by: Geoffrey Lv <geoffrey.lv@gmail.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/bus/pci/linux/pci.c