Date: Sat, 13 Sep 2008 16:08:54 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 149715 for review Message-ID: <200809131608.m8DG8sbp070787@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=149715 Change 149715 by hselasky@hselasky_laptop001 on 2008/09/13 16:08:28 Re-introduce bypass functionality in USB TTY interface. Thanks to ED. Affected files ... .. //depot/projects/usb/src/sys/dev/usb2/serial/usb2_serial.c#10 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb2/serial/usb2_serial.c#10 (text+ko) ==== @@ -1064,6 +1064,16 @@ buf = res.buffer; + /* first check if we can pass the buffer directly */ + + if (ttydisc_can_bypass(tp)) { + if (ttydisc_rint_bypass(tp, buf, cnt) != cnt) { + DPRINTF("tp=%p, data lost\n", tp); + } + continue; + } + /* need to loop */ + for (cnt = 0; cnt != res.length; cnt++) { if (ttydisc_rint(tp, buf[cnt], 0) == -1) { /* XXX what should we do? */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200809131608.m8DG8sbp070787>