aboutsummaryrefslogtreecommitdiff
path: root/drivers/ata/libata-sff.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2008-03-25 21:34:39 +0900
committerJeff Garzik <jgarzik@redhat.com>2008-04-17 15:44:20 -0400
commited82f96425e744dffe62115e46f08eb785c0b2f3 (patch)
treea4c61c016c6bd340d941ad141c14a8f7d837ab7f /drivers/ata/libata-sff.c
parentd8b81b8008a0f131e01bb6eb5c681c900c327e2b (diff)
libata/pdc_adma: make SFF EH handle non-bmdma SFF drivers and standardize pdc_adma ops
pdc_adma has interface similar to SFF but has its own DMA interface. It currently implements noop bmdma ops to avoid crashing ata_bmdma_error_handler() which BTW actually is EH for SFF drivers. This patch makes ata_bmdma_error_handler() dereference bmdma ops iff bmdma_addr is initialized as done in ata_bmdma_post_internal_cmd. This change allows pdc_adma to standardize ops and use SFF error_handler and post_internal_cmd. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Mark Lord <liml@rtr.ca> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-sff.c')
-rw-r--r--drivers/ata/libata-sff.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index c601dcef292..5208ca21f63 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -2014,7 +2014,8 @@ void ata_bmdma_error_handler(struct ata_port *ap)
ap->hsm_task_state = HSM_ST_IDLE;
- if (qc && (qc->tf.protocol == ATA_PROT_DMA ||
+ if (ap->ioaddr.bmdma_addr &&
+ qc && (qc->tf.protocol == ATA_PROT_DMA ||
qc->tf.protocol == ATAPI_PROT_DMA)) {
u8 host_stat;