]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xhci: Don't print a warning when setting link state for disabled ports
authorMathias Nyman <mathias.nyman@linux.intel.com>
Mon, 12 Feb 2018 12:24:47 +0000 (14:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Oct 2018 07:16:25 +0000 (09:16 +0200)
commit7a4f9efdb213fc5ae014b3a551a1364b94cd2533
tree517edd5bb2d1fee1f7cf596b257b64fd8b349c34
parent74a960430a8d01c33844884a382264599072d3c8
xhci: Don't print a warning when setting link state for disabled ports

commit 1208d8a84fdcae6b395c57911cdf907450d30e70 upstream.

When disabling a USB3 port the hub driver will set the port link state to
U3 to prevent "ejected" or "safely removed" devices that are still
physically connected from immediately re-enumerating.

If the device was really unplugged, then error messages were printed
as the hub tries to set the U3 link state for a port that is no longer
enabled.

xhci-hcd ee000000.usb: Cannot set link state.
usb usb8-port1: cannot disable (err = -32)

Don't print error message in xhci-hub if hub tries to set port link state
for a disabled port. Return -ENODEV instead which also silences hub driver.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Ross Zwisler <zwisler@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-hub.c