PERFORCE change 149715 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Sat Sep 13 16:08:55 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=149715
Change 149715 by hselasky at 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? */
More information about the p4-projects
mailing list