Commit abf538ae authored by Dave Jiang's avatar Dave Jiang Committed by Vinod Koul

dmaengine: ioatdma: PQ err descriptors should callback with err results

The err completion callback is missing from the error handler. Two
reasons we never hit this. On Xeon because the hw err workaround, the
completion happens on a NULL descriptor so we don't do callback on the
PQ descriptor. On Atom we have DWBES support and thus the callback already
happened or we don't halt on error, so that was take cared of. But this code
needs to be corrected for future error handlers.
Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
Acked-by Dan Williams <dan.j.williams@intel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 681d15ec
...@@ -489,6 +489,7 @@ static void ioat3_eh(struct ioat2_dma_chan *ioat) ...@@ -489,6 +489,7 @@ static void ioat3_eh(struct ioat2_dma_chan *ioat)
struct ioat_chan_common *chan = &ioat->base; struct ioat_chan_common *chan = &ioat->base;
struct pci_dev *pdev = to_pdev(chan); struct pci_dev *pdev = to_pdev(chan);
struct ioat_dma_descriptor *hw; struct ioat_dma_descriptor *hw;
struct dma_async_tx_descriptor *tx;
u64 phys_complete; u64 phys_complete;
struct ioat_ring_ent *desc; struct ioat_ring_ent *desc;
u32 err_handled = 0; u32 err_handled = 0;
...@@ -534,6 +535,16 @@ static void ioat3_eh(struct ioat2_dma_chan *ioat) ...@@ -534,6 +535,16 @@ static void ioat3_eh(struct ioat2_dma_chan *ioat)
dev_err(to_dev(chan), "%s: fatal error (%x:%x)\n", dev_err(to_dev(chan), "%s: fatal error (%x:%x)\n",
__func__, chanerr, err_handled); __func__, chanerr, err_handled);
BUG(); BUG();
} else { /* cleanup the faulty descriptor */
tx = &desc->txd;
if (tx->cookie) {
dma_cookie_complete(tx);
dma_descriptor_unmap(tx);
if (tx->callback) {
tx->callback(tx->callback_param);
tx->callback = NULL;
}
}
} }
writel(chanerr, chan->reg_base + IOAT_CHANERR_OFFSET); writel(chanerr, chan->reg_base + IOAT_CHANERR_OFFSET);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment