svn commit: r215262 - user/weongyo/usb/sys/dev/usb
Weongyo Jeong
weongyo at FreeBSD.org
Sat Nov 13 21:37:19 UTC 2010
Author: weongyo
Date: Sat Nov 13 21:37:18 2010
New Revision: 215262
URL: http://svn.freebsd.org/changeset/base/215262
Log:
Only try to tap the USB packet if the waiting descriptors exist.
Modified:
user/weongyo/usb/sys/dev/usb/usb_pf.c
Modified: user/weongyo/usb/sys/dev/usb/usb_pf.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/usb_pf.c Sat Nov 13 21:17:53 2010 (r215261)
+++ user/weongyo/usb/sys/dev/usb/usb_pf.c Sat Nov 13 21:37:18 2010 (r215262)
@@ -1678,9 +1678,11 @@ usbpf_xfertap(struct usb_xfer *xfer, int
char *buf, *ptr, *end;
/*
- * XXX check first whether there are any descriptors waiting. If no
- * we don't need to handle this xfer.
+ * NB: usbpf_uifd_cnt isn't protected by USBPFIF_LOCK() because it's
+ * not harmful.
*/
+ if (usbpf_uifd_cnt == 0)
+ return
/*
* XXX TODO
More information about the svn-src-user
mailing list