summaryrefslogtreecommitdiff
path: root/drivers/dma/ioat/dma.c
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2015-08-26 13:17:24 -0700
committerVinod Koul <vinod.koul@intel.com>2015-09-21 21:10:05 +0530
commitad4a7b5065c1b4f5176e7d031c3cc2b36f776884 (patch)
treefebe068710e3019801c09c014d6cee2843cb24c3 /drivers/dma/ioat/dma.c
parent6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f (diff)
dmaengine: ioatdma: adding shutdown support
The ioatdma needs to be queisced and block all additional op submission during reboots. When NET_DMA was used, this caused issue as ops were still being sent to ioatdma during reboots even though PCI BME has been turned off. Even though NET_DMA has been deprecated, we need to prevent similar situations. The shutdown handler should address that. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/ioat/dma.c')
-rw-r--r--drivers/dma/ioat/dma.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c
index f66b7e640610..1d5df2ef148b 100644
--- a/drivers/dma/ioat/dma.c
+++ b/drivers/dma/ioat/dma.c
@@ -197,7 +197,8 @@ static void __ioat_start_null_desc(struct ioatdma_chan *ioat_chan)
void ioat_start_null_desc(struct ioatdma_chan *ioat_chan)
{
spin_lock_bh(&ioat_chan->prep_lock);
- __ioat_start_null_desc(ioat_chan);
+ if (!test_bit(IOAT_CHAN_DOWN, &ioat_chan->state))
+ __ioat_start_null_desc(ioat_chan);
spin_unlock_bh(&ioat_chan->prep_lock);
}