OpenCloudOS-Kernel/drivers/usb/core
Dennis Wassenberg 22454b79e6 usb: core: Fix hub port connection events lost
This will clear the USB_PORT_FEAT_C_CONNECTION bit in case of a hub port reset
only if a device is was attached to the hub port before resetting the hub port.

Using a Lenovo T480s attached to the ultra dock it was not possible to detect
some usb-c devices at the dock usb-c ports because the hub_port_reset code
will clear the USB_PORT_FEAT_C_CONNECTION bit after the actual hub port reset.
Using this device combo the USB_PORT_FEAT_C_CONNECTION bit was set between the
actual hub port reset and the clear of the USB_PORT_FEAT_C_CONNECTION bit.
This ends up with clearing the USB_PORT_FEAT_C_CONNECTION bit after the
new device was attached such that it was not detected.

This patch will not clear the USB_PORT_FEAT_C_CONNECTION bit if there is
currently no device attached to the port before the hub port reset.
This will avoid clearing the connection bit for new attached devices.

Signed-off-by: Dennis Wassenberg <dennis.wassenberg@secunet.com>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-14 14:28:26 -08:00
..
Kconfig docs-rst: fix usb cross-references 2017-04-11 14:41:29 -06:00
Makefile usb: core: add a wrapper for the USB PHYs on the HCD 2018-03-09 09:43:53 -08:00
buffer.c USB: Removing NULL check for pool since dma_pool_destroy is safe 2018-09-10 20:01:04 +02:00
config.c USB: Accept bulk endpoints with 1024-byte maxpacket 2018-05-03 10:16:38 -07:00
devices.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
devio.c Merge branch 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2018-10-24 11:22:39 +01:00
driver.c USB: core: remove set but not used variable 'udev' 2018-10-09 16:02:29 +02:00
endpoint.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
file.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
generic.c usbcore: Select UAC3 configuration for audio if present 2018-09-20 13:12:05 +02:00
hcd-pci.c usb: Don't die twice if PCI xhci host is not responding in resume 2018-09-05 14:36:53 +02:00
hcd.c usb: core: remove flags variable in __usb_hcd_giveback_urb() 2018-09-11 10:14:47 +02:00
hub.c usb: core: Fix hub port connection events lost 2018-11-14 14:28:26 -08:00
hub.h usb: hub: Per-port setting to use old enumeration scheme 2018-05-31 12:48:17 +02:00
ledtrig-usbport.c usb: simplify usbport trigger 2018-07-05 23:21:15 +02:00
message.c usb: Avoid use-after-free by flushing endpoints early in usb_set_interface() 2018-09-05 14:36:53 +02:00
notify.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
of.c usb: Change usb_of_get_companion_dev() place to usb/common 2018-09-10 20:40:29 +02:00
otg_whitelist.h USB: core: Remove redundant license text 2017-11-04 11:55:39 +01:00
phy.c usb: core: phy: clean up return value check about devm_of_phy_get_by_index() 2018-09-10 20:09:45 +02:00
phy.h usb: core: phy: add the SPDX-License-Identifier and include guard 2018-04-23 09:41:32 +02:00
port.c usb: export firmware port location in sysfs 2018-10-02 12:05:30 -07:00
quirks.c USB: quirks: Add no-lpm quirk for Raydium touchscreens 2018-11-07 13:23:18 +01:00
sysfs.c USB: USB 3.2 Add sysfs entries for a usb device rx_lanes and tx_lanes 2018-04-22 16:19:26 +02:00
urb.c usb: core: urb: Check SSP isoc ep comp descriptor 2018-03-20 10:13:30 +01:00
usb-acpi.c usb: clarify ACPI spec version and section number for _UPC & _PLD 2018-03-09 09:37:10 -08:00
usb.c USB: handle NULL config in usb_find_alt_setting() 2018-09-20 12:49:12 +02:00
usb.h usb: core: Add "quirks" parameter for usbcore 2018-03-20 10:16:09 +01:00