Skip to contentSkip to conversation

libata-eh: call freeze hook before port abort

PATCH In review Jeff Garzik 2 participants 2 messages Apr 7, 2009 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libata-eh: call freeze hook before port abort

Tejun,

This patch looks like it might work for !PMP setups, but I am not so sure about PMP.

Any comments? This should help begin addressing the problem where hardware needs the DMA engine turned off before accessing the taskfile registers -- something needed for ata_port_abort() via ata_qc_complete().

Jeff

drivers/ata/libata-eh.c +1 -1
index 0183131..0b7ed40 100644
@@ -1013,8 +1013,8 @@ int ata_port_freeze(struct ata_port *ap)
 
 	WARN_ON(!ap->ops->error_handler);
 
-	nr_aborted = ata_port_abort(ap);
 	__ata_port_freeze(ap);
+	nr_aborted = ata_port_abort(ap);
 
 	return nr_aborted;
 }
#1 lore raw

Hello,

Quoted 2 lines · Jeff Garzik

This patch looks like it might work for !PMP setups, but I am not so sure about PMP.

Looks good to me too. PMP shouldn't make any difference if the port is being frozen. The new behavior is more correct.

Quoted 4 lines

Any comments? This should help begin addressing the problem where hardware needs the DMA engine turned off before accessing the taskfile registers -- something needed for ata_port_abort() via ata_qc_complete().

Yeah, if this can work around the reported problem, I think this is the correct way to fix it.

Thanks.

Signature · 1 line
tejun