diff options
| author | Abel Vesa <abel.vesa@linaro.org> | 2026-06-16 15:05:45 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-07-04 13:41:33 +0200 |
| commit | 8ab51b70bd8c4cdf4abfe07a0d029dbf3e6938af (patch) | |
| tree | c305d9182699c47e20d729d6a7474af2d59880a1 | |
| parent | ea2d94ca43dde653fbf90c7d030acf8365091207 (diff) | |
| download | linux-8ab51b70bd8c4cdf4abfe07a0d029dbf3e6938af.tar.gz linux-8ab51b70bd8c4cdf4abfe07a0d029dbf3e6938af.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 571dad99bf82..acfb02392ebe 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -262,6 +262,7 @@ struct fastrpc_channel_ctx { struct fastrpc_device *fdevice; bool secure; bool unsigned_support; + u64 dma_mask; }; struct fastrpc_device { @@ -2175,6 +2176,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); |
