From nobody Tue Sep 6 08:43:55 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 4MMJp33j8Pz4cW6H; Tue, 6 Sep 2022 08:43:55 +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 4MMJp337jCz3fNR; Tue, 6 Sep 2022 08:43:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662453835; 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=5w5fwqrrkEvYJPG6vOc3SPrN2TBdiYYNSLgoBZqboOM=; b=k0V8DnvSqatSDX04s1M+bxcYY432D2tKy4a6Xcj8FxvNq2sL8Rz1khAeChwqRN40HI1AN3 5yWjnciVzTsxiW2ePJmJgSTGfR12VDcticJ6XqR08RKgR8DSFY2kwKWQXO/sgw7ktmFTSP 8G5ZKrZRKFHgUg41ok65PYpqd0hEDSkz86FuG/pPGUC7pgTD1jNkcXKkThYEEnmDWMsjIE HuOSbwMVFnF53JC6W+qsdeqlpVoYpMWk/NyQ6UAd6oBkpfQ9ZQ2JKedPMWdDnX9Pwu21G4 YAkp/8TTb+0yaqjq0INvsrpGRvKKUmZHCaTXUw544pAe1OHt7ywOMcYLvbpm0A== 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 4MMJp327r1z16bn; Tue, 6 Sep 2022 08:43:55 +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 2868htXM037596; Tue, 6 Sep 2022 08:43:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2868htJj037595; Tue, 6 Sep 2022 08:43:55 GMT (envelope-from git) Date: Tue, 6 Sep 2022 08:43:55 GMT Message-Id: <202209060843.2868htJj037595@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: 961a016eba58 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 961a016eba58e69bce9769287f0f1ee6e6916ccb Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662453835; 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=5w5fwqrrkEvYJPG6vOc3SPrN2TBdiYYNSLgoBZqboOM=; b=FAKlsIracfHuFTh7Y3jGitALp2T20fXoVNJG54JOY5CYvU98V7ArHXW//+xP72GydIndCP tmBhfqh6eLqjfGNsLYcfgP5IIolrMZd+4urtUPYzmo46s85zaEsoVhg6Ts/LDcd11ML/1L kKkKxl2mQry5QgxL2WcJSOBgUqMuxqWYjHXSGLFvT8iNyL1gJITR3nmihyU57azm4c4rRt eC5ovXgKBOVSvC2vZSiqryM84L6rYk9/dmFPwlmX1gXHom7yZeDADVZ7x0uwgWduzkzhwh p2u9FQw5ueDnNOJN2KPm6Vw6P9G78leoHA3w9a/9+EEcvSyIJeSlWRN0wUGSVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662453835; a=rsa-sha256; cv=none; b=stRbxcC1vNZ9CU8q0js71zfJguAfGH0jTLHjnZ0nC2YUnuAd5+/iDuf3qxDNIvJ1ovjz2z 0wGxnjVjHOjrlDu0OzVR7lNIL4xrpN6nqYA1aFS1WkcMigVqm+e1R6Zu//5mAzz5mXunX6 dwqol6MHBhktHpjsyY0BbzgUlGbXZ8N1E0oK9WgyMU7LGlCI529THVwAABA+Wz58qnzk8x ULBYIiiXg0s152iUey3goo2rn2ItISIDGYvfqQ6yBvBDDLUXpH6Gm/jM1dYBXASsxySm+J 2yeI8C39XhQr6BPPNICqijbk6aoR+HeuF6QjvxQch+ZDIJA1R50TV68tPqbPyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=961a016eba58e69bce9769287f0f1ee6e6916ccb commit 961a016eba58e69bce9769287f0f1ee6e6916ccb Author: Dave Baukus AuthorDate: 2022-08-30 14:19:40 +0000 Commit: Hans Petter Selasky CommitDate: 2022-09-06 08:43:17 +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 89e568eb13c0..8117043ed8dc 100644 --- a/sys/dev/usb/serial/usb_serial.c +++ b/sys/dev/usb/serial/usb_serial.c @@ -628,9 +628,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); /*