diff options
| author | Søren Schmidt <sos@FreeBSD.org> | 2002-05-30 11:42:13 +0000 |
|---|---|---|
| committer | Søren Schmidt <sos@FreeBSD.org> | 2002-05-30 11:42:13 +0000 |
| commit | bce2c54901ac649d4b2d07ccd009b5677f3d384b (patch) | |
| tree | 20b530b964b322fa7d622eb784a20374e610726f /sys/dev/ata | |
| parent | 48c59fd8c2a2846010a01927e27cba49d90eaee5 (diff) | |
Notes
Diffstat (limited to 'sys/dev/ata')
| -rw-r--r-- | sys/dev/ata/ata-disk.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c index ce3153abc914..60f637f5e9a9 100644 --- a/sys/dev/ata/ata-disk.c +++ b/sys/dev/ata/ata-disk.c @@ -707,17 +707,17 @@ ad_service(struct ad_softc *adp, int change) int device = adp->device->unit; if (adp->device->unit == ATA_MASTER) { - if (adp->device->channel->devices & ATA_ATA_SLAVE && - ((struct ad_softc *) - (adp->device->channel-> - device[ATA_DEV(ATA_SLAVE)].driver))->flags&AD_F_TAG_ENABLED) + if ((adp->device->channel->devices & ATA_ATA_SLAVE) && + (adp->device->channel->device[SLAVE].driver) && + ((struct ad_softc *) (adp->device->channel-> + device[SLAVE].driver))->flags & AD_F_TAG_ENABLED) device = ATA_SLAVE; } else { - if (adp->device->channel->devices & ATA_ATA_MASTER && - ((struct ad_softc *) - (adp->device->channel-> - device[ATA_DEV(ATA_MASTER)].driver))->flags&AD_F_TAG_ENABLED) + if ((adp->device->channel->devices & ATA_ATA_MASTER) && + (adp->device->channel->device[MASTER].driver) && + ((struct ad_softc *) (adp->device->channel-> + device[MASTER].driver))->flags & AD_F_TAG_ENABLED) device = ATA_MASTER; } if (device != adp->device->unit && |
