diff options
-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); } |