diff options
author | Linaro CI <ci_notify@linaro.org> | 2022-07-10 08:33:02 +0000 |
---|---|---|
committer | Linaro CI <ci_notify@linaro.org> | 2022-07-10 08:33:02 +0000 |
commit | 9bd1230759e9ab67b2c5bf1a7bf6d9364557c0a6 (patch) | |
tree | 5f9a4f02943a5547b9ec91914602e50acc348cb7 /drivers/firmware/arm_scmi/optee.c | |
parent | 0bb83328da2661ac3008eaf1822a8ec56e02b4d8 (diff) | |
parent | 342c6beb7750e02d22846912e88c8ddea7886f17 (diff) |
Merge remote-tracking branch 'msm8939/tracking-qcomlt-msm8939' into integration-linux-qcomltintegration-linux-qcomlt-20220710-092648-v5.19-rc5-420-g9bd1230759e9ab
Diffstat (limited to 'drivers/firmware/arm_scmi/optee.c')
-rw-r--r-- | drivers/firmware/arm_scmi/optee.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/firmware/arm_scmi/optee.c b/drivers/firmware/arm_scmi/optee.c index b503c22cfd32..8abace56b958 100644 --- a/drivers/firmware/arm_scmi/optee.c +++ b/drivers/firmware/arm_scmi/optee.c @@ -117,6 +117,7 @@ struct scmi_optee_channel { u32 channel_id; u32 tee_session; u32 caps; + u32 rx_len; struct mutex mu; struct scmi_chan_info *cinfo; union { @@ -302,6 +303,9 @@ static int invoke_process_msg_channel(struct scmi_optee_channel *channel, size_t return -EIO; } + /* Save response size */ + channel->rx_len = param[2].u.memref.size; + return 0; } @@ -353,6 +357,7 @@ static int setup_dynamic_shmem(struct device *dev, struct scmi_optee_channel *ch shbuf = tee_shm_get_va(channel->tee_shm, 0); memset(shbuf, 0, msg_size); channel->req.msg = shbuf; + channel->rx_len = msg_size; return 0; } @@ -508,7 +513,7 @@ static void scmi_optee_fetch_response(struct scmi_chan_info *cinfo, struct scmi_optee_channel *channel = cinfo->transport_info; if (channel->tee_shm) - msg_fetch_response(channel->req.msg, SCMI_OPTEE_MAX_MSG_SIZE, xfer); + msg_fetch_response(channel->req.msg, channel->rx_len, xfer); else shmem_fetch_response(channel->req.shmem, xfer); } |