diff options
author | sos <sos@FreeBSD.org> | 2003-02-26 19:13:17 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 2003-02-26 19:13:17 +0000 |
commit | 789b4b4840730e49ff383ec39433c066d541b4ac (patch) | |
tree | ecd906d6a4a7527ef293829876e94427794ababa | |
parent | 81fbe75842baea284fc8079ba0955903619ca44d (diff) | |
download | FreeBSD-src-789b4b4840730e49ff383ec39433c066d541b4ac.zip FreeBSD-src-789b4b4840730e49ff383ec39433c066d541b4ac.tar.gz |
Fix a reversed test for ATAPI_DEVICE in the Promise setup code.
-rw-r--r-- | sys/dev/ata/ata-chipset.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/ata/ata-chipset.c b/sys/dev/ata/ata-chipset.c index db99f72..8b88de9 100644 --- a/sys/dev/ata/ata-chipset.c +++ b/sys/dev/ata/ata-chipset.c @@ -695,9 +695,8 @@ ata_highpoint_setmode(struct ata_device *atadev, int mode) mode = ata_limit_mode(atadev, mode, ctlr->chip->max_dma); - if (ctlr->chip->cfg1 == HPT366) - mode = ata_limit_mode(atadev, mode, - ATAPI_DEVICE(atadev) ? ATA_PIO_MAX : ATA_UDMA4); + if (ctlr->chip->cfg1 == HPT366 && ATAPI_DEVICE(atadev)); + mode = ata_limit_mode(atadev, mode, ATA_PIO_MAX); mode = ata_highpoint_check_80pin(atadev, mode); @@ -1098,7 +1097,7 @@ ata_promise_setmode(struct ata_device *atadev, int mode) "DMA limited to UDMA33, non-ATA66 cable or device\n"); mode = ATA_UDMA2; } - if (!ATAPI_DEVICE(atadev) && mode > ATA_PIO_MAX) + if (ATAPI_DEVICE(atadev) && mode > ATA_PIO_MAX) mode = ata_limit_mode(atadev, mode, ATA_PIO_MAX); } |