]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
PCI: hv: Do not wait forever on a device that has disappeared
authorDexuan Cui <decui@microsoft.com>
Wed, 23 May 2018 21:12:01 +0000 (21:12 +0000)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 5 Sep 2018 08:30:45 +0000 (10:30 +0200)
commit5e10a2fa97e988b697926cb331baae95dc706d88
treeb2c17dbfd2b6024997ec74dedd557003c0bfb56b
parenteb7a315bbb8997b60d2c609b682a11582b257b4d
PCI: hv: Do not wait forever on a device that has disappeared

BugLink: http://bugs.launchpad.net/bugs/1789666
commit c3635da2a336441253c33298b87b3042db100725 upstream.

Before the guest finishes the device initialization, the device can be
removed anytime by the host, and after that the host won't respond to
the guest's request, so the guest should be prepared to handle this
case.

Add a polling mechanism to detect device presence.

Signed-off-by: Dexuan Cui <decui@microsoft.com>
[lorenzo.pieralisi@arm.com: edited commit log]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/pci/host/pci-hyperv.c