From 1a3a090e78c841c4d90c16eea2c29304405d9df2 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Wed, 2 Jun 2004 09:29:00 -0400 Subject: [PATCH] [libata promise] revert broken taskfile delivery change The ->tf_load and ->exec_command driver hooks were changed to assume that PIO was the only type of taskfile ever delivered to these functions. This will be true... in the future, but not today. In other drivers this change was not needed, but Promise executes commands differently due to its "ATA packet" hardware features, so the Promise drivers need this change reverted. Diagnosis and initial fix by Brad Campbell --- drivers/scsi/sata_promise.c | 4 ++-- drivers/scsi/sata_sx4.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c index 5f6b09ddbb665..01521dfdeaf89 100644 --- a/drivers/scsi/sata_promise.c +++ b/drivers/scsi/sata_promise.c @@ -457,14 +457,14 @@ static void pdc_dma_start(struct ata_queued_cmd *qc) static void pdc_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf) { - if (tf->protocol == ATA_PROT_PIO) + if (tf->protocol != ATA_PROT_DMA) ata_tf_load_mmio(ap, tf); } static void pdc_exec_command_mmio(struct ata_port *ap, struct ata_taskfile *tf) { - if (tf->protocol == ATA_PROT_PIO) + if (tf->protocol != ATA_PROT_DMA) ata_exec_command_mmio(ap, tf); } diff --git a/drivers/scsi/sata_sx4.c b/drivers/scsi/sata_sx4.c index 0b683e78da6aa..ee6eeeaeb0864 100644 --- a/drivers/scsi/sata_sx4.c +++ b/drivers/scsi/sata_sx4.c @@ -826,14 +826,14 @@ out: static void pdc_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf) { - if (tf->protocol == ATA_PROT_PIO) + if (tf->protocol != ATA_PROT_DMA) ata_tf_load_mmio(ap, tf); } static void pdc_exec_command_mmio(struct ata_port *ap, struct ata_taskfile *tf) { - if (tf->protocol == ATA_PROT_PIO) + if (tf->protocol != ATA_PROT_DMA) ata_exec_command_mmio(ap, tf); } -- 2.53.0