diff options
author | brian <brian@FreeBSD.org> | 2002-04-10 01:15:23 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2002-04-10 01:15:23 +0000 |
commit | 38fc52afeafcf26886365df326357019247f2724 (patch) | |
tree | 4ce7a710b6795886d4593c0a8c0d8260ba691567 /sys/dev/digi/digi.c | |
parent | cd534ec28e063d5cfb62791130f77ae98176f6ab (diff) | |
download | FreeBSD-src-38fc52afeafcf26886365df326357019247f2724.zip FreeBSD-src-38fc52afeafcf26886365df326357019247f2724.tar.gz |
Use the PCI port for pci cards, not just for PCIXR cards.
Add the card name to the error message for the first initialisation
failure, giving us more info about what was actually discovered.
This code has been tested by Robert Suetterlin <robert@mpe.mpg.de>
to work on a PCI Xem card.
Diffstat (limited to 'sys/dev/digi/digi.c')
-rw-r--r-- | sys/dev/digi/digi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c index 18ea046..df13183 100644 --- a/sys/dev/digi/digi.c +++ b/sys/dev/digi/digi.c @@ -298,16 +298,16 @@ digi_init(struct digi_softc *sc) case PCXEM: case PCIEPCX: case PCIXR: - if (sc->model == PCIXR) + if (sc->pcibus) PCIPORT = FEPRST; else outb(sc->port, FEPRST | FEPMEM); - for (i = 0; ((sc->model == PCIXR ? PCIPORT : inb(sc->port)) & + for (i = 0; ((sc->pcibus ? PCIPORT : inb(sc->port)) & FEPMASK) != FEPRST; i++) { if (i > 1000) { - log(LOG_ERR, "digi%d: init reset failed\n", - sc->res.unit); + log(LOG_ERR, "digi%d: %s init reset failed\n", + sc->res.unit, sc->name); return (EIO); } tsleep(sc, PUSER | PCATCH, "digiinit0", 1); @@ -348,7 +348,7 @@ digi_init(struct digi_softc *sc) ptr = sc->setwin(sc, MISCGLOBAL); W(ptr) = 0; - if (sc->model == PCIXR) { + if (sc->pcibus) { PCIPORT = FEPCLR; resp = FEPRST; } else if (sc->model == PCXEVE) { @@ -359,7 +359,7 @@ digi_init(struct digi_softc *sc) resp = FEPRST | FEPMEM; } - for (i = 0; ((sc->model == PCIXR ? PCIPORT : inb(sc->port)) & FEPMASK) + for (i = 0; ((sc->pcibus ? PCIPORT : inb(sc->port)) & FEPMASK) == resp; i++) { if (i > 1000) { log(LOG_ERR, "digi%d: BIOS start failed\n", |