svn commit: r262372 - stable/8/sys/dev/usb/controller

Hans Petter Selasky hselasky at FreeBSD.org
Sun Feb 23 13:39:16 UTC 2014


Author: hselasky
Date: Sun Feb 23 13:39:15 2014
New Revision: 262372
URL: http://svnweb.freebsd.org/changeset/base/262372

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

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

Modified: stable/8/sys/dev/usb/controller/xhci.c
==============================================================================
--- stable/8/sys/dev/usb/controller/xhci.c	Sun Feb 23 13:37:45 2014	(r262371)
+++ stable/8/sys/dev/usb/controller/xhci.c	Sun Feb 23 13:39:15 2014	(r262372)
@@ -1725,7 +1725,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/8/sys/dev/usb/controller/xhci.h
==============================================================================
--- stable/8/sys/dev/usb/controller/xhci.h	Sun Feb 23 13:37:45 2014	(r262371)
+++ stable/8/sys/dev/usb/controller/xhci.h	Sun Feb 23 13:39:15 2014	(r262372)
@@ -184,6 +184,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)


More information about the svn-src-stable-8 mailing list