Skip to content

Commit 06c59d9

Browse files
fltoandersson
authored andcommitted
rpmsg: glink: use only lower 16-bits of param2 for CMD_OPEN name length
The name len field of the CMD_OPEN packet is only 16-bits and the upper 16-bits of "param2" are a different "prio" field, which can be nonzero in certain situations, and CMD_OPEN packets can be unexpectedly dropped because of this. Fix this by masking out the upper 16 bits of param2. Fixes: b4f8e52 ("rpmsg: Introduce Qualcomm RPM glink driver") Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 9852d85 commit 06c59d9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/rpmsg/qcom_glink_native.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,8 @@ void qcom_glink_native_rx(struct qcom_glink *glink)
12041204
ret = qcom_glink_rx_open_ack(glink, param1);
12051205
break;
12061206
case GLINK_CMD_OPEN:
1207-
ret = qcom_glink_rx_defer(glink, param2);
1207+
/* upper 16 bits of param2 are the "prio" field */
1208+
ret = qcom_glink_rx_defer(glink, param2 & 0xffff);
12081209
break;
12091210
case GLINK_CMD_TX_DATA:
12101211
case GLINK_CMD_TX_DATA_CONT:

0 commit comments

Comments
 (0)