aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/dma/ioat_dma.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/dma/ioat_dma.c b/drivers/dma/ioat_dma.c
index ecd743f7cc61..6607fdd00b1c 100644
--- a/drivers/dma/ioat_dma.c
+++ b/drivers/dma/ioat_dma.c
@@ -1341,10 +1341,12 @@ static void ioat_dma_start_null_desc(struct ioat_dma_chan *ioat_chan)
1341 */ 1341 */
1342#define IOAT_TEST_SIZE 2000 1342#define IOAT_TEST_SIZE 2000
1343 1343
1344DECLARE_COMPLETION(test_completion);
1344static void ioat_dma_test_callback(void *dma_async_param) 1345static void ioat_dma_test_callback(void *dma_async_param)
1345{ 1346{
1346 printk(KERN_ERR "ioatdma: ioat_dma_test_callback(%p)\n", 1347 printk(KERN_ERR "ioatdma: ioat_dma_test_callback(%p)\n",
1347 dma_async_param); 1348 dma_async_param);
1349 complete(&test_completion);
1348} 1350}
1349 1351
1350/** 1352/**
@@ -1410,7 +1412,8 @@ static int ioat_dma_self_test(struct ioatdma_device *device)
1410 goto free_resources; 1412 goto free_resources;
1411 } 1413 }
1412 device->common.device_issue_pending(dma_chan); 1414 device->common.device_issue_pending(dma_chan);
1413 msleep(1); 1415
1416 wait_for_completion_timeout(&test_completion, msecs_to_jiffies(3000));
1414 1417
1415 if (device->common.device_is_tx_complete(dma_chan, cookie, NULL, NULL) 1418 if (device->common.device_is_tx_complete(dma_chan, cookie, NULL, NULL)
1416 != DMA_SUCCESS) { 1419 != DMA_SUCCESS) {