From owner-p4-projects@FreeBSD.ORG Sun Dec 9 11:16:56 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F14E716A420; Sun, 9 Dec 2007 11:16:55 +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 5A9C216A41B for ; Sun, 9 Dec 2007 11:16:55 +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 4A4FC13C47E for ; Sun, 9 Dec 2007 11:16:55 +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 lB9BGsGC073658 for ; Sun, 9 Dec 2007 11:16:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id lB9BGsgi073655 for perforce@freebsd.org; Sun, 9 Dec 2007 11:16:54 GMT (envelope-from hselasky@FreeBSD.org) Date: Sun, 9 Dec 2007 11:16:54 GMT Message-Id: <200712091116.lB9BGsgi073655@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 130541 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, 09 Dec 2007 11:16:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=130541 Change 130541 by hselasky@hselasky_laptop001 on 2007/12/09 11:15:59 Style change resulting from running "usb_style.sh". Affected files ... .. //depot/projects/usb/src/sys/dev/usb/ehci.c#60 edit .. //depot/projects/usb/src/sys/dev/usb/ohci.c#49 edit .. //depot/projects/usb/src/sys/dev/usb/uhci.c#50 edit .. //depot/projects/usb/src/sys/dev/usb/usb_compat_linux.c#17 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/ehci.c#60 (text+ko) ==== @@ -1242,11 +1242,10 @@ if (xfer->flags_int.control_xfr) { - if (xfer->flags_int.control_hdr) { + if (xfer->flags_int.control_hdr) { - err = ehci_non_isoc_done_sub(xfer); - } - + err = ehci_non_isoc_done_sub(xfer); + } xfer->aframes = 1; if (xfer->td_transfer_cache == NULL) { @@ -1255,7 +1254,7 @@ } while (xfer->aframes != xfer->nframes) { - err = ehci_non_isoc_done_sub(xfer); + err = ehci_non_isoc_done_sub(xfer); xfer->aframes++; if (xfer->td_transfer_cache == NULL) { @@ -1824,25 +1823,23 @@ /* max 3 retries */ temp.qtd_status |= htole32(EHCI_QTD_SET_CERR(3)); } - /* check if we should prepend a setup message */ if (xfer->flags_int.control_xfr) { - if (xfer->flags_int.control_hdr) { + if (xfer->flags_int.control_hdr) { - temp.qtd_status &= htole32(EHCI_QTD_SET_CERR(3)); - temp.qtd_status |= htole32 - (EHCI_QTD_ACTIVE | - EHCI_QTD_SET_PID(EHCI_QTD_PID_SETUP) | - EHCI_QTD_SET_TOGGLE(0)); + temp.qtd_status &= htole32(EHCI_QTD_SET_CERR(3)); + temp.qtd_status |= htole32 + (EHCI_QTD_ACTIVE | + EHCI_QTD_SET_PID(EHCI_QTD_PID_SETUP) | + EHCI_QTD_SET_TOGGLE(0)); - temp.len = xfer->frlengths[0]; - temp.pc = xfer->frbuffers + 0; - temp.shortpkt = temp.len ? 1 : 0; + temp.len = xfer->frlengths[0]; + temp.pc = xfer->frbuffers + 0; + temp.shortpkt = temp.len ? 1 : 0; - ehci_setup_standard_chain_sub(&temp); - } - + ehci_setup_standard_chain_sub(&temp); + } x = 1; } else { x = 0; ==== //depot/projects/usb/src/sys/dev/usb/ohci.c#49 (text+ko) ==== @@ -953,11 +953,10 @@ if (xfer->flags_int.control_xfr) { - if (xfer->flags_int.control_hdr) { + if (xfer->flags_int.control_hdr) { - err = ohci_non_isoc_done_sub(xfer); - } - + err = ohci_non_isoc_done_sub(xfer); + } xfer->aframes = 1; if (xfer->td_transfer_cache == NULL) { @@ -966,7 +965,7 @@ } while (xfer->aframes != xfer->nframes) { - err = ohci_non_isoc_done_sub(xfer); + err = ohci_non_isoc_done_sub(xfer); xfer->aframes++; if (xfer->td_transfer_cache == NULL) { @@ -1533,24 +1532,23 @@ /* check if we should prepend a setup message */ if (xfer->flags_int.control_xfr) { - if (xfer->flags_int.control_hdr) { + if (xfer->flags_int.control_hdr) { - temp.td_flags = htole32(OHCI_TD_SETUP | OHCI_TD_NOCC | - OHCI_TD_TOGGLE_0 | OHCI_TD_NOINTR); + temp.td_flags = htole32(OHCI_TD_SETUP | OHCI_TD_NOCC | + OHCI_TD_TOGGLE_0 | OHCI_TD_NOINTR); - temp.len = xfer->frlengths[0]; - temp.pc = xfer->frbuffers + 0; - temp.shortpkt = temp.len ? 1 : 0; + temp.len = xfer->frlengths[0]; + temp.pc = xfer->frbuffers + 0; + temp.shortpkt = temp.len ? 1 : 0; - ohci_setup_standard_chain_sub(&temp); + ohci_setup_standard_chain_sub(&temp); - /* - * XXX assume that the setup message is - * contained within one USB packet: - */ - xfer->pipe->toggle_next = 1; - } - + /* + * XXX assume that the setup message is + * contained within one USB packet: + */ + xfer->pipe->toggle_next = 1; + } x = 1; } else { x = 0; ==== //depot/projects/usb/src/sys/dev/usb/uhci.c#50 (text+ko) ==== @@ -1246,11 +1246,10 @@ xfer->td_transfer_cache = xfer->td_transfer_first; if (xfer->flags_int.control_xfr) { - if (xfer->flags_int.control_hdr) { + if (xfer->flags_int.control_hdr) { - err = uhci_non_isoc_done_sub(xfer); - } - + err = uhci_non_isoc_done_sub(xfer); + } xfer->aframes = 1; if (xfer->td_transfer_cache == NULL) { @@ -1259,7 +1258,7 @@ } while (xfer->aframes != xfer->nframes) { - err = uhci_non_isoc_done_sub(xfer); + err = uhci_non_isoc_done_sub(xfer); xfer->aframes++; if (xfer->td_transfer_cache == NULL) { @@ -1818,25 +1817,23 @@ /* DATA1 is next */ temp.td_token |= htole32(UHCI_TD_SET_DT(1)); } - /* check if we should prepend a setup message */ if (xfer->flags_int.control_xfr) { - if (xfer->flags_int.control_hdr) { + if (xfer->flags_int.control_hdr) { - temp.td_token &= htole32(UHCI_TD_SET_DEVADDR(0x7F) | - UHCI_TD_SET_ENDPT(0xF)); - temp.td_token |= htole32(UHCI_TD_PID_SETUP | - UHCI_TD_SET_DT(0)); + temp.td_token &= htole32(UHCI_TD_SET_DEVADDR(0x7F) | + UHCI_TD_SET_ENDPT(0xF)); + temp.td_token |= htole32(UHCI_TD_PID_SETUP | + UHCI_TD_SET_DT(0)); - temp.len = xfer->frlengths[0]; - temp.ml.buf_pc = xfer->frbuffers + 0; - temp.shortpkt = temp.len ? 1 : 0; + temp.len = xfer->frlengths[0]; + temp.ml.buf_pc = xfer->frbuffers + 0; + temp.shortpkt = temp.len ? 1 : 0; - uhci_setup_standard_chain_sub(&temp); - } - + uhci_setup_standard_chain_sub(&temp); + } x = 1; } else { x = 0; ==== //depot/projects/usb/src/sys/dev/usb/usb_compat_linux.c#17 (text+ko) ==== @@ -1566,13 +1566,13 @@ } xfer->frlengths[data_frame] = max_bulk; if (xfer->flags_int.control_xfr) { - if (max_bulk > 0) { - xfer->nframes = 2; - } else { - xfer->nframes = 1; - } + if (max_bulk > 0) { + xfer->nframes = 2; + } else { + xfer->nframes = 1; + } } else { - xfer->nframes = 1; + xfer->nframes = 1; } usbd_start_hardware(xfer); return;