Date: Sun, 2 Dec 2007 14:57:06 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 130020 for review Message-ID: <200712021457.lB2Ev6RS092828@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=130020 Change 130020 by hselasky@hselasky_laptop001 on 2007/12/02 14:56:51 Style "ucom.c" using "usb_style.sh". Affected files ... .. //depot/projects/usb/src/sys/dev/usb/ucom.c#25 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/ucom.c#25 (text+ko) ==== @@ -1054,8 +1054,7 @@ DPRINTF(0, "stopped\n"); goto done; } - - cnt = q_to_b(&(tp->t_outq), usbd_get_buffer(pc,offset), len); + cnt = q_to_b(&(tp->t_outq), usbd_get_buffer(pc, offset), len); actlen[0] = cnt; @@ -1094,47 +1093,47 @@ buf = usbd_get_buffer(pc, offset); - if (tp->t_state & TS_CAN_BYPASS_L_RINT) { + if (tp->t_state & TS_CAN_BYPASS_L_RINT) { - if (((tp->t_rawq.c_cc + len) > tp->t_ihiwat) && - ((sc->sc_flag & UCOM_FLAG_RTS_IFLOW) || - (tp->t_iflag & IXOFF)) && - (!(tp->t_state & TS_TBLOCK))) { - ttyblock(tp); - } - cnt = b_to_q(buf, len, &(tp->t_rawq)); + if (((tp->t_rawq.c_cc + len) > tp->t_ihiwat) && + ((sc->sc_flag & UCOM_FLAG_RTS_IFLOW) || + (tp->t_iflag & IXOFF)) && + (!(tp->t_state & TS_TBLOCK))) { + ttyblock(tp); + } + cnt = b_to_q(buf, len, &(tp->t_rawq)); - tp->t_rawcc += len; + tp->t_rawcc += len; - ttwakeup(tp); + ttwakeup(tp); - if ((tp->t_state & TS_TTSTOP) && - ((tp->t_iflag & IXANY) || - (tp->t_cc[VSTART] == tp->t_cc[VSTOP]))) { - tp->t_state &= ~TS_TTSTOP; - tp->t_lflag &= ~FLUSHO; - ucom_start_write(tp); - } - if (cnt > 0) { - DPRINTF(0, "tp=%p, lost %d " - "chars\n", tp, cnt); - } - } else { + if ((tp->t_state & TS_TTSTOP) && + ((tp->t_iflag & IXANY) || + (tp->t_cc[VSTART] == tp->t_cc[VSTOP]))) { + tp->t_state &= ~TS_TTSTOP; + tp->t_lflag &= ~FLUSHO; + ucom_start_write(tp); + } + if (cnt > 0) { + DPRINTF(0, "tp=%p, lost %d " + "chars\n", tp, cnt); + } + } else { - /* pass characters to tty layer */ + /* pass characters to tty layer */ - for (cnt = 0; cnt != len; cnt++) { + for (cnt = 0; cnt != len; cnt++) { - if (ttyld_rint(tp, buf[cnt]) == -1) { + if (ttyld_rint(tp, buf[cnt]) == -1) { - /* XXX what should we do? */ + /* XXX what should we do? */ - DPRINTF(0, "tp=%p, lost %d " - "chars\n", tp, len - cnt); - break; - } + DPRINTF(0, "tp=%p, lost %d " + "chars\n", tp, len - cnt); + break; } } + } if ((sc->sc_flag & UCOM_FLAG_RTS_IFLOW) && (!(sc->sc_mcr & SER_RTS)) &&
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712021457.lB2Ev6RS092828>
