diff options
author | imp <imp@FreeBSD.org> | 2005-09-22 18:46:29 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2005-09-22 18:46:29 +0000 |
commit | 36206617bb08c112cd6218f87da97b5627602c70 (patch) | |
tree | 050185f7a9d189908a2dc31ee193a2b7687ffc7d | |
parent | 6ac8681808593a450418e86aad9858f7ad0b9b6c (diff) | |
download | FreeBSD-src-36206617bb08c112cd6218f87da97b5627602c70.zip FreeBSD-src-36206617bb08c112cd6218f87da97b5627602c70.tar.gz |
Forgot to commit ata-card fixes last night. Fix gleb's attempt to do
the right thing by merging in the changes I neglected to commit last
night.
-rw-r--r-- | sys/dev/ata/ata-card.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/ata/ata-card.c b/sys/dev/ata/ata-card.c index f3fd0a0..cc7b9b9 100644 --- a/sys/dev/ata/ata-card.c +++ b/sys/dev/ata/ata-card.c @@ -91,13 +91,13 @@ ata_pccard_attach(device_t dev) { struct ata_channel *ch = device_get_softc(dev); struct resource *io, *ctlio; - int i, rid; + int i, rid, err; /* allocate the io range to get start and length */ rid = ATA_IOADDR_RID; if (!(io = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0, ATA_IOSIZE, RF_ACTIVE))) - return ENXIO; + return (ENXIO); /* setup the resource vectors */ for (i = ATA_DATA; i <= ATA_COMMAND; i++) { @@ -121,7 +121,7 @@ ata_pccard_attach(device_t dev) bus_release_resource(dev, SYS_RES_IOPORT, ATA_IOADDR_RID, io); for (i = ATA_DATA; i < ATA_MAX_RES; i++) ch->r_io[i].res = NULL; - return ENXIO; + return (ENXIO); } ch->r_io[ATA_CONTROL].res = ctlio; ch->r_io[ATA_CONTROL].offset = 0; @@ -132,7 +132,10 @@ ata_pccard_attach(device_t dev) ch->unit = 0; ch->flags |= (ATA_USE_16BIT | ATA_NO_SLAVE); ata_generic_hw(dev); - return ata_probe(dev); + err = ata_probe(dev); + if (err) + return (err); + return (ata_attach(dev)); } static int |