diff options
author | Dexuan Cui <[email protected]> | 2017-02-10 15:18:46 -0600 |
---|---|---|
committer | Bjorn Helgaas <[email protected]> | 2017-02-10 15:18:46 -0600 |
commit | 60e2e2fbafdd1285ae1b4ad39ded41603e0c74d0 (patch) | |
tree | 89411eee5297b4826abd97b67d91ba53ca86dc81 /lib/netdev-notifier-error-inject.c | |
parent | 7ce7d89f48834cefece7804d38fc5d85382edf77 (diff) |
PCI: hv: Fix wslot_to_devfn() to fix warnings on device removal
The devfn of 00:02.0 is 0x10. devfn_to_wslot(0x10) == 0x2, and
wslot_to_devfn(0x2) should be 0x10, while it's 0x2 in the current code.
Due to this, hv_eject_device_work() -> pci_get_domain_bus_and_slot()
returns NULL and pci_stop_and_remove_bus_device() is not called.
Later when the real device driver's .remove() is invoked by
hv_pci_remove() -> pci_stop_root_bus(), some warnings can be noticed
because the VM has lost the access to the underlying device at that
time.
Signed-off-by: Jake Oshins <[email protected]>
Signed-off-by: Dexuan Cui <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Acked-by: Haiyang Zhang <[email protected]>
CC: [email protected]
CC: K. Y. Srinivasan <[email protected]>
CC: Stephen Hemminger <[email protected]>
Diffstat (limited to 'lib/netdev-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions