diff options
author | Tejun Heo <tj@kernel.org> | 2010-05-10 15:41:39 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2010-05-19 13:36:46 -0400 |
commit | fe06e5f9b7c61dc567edace3f4909672067f7d7e (patch) | |
tree | b2242169e8e3b32c63925ed9901fff9d49c26192 /drivers/ata/libata.h | |
parent | c429137a67b82788d24682153bb9c96501a9ef34 (diff) |
libata-sff: separate out BMDMA EH
Some of error handling logic in ata_sff_error_handler() and all of
ata_sff_post_internal_cmd() are for BMDMA. Create
ata_bmdma_error_handler() and ata_bmdma_post_internal_cmd() and move
BMDMA part into those.
While at it, change DMA protocol check to ata_is_dma(), fix
post_internal_cmd to call ap->ops->bmdma_stop instead of directly
calling ata_bmdma_stop() and open code hardreset selection so that
ata_std_error_handler() doesn't have to know about sff hardreset.
As these two functions are BMDMA specific, there's no reason to check
for bmdma_addr before calling bmdma methods if the protocol of the
failed command is DMA. sata_mv and pata_mpc52xx now don't need to set
.post_internal_cmd to ATA_OP_NULL and pata_icside and sata_qstor don't
need to set it to their bmdma_stop routines.
ata_sff_post_internal_cmd() becomes noop and is removed.
This fixes p3 described in clean-up-BMDMA-initialization patch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/libata.h')
-rw-r--r-- | drivers/ata/libata.h | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h index 002390cdc041..4b84ed60324a 100644 --- a/drivers/ata/libata.h +++ b/drivers/ata/libata.h | |||
@@ -38,17 +38,6 @@ struct ata_scsi_args { | |||
38 | void (*done)(struct scsi_cmnd *); | 38 | void (*done)(struct scsi_cmnd *); |
39 | }; | 39 | }; |
40 | 40 | ||
41 | static inline int ata_is_builtin_hardreset(ata_reset_fn_t reset) | ||
42 | { | ||
43 | if (reset == sata_std_hardreset) | ||
44 | return 1; | ||
45 | #ifdef CONFIG_ATA_SFF | ||
46 | if (reset == sata_sff_hardreset) | ||
47 | return 1; | ||
48 | #endif | ||
49 | return 0; | ||
50 | } | ||
51 | |||
52 | /* libata-core.c */ | 41 | /* libata-core.c */ |
53 | enum { | 42 | enum { |
54 | /* flags for ata_dev_read_id() */ | 43 | /* flags for ata_dev_read_id() */ |