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 /include/linux/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 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 6888b5c36e0f..1d3859016aec 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -1614,7 +1614,6 @@ extern int sata_sff_hardreset(struct ata_link *link, unsigned int *class, | |||
1614 | extern void ata_sff_postreset(struct ata_link *link, unsigned int *classes); | 1614 | extern void ata_sff_postreset(struct ata_link *link, unsigned int *classes); |
1615 | extern void ata_sff_drain_fifo(struct ata_queued_cmd *qc); | 1615 | extern void ata_sff_drain_fifo(struct ata_queued_cmd *qc); |
1616 | extern void ata_sff_error_handler(struct ata_port *ap); | 1616 | extern void ata_sff_error_handler(struct ata_port *ap); |
1617 | extern void ata_sff_post_internal_cmd(struct ata_queued_cmd *qc); | ||
1618 | extern void ata_sff_std_ports(struct ata_ioports *ioaddr); | 1617 | extern void ata_sff_std_ports(struct ata_ioports *ioaddr); |
1619 | #ifdef CONFIG_PCI | 1618 | #ifdef CONFIG_PCI |
1620 | extern int ata_pci_sff_init_host(struct ata_host *host); | 1619 | extern int ata_pci_sff_init_host(struct ata_host *host); |
@@ -1629,6 +1628,8 @@ extern int ata_pci_sff_init_one(struct pci_dev *pdev, | |||
1629 | struct scsi_host_template *sht, void *host_priv, int hflags); | 1628 | struct scsi_host_template *sht, void *host_priv, int hflags); |
1630 | #endif /* CONFIG_PCI */ | 1629 | #endif /* CONFIG_PCI */ |
1631 | 1630 | ||
1631 | extern void ata_bmdma_error_handler(struct ata_port *ap); | ||
1632 | extern void ata_bmdma_post_internal_cmd(struct ata_queued_cmd *qc); | ||
1632 | extern void ata_bmdma_setup(struct ata_queued_cmd *qc); | 1633 | extern void ata_bmdma_setup(struct ata_queued_cmd *qc); |
1633 | extern void ata_bmdma_start(struct ata_queued_cmd *qc); | 1634 | extern void ata_bmdma_start(struct ata_queued_cmd *qc); |
1634 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); | 1635 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); |