diff options
author | thompsa <thompsa@FreeBSD.org> | 2009-04-05 18:22:03 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2009-04-05 18:22:03 +0000 |
commit | ca54de513e7e5b7fd4ba3efeb6ef5ef99a33d0c1 (patch) | |
tree | 775a8155b483857b503f0f14e1fdff2d722260db /sys/dev/usb/serial/usb_serial.c | |
parent | 5b533e0a2c103b52a1027de60f9d05ce3e9407ee (diff) | |
download | FreeBSD-src-ca54de513e7e5b7fd4ba3efeb6ef5ef99a33d0c1.zip FreeBSD-src-ca54de513e7e5b7fd4ba3efeb6ef5ef99a33d0c1.tar.gz |
MFp4 //depot/projects/usb@160052
Wait until line configuration is complete before starting data transfers.
Submitted by: Hans Petter Selasky
Diffstat (limited to 'sys/dev/usb/serial/usb_serial.c')
-rw-r--r-- | sys/dev/usb/serial/usb_serial.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/usb/serial/usb_serial.c b/sys/dev/usb/serial/usb_serial.c index 38fd818..6f5558a 100644 --- a/sys/dev/usb/serial/usb_serial.c +++ b/sys/dev/usb/serial/usb_serial.c @@ -412,6 +412,12 @@ usb2_com_queue_command(struct usb2_com_softc *sc, if (fn == usb2_com_cfg_close) usb2_proc_mwait(&ssc->sc_tq, t0, t1); + /* + * In case of multiple configure requests, + * keep track of the last one! + */ + if (fn == usb2_com_cfg_start_transfers) + sc->sc_last_start_xfer = &task->hdr; } static void @@ -458,7 +464,9 @@ usb2_com_cfg_start_transfers(struct usb2_proc_msg *_task) /* TTY device closed */ return; } - sc->sc_flag |= UCOM_FLAG_GP_DATA; + + if (_task == sc->sc_last_start_xfer) + sc->sc_flag |= UCOM_FLAG_GP_DATA; if (sc->sc_callback->usb2_com_start_read) { (sc->sc_callback->usb2_com_start_read) (sc); |