From nobody Wed Jun 15 21:12:35 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 51203833922; Wed, 15 Jun 2022 21:12:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LNdLC1fjMz4b0C; Wed, 15 Jun 2022 21:12:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655327555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1lT8QfQ+Tbla6sGXPWu5yAspSUoorFzrKm+Wr4pxVmo=; b=PR8GZqCTffLAx9u5lu0cx5oW7w98GOrxGPRJcmKk6jBJ1frZ85fjZgvEfzzVHJrZTQdUp4 yQITfoH2iIr345C1YxloLWxBla8wVGCcK4EXCJDyJXs38ZZnt8bW9bQfrTcwVH7lMq9EX5 fZ5taVWhRHvHVBOpCxo1U1yAGwOa74sgxoNYA2fnA061akPvicVfraU046uRm0JpK5viga GiZr7dPTg1QkLM+lRfVHjFdpX0JmIGa8N0tAlN0FFhEu7B9cpD43tyuqpXylBSjvOZTCEm Xcemg6dsvuWuRx4aBcwwHlmpWqWozgdbE3xhEZMU8QB7Pu3zaslKqYKE84Xd8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 19A69260A8; Wed, 15 Jun 2022 21:12:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 25FLCZw0044928; Wed, 15 Jun 2022 21:12:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25FLCZGD044927; Wed, 15 Jun 2022 21:12:35 GMT (envelope-from git) Date: Wed, 15 Jun 2022 21:12:35 GMT Message-Id: <202206152112.25FLCZGD044927@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 8f892e9bee33 - main - XHCI: clear warm and port reset List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f892e9bee33fda1e2a2efca4b3e8a1949264cac Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655327555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1lT8QfQ+Tbla6sGXPWu5yAspSUoorFzrKm+Wr4pxVmo=; b=lHfzqEwM0xPo9xL7VGlxZt/DHVYWdkT2Uun3sqG7CuLSNp5Qg+Eq/aNsF8B0ltdHOpW46S GwHLoMDwHtYFQWvp5XqN0KqrdXq12/GmlAWBn6ujLB4SCO7+tNRxQTcPpDUFBEzYs6WyEh 1YWhFt5xrRuSnZ9q9ZpS+gVvH+iqhVQRQ8bfFXAacynrKfCS89OcwS3oLdeEfvU6Q4273I xU5OquW7zsOHdE2mvskcr0YAcoTLBwWKUWWeQ98QA5Yg0ufEWx56e1eJSvRmNp7OZygCxU D1RXQ6X2YqyXJ90SFhKHmZg8YSw7qfqAeDwVTvfrFT8100/cv0Ro5EgNLLSWdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655327555; a=rsa-sha256; cv=none; b=lZYvGWbc5dJGky3OdeSpPuzjYTwkK96CvbYiK673/4vmk15wYZ0HuVjvjSveDApFhfLsuT g55AwIyNp/vEdu01n3hY6koO78/UuQ5vUykpjf9PUkrsrBcual5Mw2QxWZWmWeFORCWD1W dMm4CXsZRrESTgqFI7FW1QsP7lSAATSsuLxYWanRduwEw3Dz9Cy2jl/JCqUxMw2nBQZxH1 uxfD4n7TDfn2ynnF/rfubELE+5cVjnOePbQNKuIEowgKnLuycfdxmvW+KYqFBcrc/6xZ3V +WZy5DKKepRZZKHN2ok/77hI0JH5iHdwwGK7iCPHtljZb/Jf1j485wuu6AclTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8f892e9bee33fda1e2a2efca4b3e8a1949264cac commit 8f892e9bee33fda1e2a2efca4b3e8a1949264cac Author: Bjoern A. Zeeb AuthorDate: 2022-06-14 16:52:45 +0000 Commit: Bjoern A. Zeeb 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 */