Date: Wed, 15 Jun 2022 21:12:35 GMT From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 8f892e9bee33 - main - XHCI: clear warm and port reset Message-ID: <202206152112.25FLCZGD044927@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8f892e9bee33fda1e2a2efca4b3e8a1949264cac commit 8f892e9bee33fda1e2a2efca4b3e8a1949264cac Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2022-06-14 16:52:45 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2022-06-15 21:10:01 +0000 XHCI: clear warm and port reset 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 old patch mainly debugging other problems MFC after: 2 weeks Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D35483 --- sys/dev/usb/usb_hub.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sys/dev/usb/usb_hub.c b/sys/dev/usb/usb_hub.c index 264c189f6d87..241832011cff 100644 --- a/sys/dev/usb/usb_hub.c +++ b/sys/dev/usb/usb_hub.c @@ -1088,6 +1088,21 @@ uhub_explore(struct usb_device *udev) if (err != USB_ERR_NORMAL_COMPLETION) retval = err; } + if (udev->speed == USB_SPEED_SUPER && + (sc->sc_st.port_change & UPS_C_BH_PORT_RESET) != 0) { + DPRINTF("Warm reset finished on port %u.\n", portno); + err = usbd_req_clear_port_feature( + udev, NULL, portno, UHF_C_BH_PORT_RESET); + if (err != USB_ERR_NORMAL_COMPLETION) + retval = err; + } + if (sc->sc_st.port_change & UPS_C_PORT_RESET) { + DPRINTF("Port reset finished on port %u.\n", portno); + err = usbd_req_clear_port_feature( + udev, NULL, portno, UHF_C_PORT_RESET); + if (err != USB_ERR_NORMAL_COMPLETION) + retval = err; + } if (uhub_explore_sub(sc, up) == USB_ERR_NORMAL_COMPLETION) { /* explore succeeded - reset restart counter */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202206152112.25FLCZGD044927>