logo       

Re: [PATCH Linux 2.6.12 07/09] NCQ: stop dma before reset: msg#00231

Subject: Re: [PATCH Linux 2.6.12 07/09] NCQ: stop dma before reset
Tejun Heo wrote:
07_NCQ_ahci-stop-dma-before-reset.patch

        AHCI 1.1 mandates stopping dma before issueing COMMRESET.  The
        original code didn't and it resulted in occasional lockup of
        the controller during EH recovery.  This patch fixes the
        problem.

Signed-off-by: Tejun Heo <htejun@xxxxxxxxx>

 ahci.c |    2 ++
 1 files changed, 2 insertions(+)

Index: work/drivers/scsi/ahci.c
===================================================================
--- work.orig/drivers/scsi/ahci.c       2005-06-27 00:20:31.000000000 +0900
+++ work/drivers/scsi/ahci.c    2005-06-27 00:20:31.000000000 +0900
@@ -474,7 +474,9 @@ static void ahci_phy_reset(struct ata_po
        struct ata_device *dev = &ap->device[0];
        u32 tmp;
+ ahci_stop_dma(ap);
        __sata_phy_reset(ap);
+       ahci_start_dma(ap);

This is a bit worrisome, because we really shouldn't be calling ahci_phy_reset() when DMA is -not- stopped. That's a violation of the state machine.

        Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



<Prev in Thread] Current Thread [Next in Thread>