Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Feb 2014 13:36:21 +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-10@freebsd.org
Subject:   svn commit: r262370 - stable/10/sys/dev/usb/controller
Message-ID:  <201402231336.s1NDaL7H046630@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Sun Feb 23 13:36:21 2014
New Revision: 262370
URL: http://svnweb.freebsd.org/changeset/base/262370

Log:
  MFC r261872:
  Fix minor logical error in the XHCI driver. Set correct SETUP packet
  direction value.

Modified:
  stable/10/sys/dev/usb/controller/xhci.c
  stable/10/sys/dev/usb/controller/xhci.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/usb/controller/xhci.c
==============================================================================
--- stable/10/sys/dev/usb/controller/xhci.c	Sun Feb 23 13:33:21 2014	(r262369)
+++ stable/10/sys/dev/usb/controller/xhci.c	Sun Feb 23 13:36:21 2014	(r262370)
@@ -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: stable/10/sys/dev/usb/controller/xhci.h
==============================================================================
--- stable/10/sys/dev/usb/controller/xhci.h	Sun Feb 23 13:33:21 2014	(r262369)
+++ stable/10/sys/dev/usb/controller/xhci.h	Sun Feb 23 13:36:21 2014	(r262370)
@@ -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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402231336.s1NDaL7H046630>