Loading drivers/rpmsg/qcom_glink_native.c +33 −4 Original line number Diff line number Diff line Loading @@ -1451,6 +1451,8 @@ static int __qcom_glink_send(struct glink_channel *channel, } __packed req; int ret; unsigned long flags; int chunk_size = len; int left_size = 0; if (!glink->intentless) { while (!intent) { Loading Loading @@ -1484,18 +1486,45 @@ static int __qcom_glink_send(struct glink_channel *channel, iid = intent->id; } if (wait && (chunk_size > SZ_8K)) { chunk_size = SZ_8K; left_size = len - chunk_size; } req.msg.cmd = cpu_to_le16(RPM_CMD_TX_DATA); req.msg.param1 = cpu_to_le16(channel->lcid); req.msg.param2 = cpu_to_le32(iid); req.chunk_size = cpu_to_le32(len); req.left_size = cpu_to_le32(0); req.chunk_size = cpu_to_le32(chunk_size); req.left_size = cpu_to_le32(left_size); ret = qcom_glink_tx(glink, &req, sizeof(req), data, len, wait); ret = qcom_glink_tx(glink, &req, sizeof(req), data, chunk_size, wait); /* Mark intent available if we failed */ if (ret && intent) if (ret && intent) { intent->in_use = false; return ret; } while (left_size > 0) { chunk_size = left_size; if (chunk_size > SZ_8K) chunk_size = SZ_8K; left_size -= chunk_size; req.msg.cmd = cpu_to_le16(RPM_CMD_TX_DATA_CONT); req.msg.param1 = cpu_to_le16(channel->lcid); req.msg.param2 = cpu_to_le32(iid); req.chunk_size = cpu_to_le32(chunk_size); req.left_size = cpu_to_le32(left_size); ret = qcom_glink_tx(glink, &req, sizeof(req), data, chunk_size, wait); /* Mark intent available if we failed */ if (ret && intent) { intent->in_use = false; break; } } return ret; } Loading Loading
drivers/rpmsg/qcom_glink_native.c +33 −4 Original line number Diff line number Diff line Loading @@ -1451,6 +1451,8 @@ static int __qcom_glink_send(struct glink_channel *channel, } __packed req; int ret; unsigned long flags; int chunk_size = len; int left_size = 0; if (!glink->intentless) { while (!intent) { Loading Loading @@ -1484,18 +1486,45 @@ static int __qcom_glink_send(struct glink_channel *channel, iid = intent->id; } if (wait && (chunk_size > SZ_8K)) { chunk_size = SZ_8K; left_size = len - chunk_size; } req.msg.cmd = cpu_to_le16(RPM_CMD_TX_DATA); req.msg.param1 = cpu_to_le16(channel->lcid); req.msg.param2 = cpu_to_le32(iid); req.chunk_size = cpu_to_le32(len); req.left_size = cpu_to_le32(0); req.chunk_size = cpu_to_le32(chunk_size); req.left_size = cpu_to_le32(left_size); ret = qcom_glink_tx(glink, &req, sizeof(req), data, len, wait); ret = qcom_glink_tx(glink, &req, sizeof(req), data, chunk_size, wait); /* Mark intent available if we failed */ if (ret && intent) if (ret && intent) { intent->in_use = false; return ret; } while (left_size > 0) { chunk_size = left_size; if (chunk_size > SZ_8K) chunk_size = SZ_8K; left_size -= chunk_size; req.msg.cmd = cpu_to_le16(RPM_CMD_TX_DATA_CONT); req.msg.param1 = cpu_to_le16(channel->lcid); req.msg.param2 = cpu_to_le32(iid); req.chunk_size = cpu_to_le32(chunk_size); req.left_size = cpu_to_le32(left_size); ret = qcom_glink_tx(glink, &req, sizeof(req), data, chunk_size, wait); /* Mark intent available if we failed */ if (ret && intent) { intent->in_use = false; break; } } return ret; } Loading