diff options
| author | Abel Vesa <abel.vesa@linaro.org> | 2026-06-16 15:53:01 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-07-04 13:39:40 +0200 |
| commit | 00703b96d7eb08bacefae5248639079b83c2863d (patch) | |
| tree | 867c770bbd1106831938d12c80b79aceb60e0730 | |
| parent | 0d0448f8039ec324ee5aea75c420327cfe4dd62d (diff) | |
| download | linux-00703b96d7eb08bacefae5248639079b83c2863d.tar.gz linux-00703b96d7eb08bacefae5248639079b83c2863d.zip | |
misc: fastrpc: Add dma_mask to fastrpc_channel_ctx
[ Upstream commit 9bde43a0e2f469961e18d0a3496a9a74379c22bf ]
dma_set_mask_and_coherent only updates the mask to which the device
dma_mask pointer points to. Add a dma_mask to the channel ctx and set
the device dma_mask to point to that, otherwise the dma_set_mask will
return an error and the dma_set_coherent_mask will be skipped too.
Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20221125071405.148786-11-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: 5401fb4fe10f ("misc: fastrpc: Fix NULL pointer dereference in rpmsg callback")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/misc/fastrpc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index c93bd19e2beb..5bab8c457507 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -214,6 +214,7 @@ struct fastrpc_channel_ctx { struct list_head users; struct miscdevice miscdev; struct kref refcount; + u64 dma_mask; }; struct fastrpc_user { @@ -1691,6 +1692,7 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev) kref_init(&data->refcount); dev_set_drvdata(&rpdev->dev, data); + rdev->dma_mask = &data->dma_mask; dma_set_mask_and_coherent(rdev, DMA_BIT_MASK(32)); INIT_LIST_HEAD(&data->users); spin_lock_init(&data->lock); |
