aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ex
diff options
context:
space:
mode:
authorMatthew N. Dodd <mdodd@FreeBSD.org>2000-03-13 12:27:21 +0000
committerMatthew N. Dodd <mdodd@FreeBSD.org>2000-03-13 12:27:21 +0000
commit01f1828bbbef3a6b816cf456e14a56d64309f10f (patch)
tree2c78519327d9d77f25fa852036176751105a13b9 /sys/dev/ex
parent0d611a6c29e7fb661e59b556a59ef5b624a642cd (diff)
Notes
Diffstat (limited to 'sys/dev/ex')
-rw-r--r--sys/dev/ex/if_ex.c32
1 files changed, 27 insertions, 5 deletions
diff --git a/sys/dev/ex/if_ex.c b/sys/dev/ex/if_ex.c
index 054aed8de200..bf2624d60485 100644
--- a/sys/dev/ex/if_ex.c
+++ b/sys/dev/ex/if_ex.c
@@ -255,6 +255,9 @@ ex_isa_identify (driver_t *driver, device_t parent)
int tmp;
const char * desc;
+ if (bootverbose)
+ printf("ex_isa_identify()\n");
+
for (ioport = 0x200; ioport < 0x3a0; ioport += 0x10) {
/* No board found at address */
@@ -262,8 +265,16 @@ ex_isa_identify (driver_t *driver, device_t parent)
continue;
}
+ if (bootverbose)
+ printf("ex: Found card at 0x%03x!\n", ioport);
+
/* Board in PnP mode */
- if (eeprom_read(ioport, 0) & 0x01) {
+ if (eeprom_read(ioport, EE_W0) & EE_W0_PNP) {
+ /* Reset the card. */
+ outb(ioport + CMD_REG, Reset_CMD);
+ DELAY(500);
+ if (bootverbose)
+ printf("ex: card at 0x%03x in PnP mode!\n", ioport);
continue;
}
@@ -274,7 +285,7 @@ ex_isa_identify (driver_t *driver, device_t parent)
DELAY(400);
ex_get_address(ioport, enaddr);
- tmp = eeprom_read(ioport, EE_IRQ_No) & IRQ_No_Mask;
+ tmp = eeprom_read(ioport, EE_W1) & EE_W1_INT_SEL;
/* work out which set of irq <-> internal tables to use */
if (ex_card_type(enaddr) == CARD_TYPE_EX_10_PLUS) {
@@ -290,6 +301,9 @@ ex_isa_identify (driver_t *driver, device_t parent)
device_set_driver(child, driver);
bus_set_resource(child, SYS_RES_IRQ, 0, irq, 1);
bus_set_resource(child, SYS_RES_IOPORT, 0, ioport, EX_IOSIZE);
+
+ if (bootverbose)
+ printf("ex: Adding board at 0x%03x, irq %d\n", ioport, irq);
}
return;
@@ -322,16 +336,24 @@ ex_isa_probe(device_t dev)
}
iobase = bus_get_resource_start(dev, SYS_RES_IOPORT, 0);
- if (iobase && !look_for_card(iobase)) {
+ if (!iobase) {
+ printf("ex: no iobase?\n");
+ return(ENXIO);
+ }
+
+ if (!look_for_card(iobase)) {
printf("ex: no card found at 0x%03x\n", iobase);
return(ENXIO);
}
+ if (bootverbose)
+ printf("ex: ex_isa_probe() found card at 0x%03x\n", iobase);
+
/*
* Reset the card.
*/
outb(iobase + CMD_REG, Reset_CMD);
- DELAY(400);
+ DELAY(800);
ex_get_address(iobase, enaddr);
@@ -344,7 +366,7 @@ ex_isa_probe(device_t dev)
ee2irq = ee2irqmap;
}
- tmp = eeprom_read(iobase, EE_IRQ_No) & IRQ_No_Mask;
+ tmp = eeprom_read(iobase, EE_W1) & EE_W1_INT_SEL;
irq = bus_get_resource_start(dev, SYS_RES_IRQ, 0);
if (irq > 0) {