[PATCH] common: usb-hub: Reset hub port before scanning

Marek Vasut marex at denx.de
Sun Nov 19 21:53:03 CET 2023


On 11/10/23 15:13, Shantur Rathore wrote:
> Currently when a hub is turned on, all the ports are powered on.
> This works well for hubs which have individual power control.
> 
> For the hubs without individual power control this has no effect.

OK

> Mostly in these scenarios the hub port is powered before the USB
> controller is enabled, this can lead to some devices in unexpected
> state.

This ^ part needs clarification.

Which devices are in incorrect state, the ones connected to the hub 
downstream facing ports ?

> With this patch, we explicitly reset the port while powering up hub
> This resets the port for hubs without port power control and has
> no effect on hubs with port power control as the port is still off.

Should common/usb_hub.c usb_hub_port_connect_change() trigger the reset?

Could it be you do not get a connect change event ?

> Before this patch AMicro AM8180 based NVME to USB adapter won't be
> detected as a USB3.0 Mass Storage device but with this it works as
> expected.

Do you have HUB power control ?

I recall there was some companion hub discussion recently.


More information about the U-Boot mailing list