NetBSD Problem Report #47156
From www@NetBSD.org Sat Nov 3 14:57:29 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id EB53D63D82F
for <gnats-bugs@gnats.NetBSD.org>; Sat, 3 Nov 2012 14:57:28 +0000 (UTC)
Message-Id: <20121103145728.00B7763D82F@www.NetBSD.org>
Date: Sat, 3 Nov 2012 14:57:27 +0000 (UTC)
From: hashimoto.kenichi.0615@gmail.com
Reply-To: hashimoto.kenichi.0615@gmail.com
To: gnats-bugs@NetBSD.org
Subject: ETTF doesn't work
X-Send-Pr-Version: www-1.0
>Number: 47156
>Category: port-arm
>Synopsis: ETTF doesn't work
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: skrll
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Nov 03 15:00:00 +0000 2012
>Closed-Date: Sun Sep 13 19:34:55 +0000 2015
>Last-Modified: Sun Sep 13 19:34:55 +0000 2015
>Originator: hashimoto kenichi
>Release: 6.99.14
>Organization:
Genetec Corp.
>Environment:
MACHINE: evbarm
MACHINE_ARCH: arm
Building kernel: NETWALKER
>Description:
USB keyboard doesn't work in evbarm/NetWalker.
I think that is wrong bit assignment of EHCI_PS_PSPD.
http://mail-index.netbsd.org/tech-kern/2010/09/09/msg008833.html
However, in the EHCI specification, this bit has been designated as reserve.
I have confirmed by i.MX series (Freescale) only.
>How-To-Repeat:
Built-in USB Keyboard doesn't work, always.
>Fix:
Patch
diff --git a/sys/arch/arm/imx/imxusb.c b/sys/arch/arm/imx/imxusb.c
--- a/sys/arch/arm/imx/imxusb.c
+++ b/sys/arch/arm/imx/imxusb.c
@@ -94,6 +94,8 @@
sc->sc_usbc = usbc;
hsc->sc_bus.hci_private = sc;
+ sc->sc_hsc.sc_flags = EHCIF_ETTF;
+
aprint_normal("\n");
/* per unit registers */
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c
+++ b/sys/dev/usb/ehci.c
@@ -2362,8 +2362,6 @@
v = EOREAD4(sc, EHCI_PORTSC(index));
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,
@@ -2372,8 +2370,10 @@
* the same way as in USBSTATUS.
*/
i = __SHIFTOUT(v, EHCI_PS_PSPD) * UPS_LOW_SPEED;
+ } else {
+ i = UPS_HIGH_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;
diff --git a/sys/dev/usb/ehcireg.h b/sys/dev/usb/ehcireg.h
--- a/sys/dev/usb/ehcireg.h
+++ b/sys/dev/usb/ehcireg.h
@@ -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 */
>Release-Note:
>Audit-Trail:
From: "Matt Thomas" <matt@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/47156 CVS commit: src/sys/dev/usb
Date: Sun, 4 Nov 2012 12:01:56 +0000
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.
From: Kenichi Hashimoto <hashimoto.kenichi.0615@gmail.com>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: PR/47156 CVS commit: src/sys/dev/usb
Date: Tue, 6 Nov 2012 18:57:24 +0900
--14dae93408dd00a24404cdd0a137
Content-Type: text/plain; charset=ISO-8859-1
Why did not commit imxusb.c?
I wrote new patch:
diff --git a/sys/arch/arm/imx/imxusb.c b/sys/arch/arm/imx/imxusb.c
--- a/sys/arch/arm/imx/imxusb.c
+++ b/sys/arch/arm/imx/imxusb.c
@@ -92,7 +92,9 @@
iot = sc->sc_iot = sc->sc_hsc.iot = aa->aa_iot;
sc->sc_unit = aa->aa_unit;
sc->sc_usbc = usbc;
+
hsc->sc_bus.hci_private = sc;
+ hsc->sc_flags |= EHCIF_ETTF;
aprint_normal("\n");
--14dae93408dd00a24404cdd0a137
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Why did not commit imxusb.c? <br><br>I wrote new patch:<br>diff --git a/sys=
/arch/arm/imx/imxusb.c b/sys/arch/arm/imx/imxusb.c<br>--- a/sys/arch/arm/im=
x/imxusb.c<br>+++ b/sys/arch/arm/imx/imxusb.c<br>@@ -92,7 +92,9 @@<br>=A0=
=A0=A0=A0=A0=A0=A0 iot =3D sc->sc_iot =3D sc->sc_hsc.iot =3D aa->a=
a_iot;<br>
=A0=A0=A0=A0=A0=A0=A0 sc->sc_unit =3D aa->aa_unit;<br>=A0=A0=A0=A0=A0=
=A0=A0 sc->sc_usbc =3D usbc;<br>+<br>=A0=A0=A0=A0=A0=A0=A0 hsc->sc_bu=
s.hci_private =3D sc;<br>+=A0=A0=A0=A0=A0=A0 hsc->sc_flags |=3D EHCIF_ET=
TF;<br><br>=A0=A0=A0=A0=A0=A0=A0 aprint_normal("\n");<br><br>
--14dae93408dd00a24404cdd0a137--
Responsible-Changed-From-To: port-arm-maintainer->skrll
Responsible-Changed-By: skrll@NetBSD.org
Responsible-Changed-When: Tue, 01 Sep 2015 15:31:23 +0000
Responsible-Changed-Why:
Take
State-Changed-From-To: open->feedback
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Sun, 13 Sep 2015 06:37:42 +0000
State-Changed-Why:
Recent commits should have fixed this if it wasn't already fixed.
OK to close?
From: hashimoto kenichi <hashimoto.kenichi.0615@gmail.com>
To: gnats-bugs@NetBSD.org, skrll@NetBSD.org, netbsd-bugs@netbsd.org,
gnats-admin@netbsd.org
Cc:
Subject: Re: port-arm/47156 (ETTF doesn't work)
Date: Sun, 13 Sep 2015 22:11:58 +0900
OK.
Please close this issue.
On 2015/09/13 15:37, skrll@NetBSD.org wrote:
> Synopsis: ETTF doesn't work
>
> State-Changed-From-To: open->feedback
> State-Changed-By: skrll@NetBSD.org
> State-Changed-When: Sun, 13 Sep 2015 06:37:42 +0000
> State-Changed-Why:
> Recent commits should have fixed this if it wasn't already fixed.
> OK to close?
>
>
>
State-Changed-From-To: feedback->closed
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Sun, 13 Sep 2015 19:34:55 +0000
State-Changed-Why:
Problem fixed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.