Date: Sun, 25 Nov 2007 10:59:24 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 129494 for review Message-ID: <200711251059.lAPAxO6K079449@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200711251059.lAPAxO6K079449>