Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7938795pxb; Fri, 19 Feb 2021 03:23:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJwudPOjvg9Bl1Rv5z7H43p07ukSGL42PQVJuZSS5quFJp/ikDbpL5qb29TgldtFapVe1sk2 X-Received: by 2002:a05:6402:3487:: with SMTP id v7mr8636127edc.381.1613733806936; Fri, 19 Feb 2021 03:23:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613733806; cv=none; d=google.com; s=arc-20160816; b=Er/Rihx4sD7o9YHMEaQboKmjarYsK/nEuoRSe+VtQmDzSFHxvlVXlxIC3Rndr8nWlh 3aOaV6KAiUthauvkdnpETuoJcJzRH/HiTOLYINMoaIIYpZ87tMBGzM9kRmO8EBqYuQxT uxm825eqzU71YpkLfiGBr7g123WeV7TQ/uFD6WR51IdApSA0tQfNpkkoUVo6UV03ThOL WlBkWGMtk9SDvaM6seRrW9mXn2dfEbfKkp8dNEm3B/65QZs8RYVgilJTxQ4r9E7DquUv +3wx6uD33O9JNCZ74upqN7nWpqrqDBF2LFIAeXKlV34inPC6Ip2+n7S5h8nDVg2/tFTN y6rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=cuI0QyzGfCE9A2PPLZ3Vi0BGYQWHZbe/HztsvrFJe24=; b=VmvzJB8GmU+LCkGeYcq6LEpWv8YA3u2JH8jkPc4gONzDgtGd4O1oedEHYp34EQc+gZ NnLvfVH2sEs9m+czoM4eiHgFwEfuslCAHkacgaZWN89Ep1krFEa9IhX3g5sD0B9wuAYd 8Lv/elgPR6GBo0RPH4VgnsJsAFiqdjXtBXK9Kk+zEbgWu5tzxFjg339BYdl1KKT2/Qrv tMGJMdFdQS9MnkQFjzybM2lKLCT7oKjmFz306DPukVcwcZw1ZJ04rQ6s5Jnqug/sg9nt 36m1StCinQY/uDQaW6mKv/IUg/F7NpBZoiFlLmG7LS8WLpICLIUmeQdThwqlHWT6CwgS 9/oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=3P4NPOjU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id he39si5081317ejc.512.2021.02.19.03.23.03; Fri, 19 Feb 2021 03:23:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=3P4NPOjU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230263AbhBSLW1 (ORCPT + 99 others); Fri, 19 Feb 2021 06:22:27 -0500 Received: from mx07-00178001.pphosted.com ([185.132.182.106]:57866 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230281AbhBSLSw (ORCPT ); Fri, 19 Feb 2021 06:18:52 -0500 Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 11JBGJCb030410; Fri, 19 Feb 2021 12:18:05 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=selector1; bh=cuI0QyzGfCE9A2PPLZ3Vi0BGYQWHZbe/HztsvrFJe24=; b=3P4NPOjUUnLZjDaresCGlDxD1sXjZHpHMZETxJiTnq/RJQpagaIdkzUyhJkJtgbb1fK8 rAGDS4vibG0OvqXv6qF3jZPdKGD16WrJhc4KzPcqdoz0H44RVzHAX8NDPyjZKiSLP24G 6QjDO98h2Ph3fRECo9Okt9DLhxoFn7uGPBRGbwTFZtB9SPcduMMTEaLOQBDfUUeKyrEt UeTnrqAMkPfYI2dIDUIv5gFWJ0ZgJA9BqUyOMzjEWLvX3eq5lWoFVe3qZwOok0cXHddB rlVA1HS4CI2qGLklnARanpDGxdQw4mPlU/KJC87zLE0VkjbLEb9t1Eem1Vt8VyeBh5G7 Gg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 36p7072sud-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 Feb 2021 12:18:05 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 667C0100034; Fri, 19 Feb 2021 12:18:05 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 5A86B2266D7; Fri, 19 Feb 2021 12:18:05 +0100 (CET) Received: from localhost (10.75.127.47) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 19 Feb 2021 12:18:05 +0100 From: Arnaud Pouliquen To: Bjorn Andersson , Ohad Ben-Cohen , Mathieu Poirier , Andy Gross CC: , , , , Subject: [PATCH v5 08/16] rpmsg: glink: add sendto and trysendto ops Date: Fri, 19 Feb 2021 12:14:53 +0100 Message-ID: <20210219111501.14261-9-arnaud.pouliquen@foss.st.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210219111501.14261-1-arnaud.pouliquen@foss.st.com> References: <20210219111501.14261-1-arnaud.pouliquen@foss.st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.47] X-ClientProxiedBy: SFHDAG3NODE3.st.com (10.75.127.9) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.761 definitions=2021-02-19_04:2021-02-18,2021-02-19 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Implement the sendto ops to support the future rpmsg_char update for the vitio backend support. The use of sendto in rpmsg_char is needed as a destination address is requested at least by the virtio backend. The glink implementation does not need a destination address so ignores it. Signed-off-by: Arnaud Pouliquen --- drivers/rpmsg/qcom_glink_native.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index d4e4dd482614..ae2c03b59c55 100644 --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -1332,6 +1332,20 @@ static int qcom_glink_trysend(struct rpmsg_endpoint *ept, void *data, int len) return __qcom_glink_send(channel, data, len, false); } +static int qcom_glink_sendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst) +{ + struct glink_channel *channel = to_glink_channel(ept); + + return __qcom_glink_send(channel, data, len, true); +} + +static int qcom_glink_trysendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst) +{ + struct glink_channel *channel = to_glink_channel(ept); + + return __qcom_glink_send(channel, data, len, false); +} + /* * Finds the device_node for the glink child interested in this channel. */ @@ -1364,7 +1378,9 @@ static const struct rpmsg_device_ops glink_device_ops = { static const struct rpmsg_endpoint_ops glink_endpoint_ops = { .destroy_ept = qcom_glink_destroy_ept, .send = qcom_glink_send, + .sendto = qcom_glink_sendto, .trysend = qcom_glink_trysend, + .trysendto = qcom_glink_trysendto, }; static void qcom_glink_rpdev_release(struct device *dev) -- 2.17.1