Linux ATA/IDE development
 help / color / mirror / Atom feed
* [PATCH] sata_rcar: clear STOP bit in bmdma_start() method
@ 2013-05-21 19:07 Sergei Shtylyov
  2013-05-21 23:41 ` Tejun Heo
  0 siblings, 1 reply; 4+ messages in thread
From: Sergei Shtylyov @ 2013-05-21 19:07 UTC (permalink / raw)
  To: linux-ide, tj, vladimir.barinov

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>

---
This patch is against 'for-3.10-fixes' branch of Tejun Heo's 'libata.git' repo.

 drivers/ata/sata_rcar.c |    1 +
 1 file changed, 1 insertion(+)

Index: libata/drivers/ata/sata_rcar.c
===================================================================
--- libata.orig/drivers/ata/sata_rcar.c
+++ libata/drivers/ata/sata_rcar.c
@@ -549,6 +549,7 @@ static void sata_rcar_bmdma_start(struct
 
 	/* 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);
 }

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-23 12:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-21 19:07 [PATCH] sata_rcar: clear STOP bit in bmdma_start() method Sergei Shtylyov
2013-05-21 23:41 ` Tejun Heo
2013-05-22 13:12   ` Sergei Shtylyov
2013-05-23 12:14     ` Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox