From nobody Tue Sep 6 08:45:35 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 4MMJqz6B1fz4cWJp; Tue, 6 Sep 2022 08:45: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 4MMJqz5cPWz3ffX; Tue, 6 Sep 2022 08:45:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662453935; 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=o6XfUIcZjIPUB9uPMfA2imQj+uDopttxeSQZPwoda7M=; b=Ntg/EODiNCJ0b52TxVba5WeYGj6Z3e4KzGEuMEWw1PkcyryysD5RtiaG4WBk/qcNLzFaFN 8Oz6o+2wpNEAjKdzFo5VboHNaSRvHCPkir3krGsWzQadqEjE7Gm0CfcJMl/fiwHwdACE6+ RLDQ7beQkOPjjUd7tTRErs6efVsy1kVKK49CTgwZUisslrw5DZ/hpdD/r8qSMYolZYRrmk z2Jzqn84KWPb3ocMYwQeANkqpDMNWsw+fmE0O93Q4wKQa/wykDIDEHmDX43fwq5x/9/1DL CbDvzzFvc35A8jtaUixn+EzETmNGs/YQHOfLe4HuVLydv0HSuzdRf1wV9hhDZA== 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 4MMJqz4f5Sz16Y8; Tue, 6 Sep 2022 08:45: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 2868jZL2037972; Tue, 6 Sep 2022 08:45:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2868jZtJ037971; Tue, 6 Sep 2022 08:45:35 GMT (envelope-from git) Date: Tue, 6 Sep 2022 08:45:35 GMT Message-Id: <202209060845.2868jZtJ037971@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: b5a56822610b - stable/12 - ucom(4): Make sure the open routine is executed synchronously. 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: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: b5a56822610b551d72ccda40e3d5dd6705f31bbc Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662453935; 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=o6XfUIcZjIPUB9uPMfA2imQj+uDopttxeSQZPwoda7M=; b=aaTtNzNXupw7dc7Iogs3TCMwIkHar8YwbYKe1LEMpz9NOcXSKRKuIZ1Hcqik782FaRRXAC BBw4RkiQJTqgNDpcekIHMU04o8V/FGUHcYeRt7N1lePioGeI9vWf1SpSCPjx0krxSN2gb+ kSvgZHtxDWLeMfG0cUwge+/hiaVdc5nvCeNEgj/3d6eIj7Ls0LC6ixRPfDNEi2QtV0orrJ 0aaP9wOlUWo+j4QoJeX1VPX6CJgIcs41FUYvE6CvzN/GLAha5zPn+uoqjRNeX3nCgIHm7D VO7McDeHlianIioui7x8aD8QeZFjSw9Z2pHIWzxcTX0+pRMkR/UvQSwlvB9fTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662453935; a=rsa-sha256; cv=none; b=guEt6z5vF8OUr9wO1bho27X+1hnmKXELiyYmxLACMjTgwlwMc8ZGK1xvopqHlpcaDYTlQM jbUPVyjdwJxdm0i358lkCH0j7/tD/FrFF/1v7pERKMyRTMWQlX6jSe89NCaQVfLRub4R1o icoFDaLs0WBZgEOrXK36CZb5srfcxnCkA5tMWmD+j/PNIMDHe3d5tnZdFNvd/E/+roAjZw MiVL55A3IO1qPYjWSscqMUWAKoaQZ3Gyy0k/6jdLV6XsAp78m2HmWL8dSnrBAR9rWmeaRD e91MXfTGxckvqnN9RUaV6+U0a/OOihwscqEuJqwzefUUElw0JhSApdcRcFOplQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=b5a56822610b551d72ccda40e3d5dd6705f31bbc commit b5a56822610b551d72ccda40e3d5dd6705f31bbc Author: Dave Baukus AuthorDate: 2022-08-30 14:19:40 +0000 Commit: Hans Petter Selasky CommitDate: 2022-09-06 08:45:21 +0000 ucom(4): Make sure the open routine is executed synchronously. To avoid issues starting any USB transfers before the open function is complete. Differential Revision: https://reviews.freebsd.org/D36391 Sponsored by: NVIDIA Networking (cherry picked from commit cbc5350359b9be916cc0dc1986147013c6f90483) --- sys/dev/usb/serial/usb_serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/usb/serial/usb_serial.c b/sys/dev/usb/serial/usb_serial.c index 445c9f2127b8..f73b7333e167 100644 --- a/sys/dev/usb/serial/usb_serial.c +++ b/sys/dev/usb/serial/usb_serial.c @@ -629,9 +629,9 @@ ucom_queue_command(struct ucom_softc *sc, task->termios_copy = *pt; /* - * Closing the device should be synchronous. + * Closing or opening the device should be synchronous. */ - if (fn == ucom_cfg_close) + if (fn == ucom_cfg_close || fn == ucom_cfg_open) usb_proc_mwait(&ssc->sc_tq, t0, t1); /*