regression: Wrong device reset in port_event()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Hans de Goede, Sarah, Mathias,

This is about a regression caused by commit a82b76f7f usb: Reset USB-3
devices on USB-3 link bounce.

When we do some stress remote wakeup tests with usb3 internal roothub
autosuspend enabled, it's found that hub thread calling the port_event()
may run before handle_port_status() clears the PLC. Thus, port_event()
hits the condition of PLC && U0 && Superspeed and wrongly reset the
device.

Things happen like this:
1. device initiates the resume
2. xHCI receives the port change, handle_port_status() resume the
roothub.
portsc is in RESUME and set link to U0.
3. hub_active() finds portsc in RESUME state and sets the
hub->change_bits and kick the hub.
4. link change RESUME->U0 happens, but irq is not generated or processed
yet.
5. port_event() finds portsc is 0x401203 (PLC && U0), and reset the
device.
6. irq is generated now for point 4. But it's too late.

The problem is that port_event() falls in the gap between RESUME->U0
transtion (portsc 0x401203) and port change irq is generated and
processed.

I'd say this is a regression of commit a82b76f7 due to the PLC && U0 &&
Superspeed condition can also be met in remote wakeup case.

Do you have a suggestion to fix the issue? Or should we revert this
commit?

Thanks
Jincan

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux