]> git.baikalelectronics.ru Git - kernel.git/commit
spi: dw-mid: clear BUSY flag fist and test other one
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 6 Mar 2015 12:42:01 +0000 (14:42 +0200)
committerMark Brown <broonie@kernel.org>
Sat, 7 Mar 2015 11:22:02 +0000 (11:22 +0000)
commit65255ab357939d5b06aa65fae445c6ee343433be
tree28b2c40697eb3e3e316021541793ed646d177f69
parentc66d7df0ccfef06a957fcf0f2aaff36a4a8231a4
spi: dw-mid: clear BUSY flag fist and test other one

The logic of DMA completion is broken now since test_and_clear_bit() never
returns the other bit is set. It means condition are always false and we have
spi_finalize_current_transfer() called per each DMA completion which is wrong.

The patch fixes logic by clearing BUSY bit first and then check for the other
one.

Fixes: 15968449b139 (spi: dw-mid: split rx and tx callbacks when DMA)
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
drivers/spi/spi-dw-mid.c