summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2013-05-21 23:07:54 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-07 12:53:04 -0700
commit278cbfb57813031b472f6fba7293155f6d71d306 (patch)
treead44bef510d8462b1854dec898b900e375f58748
parent661926a0a9594143ed7f189521d8b8c848f480c7 (diff)
downloadlwn-278cbfb57813031b472f6fba7293155f6d71d306.tar.gz
lwn-278cbfb57813031b472f6fba7293155f6d71d306.zip
sata_rcar: clear STOP bit in bmdma_start() method
commit df7e131f6359f20ed8f0a37db039c4f6420a18c2 upstream. Iff bmdma_setup() has to stop a DMA transfer before starting a new one, then the STOP bit in the ATAPI_CONTROL1 register will remain set (it's only cleared when setting the START bit to 1) and then bmdma_start() method will set both START and STOP bits simultaneously which should abort the transfer being just started. Avoid that by explicitly clearing the STOP bit in bmdma_start() method (in this case it will be ignored on write). Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/ata/sata_rcar.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index caf33f620c35..14a8c738f317 100644
--- a/drivers/ata/sata_rcar.c
+++ b/drivers/ata/sata_rcar.c
@@ -548,6 +548,7 @@ static void sata_rcar_bmdma_start(struct ata_queued_cmd *qc)
/* start host DMA transaction */
dmactl = ioread32(priv->base + ATAPI_CONTROL1_REG);
+ dmactl &= ~ATAPI_CONTROL1_STOP;
dmactl |= ATAPI_CONTROL1_START;
iowrite32(dmactl, priv->base + ATAPI_CONTROL1_REG);
}