vpp_device: fix vpp device kernel driver binding 75/30175/1
authorJuraj Linkeš <juraj.linkes@pantheon.tech>
Fri, 13 Nov 2020 12:46:20 +0000 (13:46 +0100)
committerJuraj Linke? <juraj.linkes@pantheon.tech>
Fri, 4 Dec 2020 12:43:42 +0000 (12:43 +0000)
commit7ee96d31b8f023c85c75c4ab4fd9b82457353ed8
tree4e8207c239ce3fea893bf291ababe4d082133181
parent60a06503ceff24eb2abf670dc899e294838b14f8
vpp_device: fix vpp device kernel driver binding

Attempt to unbind a driver from a device only if it is bound to a
driver.

Remove the dynamic addition of an existing device ID to a driver. From
the docs [0]:
Writing a device ID to this file will attempt to
dynamically add a new device ID to a PCI device driver.

Since we assume the VFs are bound to the kernel driver when VPP Device
topology creation is done, it implies that the kernel driver supports
the device ID of those VFs, removing the need to add the support.

[0]: https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-pci

Change-Id: I20f3ca071a5a84a06ff358ba514532248a8f9ad0
Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
(cherry picked from commit 71d7150a65a7c006bf46b2c1001dbaa00b5681fb)
resources/libraries/bash/function/device.sh