From 7a6d2ca81bc029151bfee95fb36a35d0a2424ed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Schmidt?= Date: Fri, 3 Sep 2004 08:23:04 +0000 Subject: [PATCH] Sync promise_mio_command with WIP on the Promise line of SATA controllers. --- sys/dev/ata/ata-chipset.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/dev/ata/ata-chipset.c b/sys/dev/ata/ata-chipset.c index 266cb41812b..15f4e35bc71 100644 --- a/sys/dev/ata/ata-chipset.c +++ b/sys/dev/ata/ata-chipset.c @@ -1515,14 +1515,19 @@ ata_promise_mio_command(struct ata_device *atadev, u_int8_t command, ATA_OUTL(ctlr->r_res2, (atadev->channel->unit + 1) << 2, 0x00000001); - if (command != ATA_READ_DMA && command != ATA_WRITE_DMA) + switch (command) { + default: return ata_generic_command(atadev, command, lba, count, feature); - if (command == ATA_READ_DMA) + case ATA_READ_DMA: wordp[0] = htole32(0x04 | ((atadev->channel->unit+1)<<16) | (0x00<<24)); - if (command == ATA_WRITE_DMA) + break; + + case ATA_WRITE_DMA: wordp[0] = htole32(0x00 | ((atadev->channel->unit+1)<<16) | (0x00<<24)); - wordp[1] = atadev->channel->dma->mdmatab; + break; + } + wordp[1] = htole32(atadev->channel->dma->mdmatab); wordp[2] = 0; ata_promise_apkt((u_int8_t*)wordp, atadev, command, lba, count, feature);