From ed82f96425e744dffe62115e46f08eb785c0b2f3 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Tue, 25 Mar 2008 21:34:39 +0900 Subject: 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 Cc: Mark Lord Signed-off-by: Jeff Garzik --- drivers/ata/libata-sff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/ata/libata-sff.c') diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index c601dcef2925..5208ca21f634 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; -- cgit v1.2.3