dmaengine: at_xdmac: fix spurious flag status for mem2mem transfers
authorLudovic Desroches <ludovic.desroches@atmel.com>
Mon, 23 Nov 2015 13:09:39 +0000 (14:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Nov 2016 09:48:36 +0000 (10:48 +0100)
commit49163391881af33f6aca6f3e132629974ffb0b1a
treecf609ce61222ec6164b455433c5c55cea37dc8c0
parentfff40ee4d224965d3fc61fa1040d7c77c20d60cc
dmaengine: at_xdmac: fix spurious flag status for mem2mem transfers

commit 95da0c19d164f6df0b71a5187950f47d4b746e91 upstream.

When setting the channel configuration register, the perid field is not
set to 0 since it is useless for mem2mem transfers. Unfortunately, a
device has 0 as perid. It could cause spurious flags status because
the controller could mix some events from the two channels.
For that reason, use the highest perid value for mem2mem transfers since it
doesn't match the perid of other devices.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/at_xdmac.c