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>
This commit is contained in:

committad av
Jeff Garzik

förälder
c429137a67
incheckning
fe06e5f9b7
@@ -147,7 +147,6 @@ static struct ata_port_operations qs_ata_ops = {
|
||||
.prereset = qs_prereset,
|
||||
.softreset = ATA_OP_NULL,
|
||||
.error_handler = qs_error_handler,
|
||||
.post_internal_cmd = ATA_OP_NULL,
|
||||
.lost_interrupt = ATA_OP_NULL,
|
||||
|
||||
.scr_read = qs_scr_read,
|
||||
@@ -255,7 +254,7 @@ static int qs_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val)
|
||||
static void qs_error_handler(struct ata_port *ap)
|
||||
{
|
||||
qs_enter_reg_mode(ap);
|
||||
ata_std_error_handler(ap);
|
||||
ata_sff_error_handler(ap);
|
||||
}
|
||||
|
||||
static int qs_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val)
|
||||
|
Referens i nytt ärende
Block a user