aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/thunderbolt
diff options
context:
space:
mode:
authorMaxim Levitsky <mlevitsk@redhat.com>2020-05-20 21:52:21 +0300
committerMika Westerberg <mika.westerberg@linux.intel.com>2020-05-25 11:48:03 +0300
commit4caf2511ec498277333d229f8a7ad1fa9331df65 (patch)
tree56503bd7a254bf02c7cc9dea5a3643860897827d /drivers/thunderbolt
parentthunderbolt: Update Kconfig to allow building on other architectures. (diff)
downloadwireguard-linux-4caf2511ec498277333d229f8a7ad1fa9331df65.tar.xz
wireguard-linux-4caf2511ec498277333d229f8a7ad1fa9331df65.zip
thunderbolt: Add trivial .shutdown
On my machine, a kexec with this driver loaded in the old kernel causes a very long delay on boot in the kexec'ed kernel, most likely due to unclean shutdown prior to that. Unloading thunderbolt driver prior to kexec allows kexec to work as fast as regular kernel boot, as well as adding this .shutdown pointer. Shutting a device prior to the shutdown completely is always a good idea IMHO to help with kexec, and this one-liner patch implements it. Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt')
-rw-r--r--drivers/thunderbolt/nhi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c
index 2e51d06e8e8d..d299dc168147 100644
--- a/drivers/thunderbolt/nhi.c
+++ b/drivers/thunderbolt/nhi.c
@@ -1289,6 +1289,7 @@ static struct pci_driver nhi_driver = {
.id_table = nhi_ids,
.probe = nhi_probe,
.remove = nhi_remove,
+ .shutdown = nhi_remove,
.driver.pm = &nhi_pm_ops,
};