diff options
author | sos <sos@FreeBSD.org> | 2002-12-06 19:29:53 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 2002-12-06 19:29:53 +0000 |
commit | bc8cdd2186c111c9793dfb56fc887d038a521f2b (patch) | |
tree | a48b5989ece1310068cefeb4e31f4f9e20963169 /sys | |
parent | d4c352ef370ddc4c12f23cdae86d25c5c3ae4eb2 (diff) | |
download | FreeBSD-src-bc8cdd2186c111c9793dfb56fc887d038a521f2b.zip FreeBSD-src-bc8cdd2186c111c9793dfb56fc887d038a521f2b.tar.gz |
Fix linking problem when atadisk is not use in ata-all.c
Add dummy intr_func and lock_func to ata-card.c
Dont call ad_print if the driver decided there is no disk.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ata/ata-all.c | 2 | ||||
-rw-r--r-- | sys/dev/ata/ata-card.c | 14 | ||||
-rw-r--r-- | sys/dev/ata/ata-disk.c | 6 |
3 files changed, 19 insertions, 3 deletions
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index e66a4ac..05984d5 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -611,7 +611,9 @@ ata_boot_attach(void) free(ata_delayed_attach, M_TEMP); ata_delayed_attach = NULL; } +#ifdef DEV_ATADISK ata_raid_attach(); +#endif } static void diff --git a/sys/dev/ata/ata-card.c b/sys/dev/ata/ata-card.c index d473ef8..ef1c338 100644 --- a/sys/dev/ata/ata-card.c +++ b/sys/dev/ata/ata-card.c @@ -58,11 +58,21 @@ ata_pccard_match(device_t dev) return (0); /* other devices might need to be matched here */ - return(ENXIO); } static int +ata_pccard_intrnoop(struct ata_channel *ch) +{ + return 1; +} + +static void +ata_pccard_locknoop(struct ata_channel *ch, int type) +{ +} + +static int ata_pccard_probe(device_t dev) { struct ata_channel *ch = device_get_softc(dev); @@ -106,6 +116,8 @@ ata_pccard_probe(device_t dev) ch->unit = 0; ch->flags |= (ATA_USE_16BIT | ATA_NO_SLAVE); + ch->intr_func = ata_pccard_intrnoop; + ch->lock_func = ata_pccard_locknoop; return ata_probe(dev); } diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c index 05e4ad9..9dc33db 100644 --- a/sys/dev/ata/ata-disk.c +++ b/sys/dev/ata/ata-disk.c @@ -219,8 +219,10 @@ ad_attach(struct ata_device *atadev) /* if this disk belongs to an ATA RAID dont print the probe */ if (ata_raiddisk_attach(adp)) adp->flags |= AD_F_RAID_SUBDISK; - else - ad_print(adp); + else { + if (atadev->driver) + ad_print(adp); + } } void |