From owner-p4-projects@FreeBSD.ORG Sun Dec 2 14:57:07 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D70B016A510; Sun, 2 Dec 2007 14:57:06 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DDF416A419 for ; Sun, 2 Dec 2007 14:57:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4CDC413C458 for ; Sun, 2 Dec 2007 14:57:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id lB2Ev6jU092831 for ; Sun, 2 Dec 2007 14:57:06 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id lB2Ev6RS092828 for perforce@freebsd.org; Sun, 2 Dec 2007 14:57:06 GMT (envelope-from hselasky@FreeBSD.org) Date: Sun, 2 Dec 2007 14:57:06 GMT Message-Id: <200712021457.lB2Ev6RS092828@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 130020 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Dec 2007 14:57:07 -0000 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)) &&