X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=usertools%2Fdpdk-devbind.py;h=df9b21a6d269798e4df870e81c1583e5115291d7;hb=c3f15def2ebe9cc255cf0e5cf32aa171f5b4326d;hp=da6e40cbe2a4bb2a2a35064b2629608edd55e170;hpb=f239aed5e674965691846e8ce3f187dd47523689;p=deb_dpdk.git diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py index da6e40cb..df9b21a6 100755 --- a/usertools/dpdk-devbind.py +++ b/usertools/dpdk-devbind.py @@ -204,8 +204,7 @@ def check_modules(): # special case for vfio_pci (module is named vfio-pci, # but its .ko is named vfio_pci) - sysfs_mods = map(lambda a: - a if a != 'vfio_pci' else 'vfio-pci', sysfs_mods) + sysfs_mods = [a if a != 'vfio_pci' else 'vfio-pci' for a in sysfs_mods] for mod in mods: if mod["Name"] in sysfs_mods: @@ -279,6 +278,8 @@ def get_device_details(devices_type): # of dictionary key names if "Driver" in dev.keys(): dev["Driver_str"] = dev.pop("Driver") + if "Module" in dev.keys(): + dev["Module_str"] = dev.pop("Module") # use dict to make copy of dev devices[dev["Slot"]] = dict(dev) # Clear previous device's data @@ -540,7 +541,7 @@ def bind_all(dev_list, driver, force=False): for d in dev_list: bind_one(d, driver, force) - # For kenels < 3.15 when binding devices to a generic driver + # For kernels < 3.15 when binding devices to a generic driver # (i.e. one that doesn't have a PCI ID table) using new_id, some devices # that are not bound to any other driver could be bound even if no one has # asked them to. hence, we check the list of drivers again, and see if