diff options
author | julian <julian@FreeBSD.org> | 2004-12-14 04:05:10 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2004-12-14 04:05:10 +0000 |
commit | cc6f359e9f6c691ee3c9450fea139d21f314960c (patch) | |
tree | 52797b6eabbd0b9c1aa719a0d946d3d016ae105f /sys/dev/usb | |
parent | 8c6056312770d87384430a2b5bbc133601af41cd (diff) | |
download | FreeBSD-src-cc6f359e9f6c691ee3c9450fea139d21f314960c.zip FreeBSD-src-cc6f359e9f6c691ee3c9450fea139d21f314960c.tar.gz |
Don't abandon ship just because the number of companions doesn't seem correct.
Obtained from: NetBSD
MFC after: 1 week
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/ehci.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c index 06d5fe4..399e8eb 100644 --- a/sys/dev/usb/ehci.c +++ b/sys/dev/usb/ehci.c @@ -341,6 +341,7 @@ ehci_init(ehci_softc_t *sc) u_int i; usbd_status err; ehci_soft_qh_t *sqh; + u_int ncomp; DPRINTF(("ehci_init: start\n")); #ifdef EHCI_DEBUG @@ -356,11 +357,13 @@ ehci_init(ehci_softc_t *sc) sparams = EREAD4(sc, EHCI_HCSPARAMS); DPRINTF(("ehci_init: sparams=0x%x\n", sparams)); sc->sc_npcomp = EHCI_HCS_N_PCC(sparams); - if (EHCI_HCS_N_CC(sparams) != sc->sc_ncomp) { + ncomp = EHCI_HCS_N_CC(sparams); + if (ncomp != sc->sc_ncomp) { printf("%s: wrong number of companions (%d != %d)\n", USBDEVNAME(sc->sc_bus.bdev), - EHCI_HCS_N_CC(sparams), sc->sc_ncomp); - return (USBD_IOERROR); + ncomp, sc->sc_ncomp); + if (ncomp < sc->sc_ncomp) + sc->sc_ncomp = ncomp; } if (sc->sc_ncomp > 0) { printf("%s: companion controller%s, %d port%s each:", |