Module Name:    src
Committed By:   jakllsch
Date:           Sat May 29 16:52:33 UTC 2010

Modified Files:
        src/sys/dev/usb: ehci.c

Log Message:
Nvidia EHCI controllers do not ignore one or more of the "Port Number",
"Hub Address", "Split Completion Mask" fields in the Queue Head marked
"This field is ignored by the host controller unless the EPS field
indicates a full- or low-speed device.".

Therefore, only populate these fields for full- and low-speed devices.

Fixes PR#37884.


To generate a diff of this commit:
cvs rdiff -u -r1.166 -r1.167 src/sys/dev/usb/ehci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.166 src/sys/dev/usb/ehci.c:1.167
--- src/sys/dev/usb/ehci.c:1.166	Wed Feb 24 22:38:09 2010
+++ src/sys/dev/usb/ehci.c	Sat May 29 16:52:33 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci.c,v 1.166 2010/02/24 22:38:09 dyoung Exp $ */
+/*	$NetBSD: ehci.c,v 1.167 2010/05/29 16:52:33 jakllsch Exp $ */
 
 /*
  * Copyright (c) 2004-2008 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.166 2010/02/24 22:38:09 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.167 2010/05/29 16:52:33 jakllsch Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -1607,11 +1607,14 @@
 		    );
 		sqh->qh.qh_endphub = htole32(
 		    EHCI_QH_SET_MULT(1) |
-		    EHCI_QH_SET_HUBA(hshubaddr) |
-		    EHCI_QH_SET_PORT(hshubport) |
-		    EHCI_QH_SET_CMASK(0x08) | /* XXX */
 		    EHCI_QH_SET_SMASK(xfertype == UE_INTERRUPT ? 0x02 : 0)
 		    );
+		if (speed != EHCI_QH_SPEED_HIGH)
+			sqh->qh.qh_endphub |= htole32(
+			    EHCI_QH_SET_PORT(hshubport) |
+			    EHCI_QH_SET_HUBA(hshubaddr) |
+			    EHCI_QH_SET_CMASK(0x08) /* XXX */
+			);
 		sqh->qh.qh_curqtd = EHCI_NULL;
 		/* Fill the overlay qTD */
 		sqh->qh.qh_qtd.qtd_next = EHCI_NULL;

Reply via email to