From nobody Tue Aug 30 14:21:16 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 4MH8cX6jmTz4bLL6; Tue, 30 Aug 2022 14:21:16 +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 4MH8cX6Dp0z3pmV; Tue, 30 Aug 2022 14:21:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661869276; 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=ZyW35a9uzpAUvUmOIXh+vGnzmQEWoQIdpk1mWXhD9Io=; b=W+ALmLcllOqVTALkACqttJdnkdHtgpVuIntJrQsIZGnQtGYuhTko8/kMiL6Lyuf5adbPwW dLC8xlVWz8Z4FT5uV+gbXCcZMI9T6rqQ/0Ipr66Yi6e3wNgHcb4rf1run67ulan8BYm+wM UCuxHwgH22Pq2e0nPZPMkmgDmTggckkDjPr5ZG2bmccxqKOYiEwZ6LyB5DLI1uXqWKUIMV sjT+7XhlRP3lZmZeJizGMMbIcfGzNRCYUYofoPZQSV/8fonq7EftxgeG4YYrCJlTa525he r4qnJE6UTfUSBwJwHEJtVC3hQ8XcVSYTs4Dhi7b44MyKleyaPACn/bn08KezDg== 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 4MH8cX5Lbsznnm; Tue, 30 Aug 2022 14:21:16 +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 27UELGRu098496; Tue, 30 Aug 2022 14:21:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27UELGlB098495; Tue, 30 Aug 2022 14:21:16 GMT (envelope-from git) Date: Tue, 30 Aug 2022 14:21:16 GMT Message-Id: <202208301421.27UELGlB098495@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: cbc5350359b9 - main - ucom(4): Make sure the open routine is executed synchronously. 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: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cbc5350359b9be916cc0dc1986147013c6f90483 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661869276; 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=ZyW35a9uzpAUvUmOIXh+vGnzmQEWoQIdpk1mWXhD9Io=; b=SpKtTZSfvPE+EkDAP/DitnjVDbATsI/5BvgHlQkloREr44nUJLiKGkMSjfaUaumK2knhIj rqL173JBxAyTzMePJpkN0HNv3IFS1B93dAxlHxGGRB3lg/0GF+N/I08jyeZ9A0ZYTR32FJ yqF+UEZKRvNgl4naWUslKtDO717xArTWlCQhCThnviaF/miCId9C5Heewr+/+hDiFZlKCW bM1RCNqIwX1iRTcjqP0Ziqarfj2R2kDWzt0y2LOpIHEhIvELIFoLWLH9V7JSFZ1Fi0Dzv2 vQ2ygGuXSfBmzG6KlNICeXCu8rDqwG1UpdrHyvAJ/1ScS1Fo+sNBCfrboQHdfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661869276; a=rsa-sha256; cv=none; b=ODOx+x0JJoTcaNn/xMToN+IPtj8TFuOKR1SYRMQPPpS2udR7y3OrlkbBCFE5cy1jIQtx4d T2MAiryNCYx/FiSR8XYQHhUxH6iMLj02YZXHxHf23L3WYNE7P/ilHwQqIVaao1Esc525os fPQskQ6fsxDDPdadTu16onXnJNS2I0I6Vh+cOC87y1X8xWcW3sTjI8SYArZzaBJAM6I1zp Vnj4Z12625D46io+n2QQJdTTdDE6IArjrdx1o/GTH5wvLwzkT5G/mb21Q7NMfKLQmoi/EM nU+ftT/t86TR0TMLzYqrkroLPc0XeT2v4BFsBdQeg6hh/78gyfy0Ssk/SRDWxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=cbc5350359b9be916cc0dc1986147013c6f90483 commit cbc5350359b9be916cc0dc1986147013c6f90483 Author: Dave Baukus AuthorDate: 2022-08-30 14:19:40 +0000 Commit: Hans Petter Selasky CommitDate: 2022-08-30 14:19:58 +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 MFC after: 1 week Sponsored by: NVIDIA Networking --- 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); /*