mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
ioat: fail self-test if wait_for_completion times out
wait_for_completion_timeout reaching timeout was being ignored, fail the self-test if timeout condition occurs. v2: fixup of coding style issues. Signed-off-by: Nicholas Mc Guire <[email protected]> Acked-by: Dave Jiang <[email protected]> Reviewed-by: Prarit Bhargava <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
This commit is contained in:
parent
d8ded50f8b
commit
12385f458a
1 changed files with 6 additions and 3 deletions
|
|
@ -1316,7 +1316,8 @@ static int ioat_xor_val_self_test(struct ioatdma_device *device)
|
|||
|
||||
tmo = wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000));
|
||||
|
||||
if (dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
|
||||
if (tmo == 0 ||
|
||||
dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
|
||||
dev_err(dev, "Self-test xor timed out\n");
|
||||
err = -ENODEV;
|
||||
goto dma_unmap;
|
||||
|
|
@ -1382,7 +1383,8 @@ static int ioat_xor_val_self_test(struct ioatdma_device *device)
|
|||
|
||||
tmo = wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000));
|
||||
|
||||
if (dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
|
||||
if (tmo == 0 ||
|
||||
dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
|
||||
dev_err(dev, "Self-test validate timed out\n");
|
||||
err = -ENODEV;
|
||||
goto dma_unmap;
|
||||
|
|
@ -1434,7 +1436,8 @@ static int ioat_xor_val_self_test(struct ioatdma_device *device)
|
|||
|
||||
tmo = wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000));
|
||||
|
||||
if (dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
|
||||
if (tmo == 0 ||
|
||||
dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
|
||||
dev_err(dev, "Self-test 2nd validate timed out\n");
|
||||
err = -ENODEV;
|
||||
goto dma_unmap;
|
||||
|
|
|
|||
Loading…
Reference in a new issue