PERFORCE change 149073 for review

Hans Petter Selasky hselasky at FreeBSD.org
Tue Sep 2 18:45:30 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=149073

Change 149073 by hselasky at hselasky_laptop001 on 2008/09/02 18:45:23

	
	Style change by "usb_style.sh".

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb2/core/usb2_request.c#15 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb2/core/usb2_request.c#15 (text+ko) ====

@@ -108,7 +108,6 @@
 	if (pipe == NULL) {
 		pipe = pipe_first;
 	}
-
 	switch (USB_GET_STATE(xfer)) {
 	case USB_ST_TRANSFERRED:
 		if (pipe->edesc &&
@@ -123,38 +122,38 @@
 
 	case USB_ST_SETUP:
 tr_setup:
-			if (pipe == pipe_end) {
-				pipe = pipe_first;
-			}
-			if (pipe->edesc &&
-			    pipe->is_stalled) {
+		if (pipe == pipe_end) {
+			pipe = pipe_first;
+		}
+		if (pipe->edesc &&
+		    pipe->is_stalled) {
 
-				/* setup a clear-stall packet */
+			/* setup a clear-stall packet */
 
-				req.bmRequestType = UT_WRITE_ENDPOINT;
-				req.bRequest = UR_CLEAR_FEATURE;
-				USETW(req.wValue, UF_ENDPOINT_HALT);
-				req.wIndex[0] = pipe->edesc->bEndpointAddress;
-				req.wIndex[1] = 0;
-				USETW(req.wLength, 0);
+			req.bmRequestType = UT_WRITE_ENDPOINT;
+			req.bRequest = UR_CLEAR_FEATURE;
+			USETW(req.wValue, UF_ENDPOINT_HALT);
+			req.wIndex[0] = pipe->edesc->bEndpointAddress;
+			req.wIndex[1] = 0;
+			USETW(req.wLength, 0);
 
-				/* copy in the transfer */
+			/* copy in the transfer */
 
-				usb2_copy_in(xfer->frbuffers, 0, &req, sizeof(req));
+			usb2_copy_in(xfer->frbuffers, 0, &req, sizeof(req));
 
-				/* set length */
-				xfer->frlengths[0] = sizeof(req);
-				xfer->nframes = 1;
-				mtx_unlock(xfer->usb2_mtx);
+			/* set length */
+			xfer->frlengths[0] = sizeof(req);
+			xfer->nframes = 1;
+			mtx_unlock(xfer->usb2_mtx);
 
-				usb2_start_hardware(xfer);
+			usb2_start_hardware(xfer);
 
-				mtx_lock(xfer->usb2_mtx);
-				break;
-			}
-			pipe++;
-			if (--to) 
-				goto tr_setup;
+			mtx_lock(xfer->usb2_mtx);
+			break;
+		}
+		pipe++;
+		if (--to)
+			goto tr_setup;
 		break;
 
 	default:


More information about the p4-projects mailing list