Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Maxim Levitsky and committed by
Mika Westerberg
4caf2511 eb4a6de4

+1
+1
drivers/thunderbolt/nhi.c
··· 1289 1289 .id_table = nhi_ids, 1290 1290 .probe = nhi_probe, 1291 1291 .remove = nhi_remove, 1292 + .shutdown = nhi_remove, 1292 1293 .driver.pm = &nhi_pm_ops, 1293 1294 }; 1294 1295