aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/aic/aic_isa.c
diff options
context:
space:
mode:
authorKenneth D. Merry <ken@FreeBSD.org>2001-03-16 22:20:19 +0000
committerKenneth D. Merry <ken@FreeBSD.org>2001-03-16 22:20:19 +0000
commit76db0ab0176832b39e442f3d540e61d7acc41d78 (patch)
tree3fbc44b48b332e79c943621ed8b0677326b0e607 /sys/dev/aic/aic_isa.c
parent66e845d8dc560f3d09024d3266b247139875e800 (diff)
downloadsrc-76db0ab0176832b39e442f3d540e61d7acc41d78.tar.gz
src-76db0ab0176832b39e442f3d540e61d7acc41d78.zip
Fix a few things in the aic(4) driver:
- enable 10MHz (fast SCSI) operation on boards that support it. (only aic6360 boards with fast SCSI enabled can do it) - bounds check sync periods and offsets passed in from the transport layer - tell the user which resource allocation failed (for the ISA probe) if we weren't able to allocate an IRQ, DRQ or I/O port.
Notes
Notes: svn path=/head/; revision=74370
Diffstat (limited to 'sys/dev/aic/aic_isa.c')
-rw-r--r--sys/dev/aic/aic_isa.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/aic/aic_isa.c b/sys/dev/aic/aic_isa.c
index b89edc23aa2b..e35dcc984457 100644
--- a/sys/dev/aic/aic_isa.c
+++ b/sys/dev/aic/aic_isa.c
@@ -68,14 +68,17 @@ aic_isa_alloc_resources(device_t dev)
rid = 0;
sc->sc_port = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
0ul, ~0ul, AIC_ISA_PORTSIZE, RF_ACTIVE);
- if (!sc->sc_port)
+ if (!sc->sc_port) {
+ device_printf(dev, "I/O port allocation failed\n");
return (ENOMEM);
+ }
if (isa_get_irq(dev) != -1) {
rid = 0;
sc->sc_irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid,
0ul, ~0ul, 1, RF_ACTIVE);
if (!sc->sc_irq) {
+ device_printf(dev, "IRQ allocation failed\n");
aic_isa_release_resources(dev);
return (ENOMEM);
}
@@ -86,6 +89,7 @@ aic_isa_alloc_resources(device_t dev)
sc->sc_drq = bus_alloc_resource(dev, SYS_RES_DRQ, &rid,
0ul, ~0ul, 1, RF_ACTIVE);
if (!sc->sc_drq) {
+ device_printf(dev, "DRQ allocation failed\n");
aic_isa_release_resources(dev);
return (ENOMEM);
}