From owner-p4-projects@FreeBSD.ORG Sun Nov 25 10:59:25 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2BE7E16A468; Sun, 25 Nov 2007 10:59:25 +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 D6CFF16A418 for ; Sun, 25 Nov 2007 10:59:24 +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 C5E6E13C44B for ; Sun, 25 Nov 2007 10:59:24 +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 lAPAxOVq079452 for ; Sun, 25 Nov 2007 10:59:24 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id lAPAxO6K079449 for perforce@freebsd.org; Sun, 25 Nov 2007 10:59:24 GMT (envelope-from hselasky@FreeBSD.org) Date: Sun, 25 Nov 2007 10:59:24 GMT Message-Id: <200711251059.lAPAxO6K079449@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 129494 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, 25 Nov 2007 10:59:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=129494 Change 129494 by hselasky@hselasky_laptop001 on 2007/11/25 10:58:43 Style change. Result from running "usb_style.sh". Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#50 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#50 (text+ko) ==== @@ -1628,53 +1628,53 @@ if (!xfer->flags_int.open) { return; } - /* - * close transfer - */ - mtx_lock(xfer->usb_mtx); + /* + * close transfer + */ + mtx_lock(xfer->usb_mtx); - /* - * NOTE: we need to exclude the - * host controller driver from - * reading "flags_int" when we - * clear "flags_int.open" ! - */ - xfer->flags_int.open = 0; + /* + * NOTE: we need to exclude the + * host controller driver from + * reading "flags_int" when we + * clear "flags_int.open" ! + */ + xfer->flags_int.open = 0; - (xfer->pipe->methods->close) (xfer); + (xfer->pipe->methods->close) (xfer); - /* - * By clearing the "usb_thread" variable we are signalling - * that a different thread has handled the callback. This - * prevents other threads that are about to call the - * callback, to actually call the callback. - */ - xfer->usb_thread = NULL; - mtx_unlock(xfer->usb_mtx); + /* + * By clearing the "usb_thread" variable we are signalling + * that a different thread has handled the callback. This + * prevents other threads that are about to call the + * callback, to actually call the callback. + */ + xfer->usb_thread = NULL; + mtx_unlock(xfer->usb_mtx); - /* always set error */ - xfer->error = USBD_CANCELLED; + /* always set error */ + xfer->error = USBD_CANCELLED; - state = xfer->flags_int.bdma_state; + state = xfer->flags_int.bdma_state; + /* + * Update BUS-DMA state to cancelling, if needed + */ + if ((state == USBD_BDMA_ST_LOADING) || + (state == USBD_BDMA_ST_CANCEL_AND_LOAD)) { + xfer->flags_int.bdma_state = USBD_BDMA_ST_CANCELLING; + } + /* + * Check if we are doing a transfer and if so + * do a Cancel Callback + */ + if (xfer->flags_int.transferring) { /* - * Update BUS-DMA state to cancelling, if needed + * call callback, which will clear + * "flags_int.transferring" */ - if ((state == USBD_BDMA_ST_LOADING) || - (state == USBD_BDMA_ST_CANCEL_AND_LOAD)) { - xfer->flags_int.bdma_state = USBD_BDMA_ST_CANCELLING; - } - /* - * Check if we are doing a transfer and if so - * do a Cancel Callback - */ - if (xfer->flags_int.transferring) { - /* - * call callback, which will clear - * "flags_int.transferring" - */ - usbd_callback_wrapper(xfer); - } + usbd_callback_wrapper(xfer); + } return; }