Commit aec2e33b authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

scripts/setup: Fix driver printout



In case given device was not bound to any driver it was returning
just an empty string. So changing something like this:

0000:5d:05.5 (8086 201d): WARNING: 10000:00:02.0 not bound to vfio-pci ()

into:

0000:5d:05.5 (8086 201d): WARNING: 10000:00:02.0 not bound to vfio-pci (no driver)

Change-Id: I8cb7795c39350bbe1bb22a778b777cacefc7fd7a
Signed-off-by: default avatarMichal Berger <michal.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/21874


Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
parent 4f8177b5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -193,11 +193,11 @@ function linux_bind_driver() {
				continue
			fi
			# See what DPDK considers to be a "viable" iommu group: dpdk/lib/eal/linux/eal_vfio.c -> rte_vfio_setup_device()
			pci_dev_echo "$bdf" "WARNING: ${_bdf##*/} not bound to $driver_name (${_driver##*/})"
			pci_dev_echo "$bdf" "WARNING: ${_bdf##*/} not bound to $driver_name (${_driver:-no driver})"
			pci_dev_echo "$bdf" "WARNING All devices in the IOMMU group must be bound to the same driver or unbound"
			if [[ $UNBIND_ENTIRE_IOMMU_GROUP == yes ]]; then
				pci_dev_echo "$bdf" "WARNING: Attempting to unbind ${_bdf##*/}"
				pci_bus_driver["${_bdf##*/}"]=${_driver##*/}
				pci_bus_driver["${_bdf##*/}"]=$_driver
				probe_driver "${_bdf##*/}" none
			fi
		done