From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 07:17:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E86DD53; Fri, 14 Feb 2014 07:17:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5A7771732; Fri, 14 Feb 2014 07:17:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E7HbFG098671; Fri, 14 Feb 2014 07:17:37 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E7Hbv2098669; Fri, 14 Feb 2014 07:17:37 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402140717.s1E7Hbv2098669@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 14 Feb 2014 07:17:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261872 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 07:17:37 -0000 Author: hselasky Date: Fri Feb 14 07:17:36 2014 New Revision: 261872 URL: http://svnweb.freebsd.org/changeset/base/261872 Log: Fix minor logical error in the XHCI driver. Set correct SETUP packet direction value. MFC after: 2 days Reported by: Horse Ma Modified: head/sys/dev/usb/controller/xhci.c head/sys/dev/usb/controller/xhci.h Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Fri Feb 14 05:25:15 2014 (r261871) +++ head/sys/dev/usb/controller/xhci.c Fri Feb 14 07:17:36 2014 (r261872) @@ -1759,7 +1759,8 @@ restart: /* check wLength */ if (td->td_trb[0].qwTrb0 & htole64(XHCI_TRB_0_WLENGTH_MASK)) { - if (td->td_trb[0].qwTrb0 & htole64(1)) + if (td->td_trb[0].qwTrb0 & + htole64(XHCI_TRB_0_DIR_IN_MASK)) dword |= XHCI_TRB_3_TRT_IN; else dword |= XHCI_TRB_3_TRT_OUT; Modified: head/sys/dev/usb/controller/xhci.h ============================================================================== --- head/sys/dev/usb/controller/xhci.h Fri Feb 14 05:25:15 2014 (r261871) +++ head/sys/dev/usb/controller/xhci.h Fri Feb 14 07:17:36 2014 (r261872) @@ -192,6 +192,7 @@ struct xhci_stream_ctx { struct xhci_trb { volatile uint64_t qwTrb0; +#define XHCI_TRB_0_DIR_IN_MASK (0x80ULL << 0) #define XHCI_TRB_0_WLENGTH_MASK (0xFFFFULL << 48) volatile uint32_t dwTrb2; #define XHCI_TRB_2_ERROR_GET(x) (((x) >> 24) & 0xFF)