thunderbolt: Prevent root port runtime suspend during NVM upgrade
authorMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 26 Nov 2018 09:47:46 +0000 (12:47 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Dec 2018 08:24:36 +0000 (09:24 +0100)
commit5dda1e7d7ce4afe233d2c2e647634d2f0fd99f9e
treee456bf15658877b8220e26c0536270f73ebaf7d2
parent9ca88f3c4cb5eb6983aaf7492f78e467c0e123e1
thunderbolt: Prevent root port runtime suspend during NVM upgrade

[ Upstream commit 1830b6eeda1fed42d85f2388f79c926331a9b2d0 ]

During NVM upgrade process the host router is hot-removed for a short
while. During this time it is possible that the root port is moved into
D3cold which would be fine if the root port could trigger PME on itself.
However, many systems actually do not implement it so what happens is
that the root port goes into D3cold and never wakes up unless userspace
does PCI config space access, such as running 'lscpi'.

For this reason we explicitly prevent the root port from runtime
suspending during NVM upgrade.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/thunderbolt/switch.c