Huawei Xie ac5e1d838d virtio: skip error when probing kernel managed device
virtio PMD could use IO port to configure the virtio device without
using UIO/VFIO driver in legacy mode.

There are two issues with previous implementation:
1) virtio PMD will take over the virtio device(s) blindly even if not
intended for DPDK.
2) driver conflict between virtio PMD and virtio-net kernel driver.

This patch checks if there is kernel driver other than UIO/VFIO managing
the virtio device before using port IO.

If legacy_virtio_resource_init fails and kernel driver other than
VFIO/UIO is managing the device, return 1 to tell the upper layer we
don't take over this device.
For all other IO port mapping errors, return -1.

Note than if VFIO/UIO fails, now we don't fall back to port IO.

Fixes: da978dfdc43b ("virtio: use port IO to get PCI resource")

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>
2016-03-10 00:36:51 +01:00
..
2016-03-04 16:01:15 +01:00
2016-03-04 16:01:15 +01:00
2016-03-04 16:01:15 +01:00
2016-03-09 01:51:00 +01:00
2016-03-03 20:39:47 +01:00
2016-03-04 16:01:15 +01:00
2015-11-03 18:46:52 +01:00
2015-11-23 23:51:14 +01:00
2016-03-04 16:01:15 +01:00
2016-03-04 16:01:15 +01:00