Don't error out if the number of companion controllers is wrong, just
omplain a go ahead.
This commit is contained in:
parent
309bce04e2
commit
97cd51eada
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: ehci.c,v 1.88 2004/10/26 20:46:16 augustss Exp $ */
|
/* $NetBSD: ehci.c,v 1.89 2004/12/03 08:51:31 augustss Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004 The NetBSD Foundation, Inc.
|
* Copyright (c) 2004 The NetBSD Foundation, Inc.
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.88 2004/10/26 20:46:16 augustss Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.89 2004/12/03 08:51:31 augustss Exp $");
|
||||||
|
|
||||||
#include "ohci.h"
|
#include "ohci.h"
|
||||||
#include "uhci.h"
|
#include "uhci.h"
|
||||||
|
@ -319,6 +319,7 @@ ehci_init(ehci_softc_t *sc)
|
||||||
u_int i;
|
u_int i;
|
||||||
usbd_status err;
|
usbd_status err;
|
||||||
ehci_soft_qh_t *sqh;
|
ehci_soft_qh_t *sqh;
|
||||||
|
u_int ncomp;
|
||||||
|
|
||||||
DPRINTF(("ehci_init: start\n"));
|
DPRINTF(("ehci_init: start\n"));
|
||||||
#ifdef EHCI_DEBUG
|
#ifdef EHCI_DEBUG
|
||||||
|
@ -334,15 +335,17 @@ ehci_init(ehci_softc_t *sc)
|
||||||
sparams = EREAD4(sc, EHCI_HCSPARAMS);
|
sparams = EREAD4(sc, EHCI_HCSPARAMS);
|
||||||
DPRINTF(("ehci_init: sparams=0x%x\n", sparams));
|
DPRINTF(("ehci_init: sparams=0x%x\n", sparams));
|
||||||
sc->sc_npcomp = EHCI_HCS_N_PCC(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) {
|
||||||
aprint_error("%s: wrong number of companions (%d != %d)\n",
|
aprint_error("%s: wrong number of companions (%d != %d)\n",
|
||||||
USBDEVNAME(sc->sc_bus.bdev),
|
USBDEVNAME(sc->sc_bus.bdev),
|
||||||
EHCI_HCS_N_CC(sparams), sc->sc_ncomp);
|
ncomp, sc->sc_ncomp);
|
||||||
#if NOHCI == 0 || NUHCI == 0
|
#if NOHCI == 0 || NUHCI == 0
|
||||||
aprint_error("%s: ohci or uhci probably not configured\n",
|
aprint_error("%s: ohci or uhci probably not configured\n",
|
||||||
USBDEVNAME(sc->sc_bus.bdev));
|
USBDEVNAME(sc->sc_bus.bdev));
|
||||||
#endif
|
#endif
|
||||||
return (USBD_IOERROR);
|
if (ncomp < sc->sc_ncomp)
|
||||||
|
sc->sc_ncomp = ncomp;
|
||||||
}
|
}
|
||||||
if (sc->sc_ncomp > 0) {
|
if (sc->sc_ncomp > 0) {
|
||||||
aprint_normal("%s: companion controller%s, %d port%s each:",
|
aprint_normal("%s: companion controller%s, %d port%s each:",
|
||||||
|
|
Loading…
Reference in New Issue