usertools: fix device binding with kernel tools
authorGuduri Prathyusha <gprathyusha@caviumnetworks.com>
Wed, 26 Apr 2017 13:52:19 +0000 (19:22 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 30 Apr 2017 13:28:01 +0000 (15:28 +0200)
commit720b7a058260dfd6ae0fcce956bfe44c18681499
treeb257d447cc4500e2c302da19d99aeb80a483d558
parentaafaea3d3b703ce052b7034f7542443cc2d06e32
usertools: fix device binding with kernel tools

The following sequence of operation gives error in binding devices
1) Bind a device using dpdk-devbind.py
2) Unbind the device using kernel tools(/sys/bus/pci/device/driver/unbind)
3) Bind the device using kernel tools(/sys/bus/pci/driver/new_id and
/sys/bus/pci/driver/bind)

The bind failure was due to cached driver name in 'driver_override'.
Fix it by writing 'null' to driver_override just after binding a
device so that any method of binding/unbinding can be used.

Fixes: 2fc350293570 ("usertools: use optimized driver override scheme to bind")

Reported-by: Lijuan A Tu <lijuanx.a.tu@intel.com>
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
usertools/dpdk-devbind.py