@@ -985,6 +985,7 @@ static int rproc_update_resource_table_entry(struct rproc *rproc,
struct fw_rsc_carveout *tblc, *newc;
struct fw_rsc_devmem *tbld, *newd;
struct fw_rsc_trace *tblt, *newt;
+ struct fw_rsc_vdev *tblv, *newv;
int updated = true;
int i;
@@ -1029,6 +1030,20 @@ static int rproc_update_resource_table_entry(struct rproc *rproc,
memcpy(tblt, newt, request->size);
return updated;
+ case RSC_VDEV:
+ tblv = rsc;
+ newv = request->resource;
+ if (newv->id != tblv->id)
+ break;
+
+ if (request->size > (sizeof(*tblv) +
+ tblv->num_of_vrings * sizeof(struct fw_rsc_vdev_vring) +
+ tblv->config_len))
+ return -ENOSPC;
+
+ memcpy(tblv, newv, request->size);
+
+ return updated;
default:
dev_err(&rproc->dev,
"Unsupported resource type: %d\n",
This patch offers the capability to amend existing RSC_VDEV resource in an existing resource table. Signed-off-by: Loic Pallardy <loic.pallardy@st.com> --- drivers/remoteproc/remoteproc_core.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) -- 1.9.1