usb/hcd: Send a uevent signaling that the host controller had died
authorRaul E Rangel <rrangel@chromium.org>
Fri, 19 Apr 2019 15:30:22 +0000 (09:30 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Apr 2019 09:07:09 +0000 (11:07 +0200)
commita4d6a2989dc3f2f2bcd25ca53dd187a1de68ffac
treebe1cc927a84425028d072fbe6a4d95c63b84a403
parentcf28369c634fafb5f4e81750cba6988cdb4b4490
usb/hcd: Send a uevent signaling that the host controller had died

This change will send an OFFLINE event to udev with the ERROR=DEAD
environment variable set when the HC dies.

By notifying user space the appropriate policies can be applied.
i.e.,
 * Collect error logs.
 * Notify the user that USB is no longer functional.
 * Perform a graceful reboot.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/ABI/testing/usb-uevent [new file with mode: 0644]
drivers/usb/core/hcd.c
include/linux/usb/hcd.h