From owner-p4-projects@FreeBSD.ORG Wed Dec 26 10:49:48 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 74D1516A498; Wed, 26 Dec 2007 10:49:48 +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 251C416A480 for ; Wed, 26 Dec 2007 10:49:48 +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 2033B13C4EF for ; Wed, 26 Dec 2007 10:49:48 +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 lBQAnlFI074534 for ; Wed, 26 Dec 2007 10:49:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id lBQAnlg9074531 for perforce@freebsd.org; Wed, 26 Dec 2007 10:49:47 GMT (envelope-from hselasky@FreeBSD.org) Date: Wed, 26 Dec 2007 10:49:47 GMT Message-Id: <200712261049.lBQAnlg9074531@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 131677 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: Wed, 26 Dec 2007 10:49:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=131677 Change 131677 by hselasky@hselasky_laptop001 on 2007/12/26 10:49:01 Style change by "usb_style.sh". Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#92 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#92 (text+ko) ==== @@ -2492,7 +2492,6 @@ /* tearing down */ return; } - mtx_assert(xfer->priv_mtx, MA_OWNED); /* avoid any races by locking the USB mutex */ @@ -2518,7 +2517,6 @@ /* tearing down */ return; } - mtx_assert(xfer->priv_mtx, MA_OWNED); /* avoid any races by locking the USB mutex */ @@ -2577,22 +2575,22 @@ * Check if we are supposed to stall the pipe: */ if (xfer->flags.stall_pipe) { - /* clear stall command */ - xfer->flags.stall_pipe = 0; + /* clear stall command */ + xfer->flags.stall_pipe = 0; - if (xfer->flags_int.usb_mode == USB_MODE_DEVICE) { - /* - * Only stall BULK and INTERRUPT endpoints. - */ - type = (xfer->pipe->edesc->bmAttributes & UE_XFERTYPE); - if ((type == UE_BULK) || - (type == UE_INTERRUPT)) { - xfer->pipe->is_stalled = 1; - (xfer->udev->bus->methods->set_stall) ( - xfer->udev, NULL, xfer->pipe); - goto done; + if (xfer->flags_int.usb_mode == USB_MODE_DEVICE) { + /* + * Only stall BULK and INTERRUPT endpoints. + */ + type = (xfer->pipe->edesc->bmAttributes & UE_XFERTYPE); + if ((type == UE_BULK) || + (type == UE_INTERRUPT)) { + xfer->pipe->is_stalled = 1; + (xfer->udev->bus->methods->set_stall) ( + xfer->udev, NULL, xfer->pipe); + goto done; + } } - } } /* * Handled cases: @@ -2889,8 +2887,8 @@ * send STALL tokens. *------------------------------------------------------------------------*/ static usbd_status_t -usbd_handle_set_stall_sub(struct usbd_device *udev, uint8_t ea_val, -uint8_t do_stall) +usbd_handle_set_stall_sub(struct usbd_device *udev, uint8_t ea_val, + uint8_t do_stall) { struct usbd_pipe *pipe; struct usbd_xfer *xfer;