kernel_samsung_a53x/drivers/usb/core
Oliver Neukum 6d50d6ed53 USB: hub: check for alternate port before enabling A_ALT_HNP_SUPPORT
commit f17c34ffc792bbb520e4b61baa16b6cfc7d44b13 upstream.

The OTG 1.3 spec has the feature A_ALT_HNP_SUPPORT, which tells
a device that it is connected to the wrong port. Some devices
refuse to operate if you enable that feature, because it indicates
to them that they ought to request to be connected to another port.

According to the spec this feature may be used based only the following
three conditions:

6.5.3 a_alt_hnp_support
Setting this feature indicates to the B-device that it is connected to
an A-device port that is not capable of HNP, but that the A-device does
have an alternate port that is capable of HNP.
The A-device is required to set this feature under the following conditions:
• the A-device has multiple receptacles
• the A-device port that connects to the B-device does not support HNP
• the A-device has another port that does support HNP

A check for the third and first condition is missing. Add it.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Cc: stable <stable@kernel.org>
Fixes: 7d2d641c44269 ("usb: otg: don't set a_alt_hnp_support feature for OTG 2.0 device")
Link: https://lore.kernel.org/r/20240122153545.12284-1-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-18 12:13:29 +01:00
..
buffer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
config.c usb: config: fix iteration issue in 'usb_get_bos_descriptor()' 2024-11-18 12:11:10 +01:00
devices.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
devio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
driver.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
endpoint.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
file.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
generic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hcd-pci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hcd.c usb: core: Track SuperSpeed Plus GenXxY 2024-11-08 11:26:12 +01:00
hub.c USB: hub: check for alternate port before enabling A_ALT_HNP_SUPPORT 2024-11-18 12:13:29 +01:00
hub.h usb: hub: Guard against accesses to uninitialized BOS descriptors 2024-11-08 11:26:08 +01:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ledtrig-usbport.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
message.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
notify.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
of.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
otg_productlist.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
phy.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
phy.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
port.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
quirks.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sysfs.c driver core: Move the "removable" attribute from USB to core 2024-11-18 12:11:13 +01:00
urb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
usb-acpi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
usb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
usb.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
usb_host_certify.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00