Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7939356pxb; Fri, 19 Feb 2021 03:24:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxgPaOKqVbCpF0eGYJxGHDwvut5c5ktoBAJkiYg6tRgtCGDVDw7rz3vcYUv5sRThaf9aW4k X-Received: by 2002:a17:906:1447:: with SMTP id q7mr8722115ejc.27.1613733875044; Fri, 19 Feb 2021 03:24:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613733875; cv=none; d=google.com; s=arc-20160816; b=v16LEtCQCljoIVvxOwaKzwviR/ydNcDSebxizr3j+rm2QoTlRFAssTVU67a6++ZbvE T5TPwQ1+/QWIAIkdvITRkVR6PUtFEOBbisCvt6fhMcl8iPhDgqakIgs5Xe8mHeemfua6 ZRYKy26nBdAouOpKH+O0FME4wz4TrG0G/ewx90PoryOz7x3rBS5SJTIDWU9DdV7Y7hak Ju/gvpnw6BfTuxPcGvKkweYgpvzinY6iqDLEsBCPuyO833/qd2vjFpbpNFcLQGQaERm1 WjG0UJ3YFuJUy2RZHxfarKxNEaC2PJEQ5noRwL5WfnzeputRslWBbjtWcURNFjFdLZYX QzEg== 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=9otI8hBeC46Slwkg9Iec+E1E6ulCMz/xpbQrJjFhILA=; b=klmi7hEvCVo7z9ai5kPs01L56edZS4G9oIqqmBVu88e/0bR6NHMko1M483px6do+4P 3WiKv6sBSslJlS3Yfo9u1TMKlNr9ULKJLR/GI9vISEcczTumnJyDMZkjoAUoFn7OedNj aiw5/JR7J9pnT/L1SO6Um7I4xXmLWvnXlzSz/N/Wq/W4rjGjNasW1LWpRHUnneYgsGns mGhwGCjJVNQs45pTOQI1/HerhOSev5MZc0GBhMN6AhrNLjbrd1JZRCYAil0F5izmbyUn BJjnBQUi5yC4qnNNYV1R1n/lTMRotEKWtmvIHgT1NFpgFJWVAC4g3pYNkf4QP8zxLUOi k3lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=nfbXS3sy; 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 i9si4359877ejz.721.2021.02.19.03.24.11; Fri, 19 Feb 2021 03:24:35 -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=nfbXS3sy; 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 S230140AbhBSLXj (ORCPT + 99 others); Fri, 19 Feb 2021 06:23:39 -0500 Received: from mx07-00178001.pphosted.com ([185.132.182.106]:57955 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230407AbhBSLTx (ORCPT ); Fri, 19 Feb 2021 06:19:53 -0500 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 11JBIH3O024160; Fri, 19 Feb 2021 12:19:07 +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=9otI8hBeC46Slwkg9Iec+E1E6ulCMz/xpbQrJjFhILA=; b=nfbXS3sy4uWQ0xrA03klZDh0wq+a+D69/LixFP3MUJ36WSHERVi7XabcR2IhyLVjtEZt S/XwHheSen3Y7FhtMcJDtylF3mSYTPf8gdm3MZhKwMUyBesHv2Y9JATHw7ZtS7FWlr6W TnY7wel/dBScZEpOTVW7W+8HinC3mafVsD6CdbdGF46h954/KJKmxrEZXc6GH+LEHBQk B100oCGvQ6fzrF2efgbI0o7hYbKyaJVzL8mr2v6yLPTrsCX+8e6GM0mzMVqpXwYk7wMC l2Vj6TtnBdmyQZW0bjKjtjTMSM58ane6p5OjKDo2Ycd2D9VkmFLnt3Jrep7dpi9ZTAUw bA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 36sqadeyvw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 Feb 2021 12:19:07 +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 2C88A10002A; Fri, 19 Feb 2021 12:19:07 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 1FEF7221760; Fri, 19 Feb 2021 12:19:07 +0100 (CET) Received: from localhost (10.75.127.44) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 19 Feb 2021 12:19:06 +0100 From: Arnaud Pouliquen To: Bjorn Andersson , Ohad Ben-Cohen , Mathieu Poirier , Andy Gross CC: , , , , Subject: [PATCH v5 10/16] rpmsg: char: use sendto to specify the message destination address Date: Fri, 19 Feb 2021 12:14:55 +0100 Message-ID: <20210219111501.14261-11-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.44] X-ClientProxiedBy: SFHDAG2NODE2.st.com (10.75.127.5) 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 When the endpoint device is created by the application a destination address as been specified in the rpmsg_channel_info structure. Send the message to this address instead of the default one. Signed-off-by: Arnaud Pouliquen --- drivers/rpmsg/rpmsg_char.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rpmsg/rpmsg_char.c b/drivers/rpmsg/rpmsg_char.c index 83c10b39b139..09ae1304837c 100644 --- a/drivers/rpmsg/rpmsg_char.c +++ b/drivers/rpmsg/rpmsg_char.c @@ -225,9 +225,9 @@ static ssize_t rpmsg_eptdev_write_iter(struct kiocb *iocb, } if (filp->f_flags & O_NONBLOCK) - ret = rpmsg_trysend(eptdev->ept, kbuf, len); + ret = rpmsg_trysendto(eptdev->ept, kbuf, len, eptdev->chinfo.dst); else - ret = rpmsg_send(eptdev->ept, kbuf, len); + ret = rpmsg_sendto(eptdev->ept, kbuf, len, eptdev->chinfo.dst); unlock_eptdev: mutex_unlock(&eptdev->ept_lock); -- 2.17.1