Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Do not process the abnormality system procedure, ...



details:   https://anonhg.NetBSD.org/src/rev/383e05e11a2e
branches:  trunk
changeset: 755926:383e05e11a2e
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue Jun 29 04:02:07 2010 +0000

description:
Do not process the abnormality system procedure, when Run/Stop=0 and
HCHalted=1 - this is normal. Fixes a bug that system hangs at boot time
when a USB mass storage is connected via UHCI. This problem was observed
on Intel D410PT and was fixed by Katsumi Yamada.

diffstat:

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

diffs (29 lines):

diff -r ae2969128368 -r 383e05e11a2e sys/dev/usb/uhci.c
--- a/sys/dev/usb/uhci.c        Mon Jun 28 21:58:02 2010 +0000
+++ b/sys/dev/usb/uhci.c        Tue Jun 29 04:02:07 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uhci.c,v 1.232 2010/02/24 22:38:09 dyoung Exp $        */
+/*     $NetBSD: uhci.c,v 1.233 2010/06/29 04:02:07 msaitoh Exp $       */
 /*     $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $       */
 
 /*
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.232 2010/02/24 22:38:09 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.233 2010/06/29 04:02:07 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1328,7 +1328,9 @@
                printf("%s: host controller process error\n",
                       device_xname(sc->sc_dev));
        }
-       if (status & UHCI_STS_HCH) {
+
+       /* When HCHalted=1 and Run/Stop=0 , it is normal */
+       if ((status & UHCI_STS_HCH) && (UREAD2(sc, UHCI_CMD) & UHCI_CMD_RS)) {
                /* no acknowledge needed */
                if (!sc->sc_dying) {
                        printf("%s: host controller halted\n",



Home | Main Index | Thread Index | Old Index