]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dmaengine: hsu: correct use of channel status register
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 18 Mar 2016 12:26:32 +0000 (14:26 +0200)
committerSasha Levin <sasha.levin@oracle.com>
Wed, 20 Apr 2016 05:03:44 +0000 (01:03 -0400)
commit2d6e4631986ca03cde760acd1c76181559ddc997
tree233b1acb314bd6c48ab06ac05506ed7957e46351
parentbe851fafe2b011c725e107b8b70e6ec72bcf0d05
dmaengine: hsu: correct use of channel status register

[ Upstream commit 4f4bc0abff79dc9d7ccbd3143adbf8ad1f4fe6ab ]

There is a typo in documentation regarding to descriptor empty bit (DESCE)
which is set to 1 when descriptor is empty. Thus, status register at the end of
a transfer usually returns all DESCE bits set and thus it will never be zero.

Moreover, there are 2 bits (CDESC) that encode current descriptor, on which
interrupt has been asserted. In case when we have few descriptors programmed we
might have non-zero value.

Remove DESCE and CDESC bits from DMA channel status register (HSU_CH_SR) when
reading it.

Fixes: 2b49e0c56741 ("dmaengine: append hsu DMA driver")
Cc: stable@vger.kernel.org
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/dma/hsu/hsu.c
drivers/dma/hsu/hsu.h