Page MenuHomeFreeBSD

XHCI: clear warm and port reset
ClosedPublic

Authored by bz on Jun 14 2022, 4:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 22, 8:25 PM
Unknown Object (File)
Fri, Mar 22, 8:24 PM
Unknown Object (File)
Feb 24 2024, 1:28 AM
Unknown Object (File)
Feb 6 2024, 6:54 PM
Unknown Object (File)
Jan 14 2024, 9:47 AM
Unknown Object (File)
Dec 30 2023, 6:47 AM
Unknown Object (File)
Dec 22 2023, 12:05 PM
Unknown Object (File)
Dec 20 2023, 4:39 AM
Subscribers

Details

Summary

It seems we do not clear UPS_C_BH_PORT_RESET and UPS_C_PORT_RESET
conditions after warm or port reset. Add that code.

Obtained from: an older patch used for debugging

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.Jun 14 2022, 4:55 PM

I have to admit I no longer have a recollection when I did this and what was the cause.
I figured I put it up for review so you can have a look before I'll lose it.

sys/dev/usb/usb_hub.c
1095

Update this to:
if (err != USB_ERR_NORMAL_COMPLETION)
retval = err;

1104

ditto

Good catch! Updated to match current code.

bz marked 2 inline comments as done.Jun 14 2022, 9:31 PM
This revision is now accepted and ready to land.Jun 15 2022, 7:11 AM
sys/dev/usb/usb_hub.c
1091

You might want to check if the device is super-speed before doing this.

sys/dev/usb/usb_hub.c
1091

might -> must, because this bit has different meaning for USB 2.0 !

This revision now requires changes to proceed.Jun 15 2022, 7:16 AM
sys/dev/usb/usb_hub.c
1091
if (udev->speed == USB_SPEED_SUPER) {
,...
}
bz marked 3 inline comments as done.

Check for SUPER_SPEED on the overloaded bit between USB2/3.

This revision is now accepted and ready to land.Jun 15 2022, 7:14 PM
This revision was automatically updated to reflect the committed changes.