Date: Tue, 27 Sep 2011 07:19:02 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r225779 - stable/8/sys/dev/usb Message-ID: <201109270719.p8R7J2eY010248@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Tue Sep 27 07:19:01 2011 New Revision: 225779 URL: http://svn.freebsd.org/changeset/base/225779 Log: MFC r225695: Fix minor race in device side mode. Modified: stable/8/sys/dev/usb/usb_transfer.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/8/sys/dev/usb/usb_transfer.c Tue Sep 27 07:14:12 2011 (r225778) +++ stable/8/sys/dev/usb/usb_transfer.c Tue Sep 27 07:19:01 2011 (r225779) @@ -2417,8 +2417,9 @@ usbd_transfer_start_cb(void *arg) #if USB_HAVE_PF usbpf_xfertap(xfer, USBPF_XFERTAP_SUBMIT); #endif - /* start the transfer */ - (ep->methods->start) (xfer); + /* start USB transfer, if no error */ + if (xfer->error == 0) + (ep->methods->start) (xfer); xfer->flags_int.can_cancel_immed = 1; @@ -2597,8 +2598,9 @@ usbd_pipe_start(struct usb_xfer_queue *p #if USB_HAVE_PF usbpf_xfertap(xfer, USBPF_XFERTAP_SUBMIT); #endif - /* start USB transfer */ - (ep->methods->start) (xfer); + /* start USB transfer, if no error */ + if (xfer->error == 0) + (ep->methods->start) (xfer); xfer->flags_int.can_cancel_immed = 1;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109270719.p8R7J2eY010248>