Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5056284imm; Tue, 9 Oct 2018 09:04:40 -0700 (PDT) X-Google-Smtp-Source: ACcGV60O2J+sU+0Smv72a3FWFGEKhtvQo7VMTeBaIhvZBuCPjd50dnEIG5NT3av0KNJmN/nq2A5N X-Received: by 2002:a17:902:7290:: with SMTP id d16-v6mr15498484pll.90.1539101080901; Tue, 09 Oct 2018 09:04:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539101080; cv=none; d=google.com; s=arc-20160816; b=x15uqZjvkjpP3FUJE43qhxzlVmtWpHpgyY5uNLzXVGRl29TMzq0u9/TQqQ2+8TLlwb 8A7eDW4VzcS9t86Bprmo/R57hXTSusvn5K7vtnvuOo/bH72pBuZk5/xzJ7uWlU9oL9fc S5B6ycS0ZdKNXFMet9UyZLjVil8Qe5lLJdsrIi3GjOY1C7vvBKFtz7pRlWrrWQBmqzQe 9aqE3Qxm81tJnXLf8XkcY3tV9AVOSxMQhzvIlsWaQaQl9XNK7cXus4mqchwfe5n/8IS3 TBqQeRmynP6mZT8ImuIpDhuxeqkM4YkQ5nkPl2PSxpL/M3egjg/Sv5EhUKoLMbT8JMlO tDIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject; bh=h2g3MWQq8+D7AB4EZZX5/0+UFxLPtiBkdaAQaldGMQ8=; b=Hn98MgyAxqq0T0DNWIt4QXR8F6kY8Fe4KJA9nxl0WWE/zNjdoMf4vcD3jMengtp+hZ Rmy2G+xXuiGwoDmXk0kn+Bk6e4Xv+CtyrHDlcNx9ylEEVObvwWX+9lDHoiX9UvPwJcES h7MZfza6Ox5pENXPg6nDD+UE45QCpHlF4pOA9D+WzHFNjerBFNbjbhlH1x8W4mZiFRvS v01xqpAraZaQeqRl02DjNLc3FwRS5nHXfktyoDOgUwbFVPxQBvkRGdk8rh9dava3EjAr NOoAodWcMWQK1+E05c87f+yJ1CbYLZvzo0Kh1nAN+BhalEzzJyxhWaGgW6mFqt+Zp876 I9AA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q23-v6si3554562pll.155.2018.10.09.09.04.26; Tue, 09 Oct 2018 09:04:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726607AbeJIXUU (ORCPT + 99 others); Tue, 9 Oct 2018 19:20:20 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:24863 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726492AbeJIXUT (ORCPT ); Tue, 9 Oct 2018 19:20:19 -0400 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w99G1NZp014237; Tue, 9 Oct 2018 18:02:39 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2mxjgxst34-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 09 Oct 2018 18:02:39 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 7C55938; Tue, 9 Oct 2018 16:02:38 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag3node1.st.com [10.75.127.7]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0C3C05432; Tue, 9 Oct 2018 16:02:38 +0000 (GMT) Received: from [10.201.23.162] (10.75.127.45) by SFHDAG3NODE1.st.com (10.75.127.7) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Tue, 9 Oct 2018 18:02:37 +0200 Subject: Re: [PATCH V4 0/4] Add TIOCM Signals support for RPMSG char devices To: Bjorn Andersson CC: Arun Kumar Neelakantam , , , , , References: <1538980699-21516-1-git-send-email-aneela@codeaurora.org> <20181008162325.GA1331@tuxbook-pro> From: Arnaud Pouliquen Openpgp: preference=signencrypt Autocrypt: addr=arnaud.pouliquen@st.com; prefer-encrypt=mutual; keydata= xsFNBFZu+HIBEAC/bt4pnj18oKkUw40q1IXSPeDFOuuznWgFbjFS6Mrb8axwtnxeYicv0WAL rWhlhQ6W2TfKDJtkDygkfaZw7Nlsj57zXrzjVXuy4Vkezxtg7kvSLYItQAE8YFSOrBTL58Yd d5cAFz/9WbWGRf0o9MxFavvGQ9zkfHVd+Ytw6dJNP4DUys9260BoxKZZMaevxobh5Hnram6M gVBYGMuJf5tmkXD/FhxjWEZ5q8pCfqZTlN9IZn7S8d0tyFL7+nkeYldA2DdVplfXXieEEURQ aBjcZ7ZTrzu1X/1RrH1tIQE7dclxk5pr2xY8osNePmxSoi+4DJzpZeQ32U4wAyZ8Hs0i50rS VxZuT2xW7tlNcw147w+kR9+xugXrECo0v1uX7/ysgFnZ/YasN8E+osM2sfa7OYUloVX5KeUK yT58KAVkjUfo0OdtSmGkEkILWQLACFEFVJPz7/I8PisoqzLS4Jb8aXbrwgIg7d4NDgW2FddV X9jd1odJK5N68SZqRF+I8ndttRGK0o7NZHH4hxJg9jvyEELdgQAmjR9Vf0eZGNfowLCnVcLq s+8q3nQ1RrW5cRBgB8YT2kC8wwY5as8fhfp4846pe2b8Akh0+Vba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TEReGBYSVUBHx7GF1e3L/IMZZMquggEsixD8CYMOzahCEZ7UUwD5LKxRfmBWBgK 36tfTyducLyZtGB3mbJYfWeI7aiFgYsd5ehov6OIBlOz5iOshd97+wbbmziYEp6jWMIMX+Em zqSvS5ETZydayO5JBbw7fFBd1nGVYk1WL6Ll72g+iEnqgIckMtxey1TgfT7GhPkR7hl54ZAe 8mOik8I/F6EW8XyQAA2P Message-ID: Date: Tue, 9 Oct 2018 18:02:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181008162325.GA1331@tuxbook-pro> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.75.127.45] X-ClientProxiedBy: SFHDAG8NODE2.st.com (10.75.127.23) To SFHDAG3NODE1.st.com (10.75.127.7) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-10-09_11:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hello Bjorn, On 10/08/2018 06:23 PM, Bjorn Andersson wrote: > On Mon 08 Oct 06:08 PDT 2018, Arnaud Pouliquen wrote: > >> Hi Arun, Bjorn, >> >> On 10/08/2018 08:38 AM, Arun Kumar Neelakantam wrote: >>> Glink transport support signals to exchange state notification between >>> local and remote side clients. Adding support to send/receive the signal >>> command and notify the clients through callback and POLL notification. >> >> Please correct me if i'm wrong...My concern here is that this patchset >> implements a rpmsg service in the rpmsg core. I would separate this from >> the rpmsg core, as this is not part of the rpmsg protocol but seems >> linked to the serial protocol itself. >> Could it be implemented in rpmsg_char, using a dedicated channel...? >> > > rpmsg_char does expose a rpmsg channel (be it virtio, smd or glink) to > user space. This patch series add support for invoking TIOCMGET and > TIOCMSET on these channels. I'm not familiar with this concept, that could explain that i don't understand this patchset... TIOCMGET and TIOCMSET is related to the serial/console flow control, to control remote modem/processor, right? it seems be implemented only to support the rpmsg_char ioctl interface. When i have a look to the glink code, signal is treated by a message sent to remote processor. Therefore it seems that it could be treated as a service on top of rpmsg (so treat it in rpmsg_char instead of extend the rpmsg protocol to treat it in glink driver). > > In addition to adding the client side of this to rpmsg_char it provides > this support for glink, but the same mechanism exists in smd - while > this is not supported (today) by the virtio rpmsg. This is my main concern, i would like to be sure that this service is not related to specific needs introduced by the rmpsg char implementation: In this case this should not be part of the rpmsg core but perhaps some ops directly provided to the rpmsg_char on registration (rpmsg_chrdev_register_device?)... > > > I'm uncertain of how we could implement this mechanism for virtio rpmsg, > given that it as a transport doesn't really have a concept of > channels/flows - but it's really useful to have! > > PS. rpmsg_set_signals() can be called from any rpmsg device to perform > flow control of the communication channel. For my point of view this patch-set extends the rpmsg protocol to add channel flow control. Does it make sense to have a flow control in rpmsg protocol? if yes, should it be linked to a channel or to the remote processor itself? Extra comment: associated documentation update is missing. Regards, Arnaud > > Regards, > Bjorn > >> Regards >> Arnaud >> >>> >>> Changes since v1: >>> - Split the patches as per functional areas like core, char, glink >>> - Add set, clear mask for TIOCMSET >>> - Merge the char signal callback and POLLPRI patches >>> >>> Changes since v2: >>> - Modify the rpmsg_get_signals function prototype >>> >>> Changes since v3: >>> - Correct the TICOMGET case handling as per new rpmsg_get_signals prototype >>> - Update the rpmsg_get_signals function header >>> >>> Arun Kumar Neelakantam (4): >>> rpmsg: core: Add signal API support >>> rpmsg: glink: Add support to handle signals command >>> rpmsg: char: Add TIOCMGET/TIOCMSET ioctl support >>> rpmsg: char: Add signal callback and POLLPRI support >>> >>> drivers/rpmsg/qcom_glink_native.c | 126 ++++++++++++++++++++++++++++++++++++++ >>> drivers/rpmsg/rpmsg_char.c | 74 +++++++++++++++++++++- >>> drivers/rpmsg/rpmsg_core.c | 41 +++++++++++++ >>> drivers/rpmsg/rpmsg_internal.h | 5 ++ >>> include/linux/rpmsg.h | 26 ++++++++ >>> 5 files changed, 269 insertions(+), 3 deletions(-) >>>