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
This commit is contained in:
Dave Baukus 2022-08-30 16:19:40 +02:00 committed by Hans Petter Selasky
parent 40e43b056d
commit cbc5350359

View File

@ -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);
/*