Part Number: AM5728
In the previous thread, the USB driver software required patching since the AM5728 does not support USB2.0 LPM.
In the latest USB driver source code, it doesn't seem to check that the USB port (host) supports USB2.0 LPM before enabling USB2.0 hardware LPM.
https://elixir.bootlin.com/linux/v5.3.12/source/drivers/usb/core/hub.c#L4468
/*
* There are reports of USB 3.0 devices that say they support USB 2.0 Link PM
* when they're plugged into a USB 2.0 port, but they don't work when LPM is
* enabled.
*
* Only enable USB 2.0 Link PM if the port is internal (hardwired), or the
* device says it supports the new USB 2.0 Link PM errata by setting the BESL
* support bit in the BOS descriptor.
*/
static void hub_set_initial_usb2_lpm_policy(struct usb_device *udev)
{
struct usb_hub *hub = usb_hub_to_struct_hub(udev->parent);
int connect_type = USB_PORT_CONNECT_TYPE_UNKNOWN;
if (!udev->usb2_hw_lpm_capable || !udev->bos)
return;
if (hub)
connect_type = hub->ports[udev->portnum - 1]->connect_type;
if ((udev->bos->ext_cap->bmAttributes & cpu_to_le32(USB_BESL_SUPPORT)) ||
connect_type == USB_PORT_CONNECT_TYPE_HARD_WIRED) {
udev->usb2_hw_lpm_allowed = 1;
usb_enable_usb2_hardware_lpm(udev);
}
}
Should the above source code be changed to not enable USB 2.0 hardware LPM in all cases?
Are there any changes required other than the above source code?
Our customer has a problem that some USB flash drive does not work with WEC7 on a custom board. If the WEC7 USB driver has the same issue, it will be changed with reference to the Linux USB driver.
Best regards,
Daisuke