PERFORCE change 130541 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Sun Dec 9 03:16:56 PST 2007
http://perforce.freebsd.org/chv.cgi?CH=130541
Change 130541 by hselasky at 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;
More information about the p4-projects
mailing list