Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Try harder to avoid 0 ports woth AMD756. From O...
details: https://anonhg.NetBSD.org/src/rev/d71ff202f943
branches: trunk
changeset: 555634:d71ff202f943
user: augustss <augustss%NetBSD.org@localhost>
date: Sun Nov 23 19:20:25 2003 +0000
description:
Try harder to avoid 0 ports woth AMD756. From OpenBSD.
diffstat:
sys/dev/usb/ohci.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r 1c8ea0cb6302 -r d71ff202f943 sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c Sun Nov 23 19:18:06 2003 +0000
+++ b/sys/dev/usb/ohci.c Sun Nov 23 19:20:25 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ohci.c,v 1.144 2003/11/23 19:18:06 augustss Exp $ */
+/* $NetBSD: ohci.c,v 1.145 2003/11/23 19:20:25 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */
/*
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.144 2003/11/23 19:18:06 augustss Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.145 2003/11/23 19:20:25 augustss Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -854,8 +854,11 @@
* The AMD756 requires a delay before re-reading the register,
* otherwise it will occasionally report 0 ports.
*/
- usb_delay_ms(&sc->sc_bus, OHCI_READ_DESC_DELAY);
- sc->sc_noport = OHCI_GET_NDP(OREAD4(sc, OHCI_RH_DESCRIPTOR_A));
+ sc->sc_noport = 0;
+ for (i = 0; i < 10 && sc->sc_noport == 0; i++) {
+ usb_delay_ms(&sc->sc_bus, OHCI_READ_DESC_DELAY);
+ sc->sc_noport = OHCI_GET_NDP(OREAD4(sc, OHCI_RH_DESCRIPTOR_A));
+ }
#ifdef OHCI_DEBUG
if (ohcidebug > 5)
Home |
Main Index |
Thread Index |
Old Index