Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Nvidia EHCI controllers do not ignore one or mor...



details:   https://anonhg.NetBSD.org/src/rev/ccb04f364b66
branches:  trunk
changeset: 755236:ccb04f364b66
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Sat May 29 16:52:33 2010 +0000

description:
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.

diffstat:

 sys/dev/usb/ehci.c |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (36 lines):

diff -r 2c6111376666 -r ccb04f364b66 sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c        Sat May 29 07:58:24 2010 +0000
+++ b/sys/dev/usb/ehci.c        Sat May 29 16:52:33 2010 +0000
@@ -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;



Home | Main Index | Thread Index | Old Index