diff options
author | imp <imp@FreeBSD.org> | 2009-03-12 06:30:59 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2009-03-12 06:30:59 +0000 |
commit | e114ded79445d73746b39faa847cfb84b43c85ab (patch) | |
tree | d1882bd6849a7be061f7ddec2c570fad397aaf45 /sys/dev/ata/ata-card.c | |
parent | c20074511145b45018fa77829a2d65b669ed8309 (diff) | |
download | FreeBSD-src-e114ded79445d73746b39faa847cfb84b43c85ab.zip FreeBSD-src-e114ded79445d73746b39faa847cfb84b43c85ab.tar.gz |
Check the Disk FUNCE recorded in the CIS to see if we should probe for
both disks, or if we should suppress the slave drive. Default to
suppressing the slave, in the case that this REQIURED tuple turns out
to not actually be present...
Diffstat (limited to 'sys/dev/ata/ata-card.c')
-rw-r--r-- | sys/dev/ata/ata-card.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/ata/ata-card.c b/sys/dev/ata/ata-card.c index 09a2c9f..599dea6 100644 --- a/sys/dev/ata/ata-card.c +++ b/sys/dev/ata/ata-card.c @@ -90,6 +90,7 @@ ata_pccard_attach(device_t dev) struct ata_channel *ch = device_get_softc(dev); struct resource *io, *ctlio; int i, rid, err; + uint16_t funce; if (ch->attached) return (0); @@ -132,7 +133,11 @@ ata_pccard_attach(device_t dev) /* initialize softc for this channel */ ch->unit = 0; - ch->flags |= (ATA_USE_16BIT | ATA_NO_SLAVE); + ch->flags |= ATA_USE_16BIT; + funce = 0; /* Default to sane setting of FUNCE */ + pccard_get_funce_disk(dev, &funce); + if (!(funce & PFD_I_D)) + ch-> flags |= ATA_NO_SLAVE; ata_generic_hw(dev); err = ata_probe(dev); if (err) |