summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2002-05-23 08:17:16 +0000
committersos <sos@FreeBSD.org>2002-05-23 08:17:16 +0000
commit43293f1c75ffcde0b4ef23ecf7101830ecf20e76 (patch)
tree7e2ac5927350a14a811183cc2942b14dce5e4a0c /sys
parent7e058286b8325e9600423a24d5d9cf22c5f4c783 (diff)
downloadFreeBSD-src-43293f1c75ffcde0b4ef23ecf7101830ecf20e76.zip
FreeBSD-src-43293f1c75ffcde0b4ef23ecf7101830ecf20e76.tar.gz
Dont panic if only one disk on a channel can do tagged queueing.
MFC: asap
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ata/ata-disk.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c
index d7ac069..f28f7f4 100644
--- a/sys/dev/ata/ata-disk.c
+++ b/sys/dev/ata/ata-disk.c
@@ -675,17 +675,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 &&
OpenPOWER on IntegriCloud