usb: usb-acpi: Set port connect type of not connectable ports correctly
authorMathias Nyman <mathias.nyman@linux.intel.com>
Fri, 23 Feb 2024 14:03:05 +0000 (16:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Mar 2024 13:06:21 +0000 (13:06 +0000)
commitf3ac348e6e04501479fecf55250b25ff2092540b
tree150a3ca524871782140d3c6a2137094fdfea5795
parent41717b88abf1cacd953e9ea2ace2f62eaf763c48
usb: usb-acpi: Set port connect type of not connectable ports correctly

Ports with  _UPC (USB Port Capability) ACPI objects stating they are
"not connectable" are not wired to any connector or internal device.
They only exist inside the host controller.

These ports may not have an ACPI _PLD (Physical Location of Device)
object.

Rework the code so that _UPC is read even if _PLD does not exist, and
make sure the port->connect_type is set to "USB_PORT_NOT_USED" instead
of "USB_PORT_CONNECT_TYPE_UNKNOWN".

No bugs or known issues are reported due to possibly not parsing _UPC,
and thus leaving the port connect type as "unknown" instead of
"not used". Nice to have this fixed but no need to add it to stable
kernels, or urgency to get it upstream.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20240223140305.185182-1-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/usb-acpi.c