Date: Sat, 13 Nov 2010 21:37:19 +0000 (UTC) From: Weongyo Jeong <weongyo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r215262 - user/weongyo/usb/sys/dev/usb Message-ID: <201011132137.oADLbJYt060567@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011132137.oADLbJYt060567>