]> git.ipfire.org Git - people/arne_f/kernel.git/commit
usb: xhci: fix return value of xhci_setup_device()
authorLu Baolu <baolu.lu@linux.intel.com>
Tue, 3 Jan 2017 16:28:44 +0000 (18:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2017 10:39:12 +0000 (11:39 +0100)
commita2118d0974095b994a8aa7b32a6a213b961f4f3e
treeccfed037d3abc167b24036e260a8ed7c2868f785
parent3bf5e7410178eb0f95f2c51c984d67b77a8e61d3
usb: xhci: fix return value of xhci_setup_device()

commit 90797aee5d6902b49a453c97d83c326408aeb5a8 upstream.

xhci_setup_device() should return failure with correct error number
when xhci host has died, removed or halted.

During usb device enumeration, if usb host is not accessible (died,
removed or halted), the hc_driver->address_device() should return
a corresponding error code to usb core. But current xhci driver just
returns success. This misleads usb core to continue the enumeration
by reading the device descriptor, which will result in failure, and
users will get a misleading message like "device descriptor read/8,
error -110".

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci.c