From owner-svn-src-user@FreeBSD.ORG Sat Nov 13 21:37:19 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AE6E106566B; Sat, 13 Nov 2010 21:37:19 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39CB48FC21; Sat, 13 Nov 2010 21:37:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oADLbJqS060569; Sat, 13 Nov 2010 21:37:19 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oADLbJYt060567; Sat, 13 Nov 2010 21:37:19 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201011132137.oADLbJYt060567@svn.freebsd.org> From: Weongyo Jeong Date: Sat, 13 Nov 2010 21:37:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215262 - user/weongyo/usb/sys/dev/usb X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Nov 2010 21:37:19 -0000 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