dmaengine: ep93xx: Always start from BASE0
authorAlexander Sverdlin <alexander.sverdlin@gmail.com>
Mon, 22 May 2017 14:05:22 +0000 (16:05 +0200)
committerSasha Levin <alexander.levin@verizon.com>
Thu, 8 Jun 2017 10:12:47 +0000 (06:12 -0400)
[ Upstream commit 0037ae47812b1f431cc602100d1d51f37d77b61e ]

The current buffer is being reset to zero on device_free_chan_resources()
but not on device_terminate_all(). It could happen that HW is restarted and
expects BASE0 to be used, but the driver is not synchronized and will start
from BASE1. One solution is to reset the buffer explicitly in
m2p_hw_setup().

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
drivers/dma/ep93xx_dma.c

index 24e5290faa320108fb9a48a754c39ac606ed6927..023c08708b56af0941b9a5c9b70fa15c83eb972f 100644 (file)
@@ -325,6 +325,8 @@ static int m2p_hw_setup(struct ep93xx_dma_chan *edmac)
                | M2P_CONTROL_ENABLE;
        m2p_set_control(edmac, control);
 
+       edmac->buffer = 0;
+
        return 0;
 }