From: Arnaud Pouliquen <arnaud.pouliquen@st.com>
To: Ohad Ben-Cohen <ohad@wizery.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
<linux-kernel@vger.kernel.org>,
<linux-remoteproc@vger.kernel.org>,
<linux-arm-msm@vger.kernel.org>
Cc: <arnaud.pouliquen@st.com>, Suman Anna <s-anna@ti.com>,
Fabien DESSENNE <fabien.dessenne@st.com>,
<linux-stm32@st-md-mailman.stormreply.com>
Subject: [PATCH 3/3] rpmsg: smd: implement get_mtu ops
Date: Thu, 5 Sep 2019 16:27:10 +0200 [thread overview]
Message-ID: <1567693630-27544-4-git-send-email-arnaud.pouliquen@st.com> (raw)
In-Reply-To: <1567693630-27544-1-git-send-email-arnaud.pouliquen@st.com>
Implement the get_mtu ops to return the maximum size of
the message that can be sent.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
---
drivers/rpmsg/qcom_smd.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c
index 4abbeea782fa..f233f8d85062 100644
--- a/drivers/rpmsg/qcom_smd.c
+++ b/drivers/rpmsg/qcom_smd.c
@@ -989,6 +989,13 @@ static __poll_t qcom_smd_poll(struct rpmsg_endpoint *ept,
return mask;
}
+static ssize_t qcom_smd_get_mtu(struct rpmsg_endpoint *ept)
+{
+ struct qcom_smd_endpoint *qsept = to_smd_endpoint(ept);
+
+ return qcom_smd_get_tx_avail(qsept->qsch);
+}
+
/*
* Finds the device_node for the smd child interested in this channel.
*/
@@ -1040,6 +1047,7 @@ static const struct rpmsg_endpoint_ops qcom_smd_endpoint_ops = {
.send = qcom_smd_send,
.trysend = qcom_smd_trysend,
.poll = qcom_smd_poll,
+ .get_mtu = qcom_smd_get_mtu,
};
static void qcom_smd_release_device(struct device *dev)
--
2.7.4
prev parent reply other threads:[~2019-09-05 14:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-05 14:27 [PATCH 0/3] Add API to get rpmsg message max length Arnaud Pouliquen
2019-09-05 14:27 ` [PATCH 1/3] rpmsg: core: add API to get message length Arnaud Pouliquen
2019-09-05 14:42 ` Jeffrey Hugo
2019-09-05 16:02 ` Arnaud Pouliquen
2019-09-05 16:18 ` Jeffrey Hugo
2019-09-10 9:56 ` Arnaud Pouliquen
2019-09-05 14:27 ` [PATCH 2/3] rpmsg: glink: implement get_mtu ops Arnaud Pouliquen
2019-09-05 14:27 ` Arnaud Pouliquen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1567693630-27544-4-git-send-email-arnaud.pouliquen@st.com \
--to=arnaud.pouliquen@st.com \
--cc=bjorn.andersson@linaro.org \
--cc=fabien.dessenne@st.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=ohad@wizery.com \
--cc=s-anna@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).