Message ID | 20240118112959.1027471-1-dan.scally@ideasonboard.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 4728e3fe2ff1b02b84ddab876d8af5eeb74eee18 |
Headers | show |
Series | dmaengine: pl330: Clear callback_result for re-used descs | expand |
On Thu, 18 Jan 2024 11:29:59 +0000, Daniel Scally wrote: > The pl330 driver re-uses DMA descriptors rather than reallocating > them each time. At present, upon re-use the .callback member is > cleared, but .callback result is not. This causes problems where a > consuming driver sets the .callback_result for some submissions but > not for others, as eventually the function is invoked erronously. > > Clear .callback_result along with .callback > > [...] Applied, thanks! [1/1] dmaengine: pl330: Clear callback_result for re-used descs commit: 4728e3fe2ff1b02b84ddab876d8af5eeb74eee18 Best regards,
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 3cf0b38387ae..ad8e3da1b2cd 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2585,6 +2585,7 @@ static struct dma_pl330_desc *pluck_desc(struct list_head *pool, desc->status = PREP; desc->txd.callback = NULL; + desc->txd.callback_result = NULL; } spin_unlock_irqrestore(lock, flags);
The pl330 driver re-uses DMA descriptors rather than reallocating them each time. At present, upon re-use the .callback member is cleared, but .callback result is not. This causes problems where a consuming driver sets the .callback_result for some submissions but not for others, as eventually the function is invoked erronously. Clear .callback_result along with .callback Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com> --- drivers/dma/pl330.c | 1 + 1 file changed, 1 insertion(+)