]> git.hungrycats.org Git - linux/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Jun 2018 20:43:19 +0000 (22:43 +0200)
commit2d3cc89eb0d36f1b8e83f15304332a21595d6b2b
tree253f490adf6dfafd4ef8dbe1b1e4f6272a12a84d
parent53d26741c95ef24424c08415110c6bd1dec13bec
PCI: hv: Do not wait forever on a device that has disappeared

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>
drivers/pci/host/pci-hyperv.c