Module Name: src
Committed By: matt
Date: Sun Nov 4 12:01:55 UTC 2012
Modified Files:
src/sys/dev/usb: ehci.c ehcireg.h
Log Message:
Fix ETTF PSPD definitions and enable the ETTF PORTSC detection.
Fix EHCI portion of PR/47156.
To generate a diff of this commit:
cvs rdiff -u -r1.192 -r1.193 src/sys/dev/usb/ehci.c
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/usb/ehcireg.h
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.192 src/sys/dev/usb/ehci.c:1.193
--- src/sys/dev/usb/ehci.c:1.192 Fri Jun 22 00:12:23 2012
+++ src/sys/dev/usb/ehci.c Sun Nov 4 12:01:55 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ehci.c,v 1.192 2012/06/22 00:12:23 mrg Exp $ */
+/* $NetBSD: ehci.c,v 1.193 2012/11/04 12:01:55 matt Exp $ */
/*
* Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.192 2012/06/22 00:12:23 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.193 2012/11/04 12:01:55 matt Exp $");
#include "ohci.h"
#include "uhci.h"
@@ -2363,7 +2363,6 @@ ehci_root_ctrl_start(usbd_xfer_handle xf
DPRINTFN(8,("ehci_root_ctrl_start: port status=0x%04x\n", v));
i = UPS_HIGH_SPEED;
-#if 0
if (sc->sc_flags & EHCIF_ETTF) {
/*
* If we are doing embedded transaction translation,
@@ -2373,7 +2372,6 @@ ehci_root_ctrl_start(usbd_xfer_handle xf
*/
i = __SHIFTOUT(v, EHCI_PS_PSPD) * UPS_LOW_SPEED;
}
-#endif
if (v & EHCI_PS_CS) i |= UPS_CURRENT_CONNECT_STATUS;
if (v & EHCI_PS_PE) i |= UPS_PORT_ENABLED;
if (v & EHCI_PS_SUSP) i |= UPS_SUSPEND;
Index: src/sys/dev/usb/ehcireg.h
diff -u src/sys/dev/usb/ehcireg.h:1.33 src/sys/dev/usb/ehcireg.h:1.34
--- src/sys/dev/usb/ehcireg.h:1.33 Mon Oct 17 16:44:02 2011
+++ src/sys/dev/usb/ehcireg.h Sun Nov 4 12:01:55 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ehcireg.h,v 1.33 2011/10/17 16:44:02 mbalmer Exp $ */
+/* $NetBSD: ehcireg.h,v 1.34 2012/11/04 12:01:55 matt Exp $ */
/*
* Copyright (c) 2001, 2004 The NetBSD Foundation, Inc.
@@ -149,10 +149,10 @@
#define EHCI_CONF_CF 0x00000001 /* RW configure flag */
#define EHCI_PORTSC(n) (0x40+4*(n)) /* RO, RW, RWC Port Status reg */
-#define EHCI_PS_PSPD 0x03000000 /* RO port speed (ETTF) */
+#define EHCI_PS_PSPD 0x0C000000 /* RO port speed (ETTF) */
#define EHCI_PS_PSPD_FS 0x00000000 /* Full speed (ETTF) */
-#define EHCI_PS_PSPD_LS 0x01000000 /* Low speed (ETTF) */
-#define EHCI_PS_PSPD_HS 0x02000000 /* High speed (ETTF) */
+#define EHCI_PS_PSPD_LS 0x04000000 /* Low speed (ETTF) */
+#define EHCI_PS_PSPD_HS 0x08000000 /* High speed (ETTF) */
#define EHCI_PS_WKOC_E 0x00400000 /* RW wake on over current ena */
#define EHCI_PS_WKDSCNNT_E 0x00200000 /* RW wake on disconnect ena */
#define EHCI_PS_WKCNNT_E 0x00100000 /* RW wake on connect ena */