From nobody Fri Jul 1 14:57:51 2022 X-Original-To: dev-commits-src-branches@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 5DFF68A3E69; Fri, 1 Jul 2022 14:57:52 +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 4LZJGR3V9dz4drf; Fri, 1 Jul 2022 14:57:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656687471; 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=k1dczhINv+zmvDUQeBXm8pP5w68fQwFw45/CA7usMsU=; b=F/eusIRIedOb8hG53GU9QUsF3bXDCbud3VSmhT2F5g4d+kW/C/CQVP0u/v/vEWu8W+LpMe Odi+0ze7Sl1LxKAIbZCJhgPrG5dHQtet+gk5/y+x922FLbq8kDeXSYZNq1fks+SH+5QLa0 fys99OLdPw+PvMmWpRxLqWFsdl4czwea/wyDFAr3/+HFsYk4l+JwUz/1AzsPMx4Jdhtl48 L+4scC50wH3iYEpNq/FrI/MYlVC7yYb0ki1G/tAFZlhEBI/OcS/HG0gBTpQ5ALCkfEw4me 04WYwjsqW/hSUg4raVQl4AXrhcmxSKzhReWH78rkNliqhSVEW4xRrPmx9l9dKg== 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 3D2E61D7B4; Fri, 1 Jul 2022 14:57:51 +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 261Evp8Q058045; Fri, 1 Jul 2022 14:57:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 261EvpV5058044; Fri, 1 Jul 2022 14:57:51 GMT (envelope-from git) Date: Fri, 1 Jul 2022 14:57:51 GMT Message-Id: <202207011457.261EvpV5058044@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 66754c01ff95 - stable/13 - XHCI: clear warm and port reset List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 66754c01ff951a771c594dd850675ba2c4236dcc Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656687471; 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=k1dczhINv+zmvDUQeBXm8pP5w68fQwFw45/CA7usMsU=; b=wZQvC+6SmabdMgyGACQwCYVk/CGOgacy/71oODaYnEyvydtm04FkHK12wOf+SqDM7A2zu0 gOHhD/LN7otKEJDraIfPTomBEfBoaMkfuDns8H/3gN6MlTmCHPL9GG07hvY0x2XwkW/ulC dlEVQcRyWd7QBsdkZsuqfPBe5nC7KYY1pIz0zOKeGG3BMsyJA9DPtGOkcukMGNbROU3YBn B7QtBFMnCKB0Hqb52vvyky67LNytYSS/deHa3m7mw98WNvyyypNZe5UH8l9GN0M2uToMJj uQyyXhR3v5heJxRZ1Zk1KT3g/WlQH+qniI1pBuD599PQLHWqSpKuSAekV442gQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656687471; a=rsa-sha256; cv=none; b=nERjehG44AY+DxyT/Hg1I7vWmqlO8s5dVp1uldkywEpU4af9VD+5apz6uN3sLd2Ci2b80A J2/PPyOYiEsNSiFhOp3E5mMS2k7xOqjniaRb6dJPtgMHUC7fLGWEA0rF+cD1TNBOMzB6mq OuQ31HvJIk4nRNf+Oe905R6y9P10C7t7w8CEzGKp9TSBPl21+vfKDqZb6O/cSYV9DFQQMc TvEwUQLjXWQI1CY1Ibm5RYXL2Ny1ljQKr6PXy3Sx9qxvRbKefk2LuocqX2fXEGGQvC6QvH LqDba7FK5pGOM/tOH6y3F+7mkWJFFwoo9nenWGVh111C8IsvBuDMVsChmIoNXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=66754c01ff951a771c594dd850675ba2c4236dcc commit 66754c01ff951a771c594dd850675ba2c4236dcc Author: Bjoern A. Zeeb AuthorDate: 2022-06-14 16:52:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-07-01 13:50:19 +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 Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D35483 (cherry picked from commit 8f892e9bee33fda1e2a2efca4b3e8a1949264cac) --- 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 00173a5d14d0..4c7b67b92474 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 */