Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Sep 2022 08:45:35 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: b5a56822610b - stable/12 - ucom(4): Make sure the open routine is executed synchronously.
Message-ID:  <202209060845.2868jZtJ037971@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by hselasky:

URL: https://cgit.FreeBSD.org/src/commit/?id=b5a56822610b551d72ccda40e3d5dd6705f31bbc

commit b5a56822610b551d72ccda40e3d5dd6705f31bbc
Author:     Dave Baukus <daveb@spectralogic.com>
AuthorDate: 2022-08-30 14:19:40 +0000
Commit:     Hans Petter Selasky <hselasky@FreeBSD.org>
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);
 
 	/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202209060845.2868jZtJ037971>