From: Andy Shevchenko Date: Fri, 6 Mar 2015 12:42:01 +0000 (+0200) Subject: spi: dw-mid: clear BUSY flag fist and test other one X-Git-Tag: omap-for-v4.1/fixes-rc1~275^2^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=854d2f241d71f6ca08ccde30e6c7c2e403363e52;p=pandora-kernel.git 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: 30c8eb52cc4a (spi: dw-mid: split rx and tx callbacks when DMA) Signed-off-by: Andy Shevchenko Signed-off-by: Mark Brown Cc: stable@vger.kernel.org --- Reading git-diff-tree failed