2020-06-26 16:32:20

by Deepak Kumar Singh

[permalink] [raw]
Subject: [PATCH V5 0/4] Signaling api support in glink/rpmsg clients

Change from version 5
[V5,4/4] rpmsg: char: Add signal callback and POLLPRI support
Updated for sparse warning. Replaced POLLPRI => EPOLLPRI to fix
warning.

Change from version 4
I am taking over these patches from [email protected]
Fixed all the trivial review comments.

Signal conversion to and from native signal as done in patch V4,2/4
is intentional.

Arun Kumar Neelakantam (3):
rpmsg: glink: Add support to handle signals command
rpmsg: char: Add TIOCMGET/TIOCMSET ioctl support
rpmsg: char: Add signal callback and POLLPRI support

Deepak Kumar Singh (1):
rpmsg: core: Add signal API support

drivers/rpmsg/qcom_glink_native.c | 125 ++++++++++++++++++++++++++++++++++++++
drivers/rpmsg/rpmsg_char.c | 76 ++++++++++++++++++++++-
drivers/rpmsg/rpmsg_core.c | 40 ++++++++++++
drivers/rpmsg/rpmsg_internal.h | 5 ++
include/linux/rpmsg.h | 27 ++++++++
5 files changed, 270 insertions(+), 3 deletions(-)

--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


2020-06-26 16:32:33

by Deepak Kumar Singh

[permalink] [raw]
Subject: [PATCH V6 3/4] rpmsg: char: Add TIOCMGET/TIOCMSET ioctl support

From: Arun Kumar Neelakantam <[email protected]>

Add TICOMGET and TIOCMSET ioctl support for rpmsg char device nodes
to get/set the low level transport signals.

Signed-off-by: Deepak Kumar Singh <[email protected]>
Signed-off-by: Arun Kumar Neelakantam <[email protected]>
---
drivers/rpmsg/rpmsg_char.c | 54 +++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 51 insertions(+), 3 deletions(-)

diff --git a/drivers/rpmsg/rpmsg_char.c b/drivers/rpmsg/rpmsg_char.c
index 4bbbacd..43ceac0 100644
--- a/drivers/rpmsg/rpmsg_char.c
+++ b/drivers/rpmsg/rpmsg_char.c
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/*
+ * Copyright (c) 2018, The Linux Foundation.
* Copyright (c) 2016, Linaro Ltd.
* Copyright (c) 2012, Michal Simek <[email protected]>
* Copyright (c) 2012, PetaLogix
@@ -19,6 +20,7 @@
#include <linux/rpmsg.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
+#include <linux/termios.h>
#include <linux/uaccess.h>
#include <uapi/linux/rpmsg.h>

@@ -269,15 +271,61 @@ static __poll_t rpmsg_eptdev_poll(struct file *filp, poll_table *wait)
return mask;
}

+static int rpmsg_eptdev_tiocmset(struct file *fp, unsigned int cmd,
+ int __user *arg)
+{
+ struct rpmsg_eptdev *eptdev = fp->private_data;
+ u32 set, clear, val;
+ int ret;
+
+ ret = get_user(val, arg);
+ if (ret)
+ return ret;
+ set = clear = 0;
+ switch (cmd) {
+ case TIOCMBIS:
+ set = val;
+ break;
+ case TIOCMBIC:
+ clear = val;
+ break;
+ case TIOCMSET:
+ set = val;
+ clear = ~val;
+ break;
+ }
+
+ set &= TIOCM_DTR | TIOCM_RTS | TIOCM_CD | TIOCM_RI;
+ clear &= TIOCM_DTR | TIOCM_RTS | TIOCM_CD | TIOCM_RI;
+
+ return rpmsg_set_signals(eptdev->ept, set, clear);
+}
+
static long rpmsg_eptdev_ioctl(struct file *fp, unsigned int cmd,
unsigned long arg)
{
struct rpmsg_eptdev *eptdev = fp->private_data;
+ int ret;

- if (cmd != RPMSG_DESTROY_EPT_IOCTL)
- return -EINVAL;
+ switch (cmd) {
+ case TIOCMGET:
+ ret = rpmsg_get_signals(eptdev->ept);
+ if (ret >= 0)
+ ret = put_user(ret, (int __user *)arg);
+ break;
+ case TIOCMSET:
+ case TIOCMBIS:
+ case TIOCMBIC:
+ ret = rpmsg_eptdev_tiocmset(fp, cmd, (int __user *)arg);
+ break;
+ case RPMSG_DESTROY_EPT_IOCTL:
+ ret = rpmsg_eptdev_destroy(&eptdev->dev, NULL);
+ break;
+ default:
+ ret = -EINVAL;
+ }

- return rpmsg_eptdev_destroy(&eptdev->dev, NULL);
+ return ret;
}

static const struct file_operations rpmsg_eptdev_fops = {
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2020-07-06 18:07:51

by Mathieu Poirier

[permalink] [raw]
Subject: Re: [PATCH V5 0/4] Signaling api support in glink/rpmsg clients

Hi Deepak,

On Fri, Jun 26, 2020 at 08:16:55PM +0530, Deepak Kumar Singh wrote:
> Change from version 5
> [V5,4/4] rpmsg: char: Add signal callback and POLLPRI support
> Updated for sparse warning. Replaced POLLPRI => EPOLLPRI to fix
> warning.
>
> Change from version 4
> I am taking over these patches from [email protected]
> Fixed all the trivial review comments.
>
> Signal conversion to and from native signal as done in patch V4,2/4
> is intentional.
>
> Arun Kumar Neelakantam (3):
> rpmsg: glink: Add support to handle signals command
> rpmsg: char: Add TIOCMGET/TIOCMSET ioctl support
> rpmsg: char: Add signal callback and POLLPRI support
>
> Deepak Kumar Singh (1):
> rpmsg: core: Add signal API support

I'm confused here - V5 (or what I think it is) was sent out on June 24th without
a cover letter. This set has a cover letter but it is labeled V5. So is this
the cover letter that should have been sent out on the 24th and the content
herein relevent to that set? Or is it accurate and the label on the cover
letter of this set is wrong and should have been V6?

I have little confidence in both sets and as such won't be reviewing them.
Please send a new revision that is properly labeled.

Thanks,
Mathieu


>
> drivers/rpmsg/qcom_glink_native.c | 125 ++++++++++++++++++++++++++++++++++++++
> drivers/rpmsg/rpmsg_char.c | 76 ++++++++++++++++++++++-
> drivers/rpmsg/rpmsg_core.c | 40 ++++++++++++
> drivers/rpmsg/rpmsg_internal.h | 5 ++
> include/linux/rpmsg.h | 27 ++++++++
> 5 files changed, 270 insertions(+), 3 deletions(-)
>
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>

2020-09-02 16:34:00

by Deepak Kumar Singh

[permalink] [raw]
Subject: Re: [PATCH V5 0/4] Signaling api support in glink/rpmsg clients


On 7/6/2020 11:34 PM, Mathieu Poirier wrote:
> Hi Deepak,
>
> On Fri, Jun 26, 2020 at 08:16:55PM +0530, Deepak Kumar Singh wrote:
>> Change from version 5
>> [V5,4/4] rpmsg: char: Add signal callback and POLLPRI support
>> Updated for sparse warning. Replaced POLLPRI => EPOLLPRI to fix
>> warning.
>>
>> Change from version 4
>> I am taking over these patches from [email protected]
>> Fixed all the trivial review comments.
>>
>> Signal conversion to and from native signal as done in patch V4,2/4
>> is intentional.
>>
>> Arun Kumar Neelakantam (3):
>> rpmsg: glink: Add support to handle signals command
>> rpmsg: char: Add TIOCMGET/TIOCMSET ioctl support
>> rpmsg: char: Add signal callback and POLLPRI support
>>
>> Deepak Kumar Singh (1):
>> rpmsg: core: Add signal API support
> I'm confused here - V5 (or what I think it is) was sent out on June 24th without
> a cover letter. This set has a cover letter but it is labeled V5. So is this
> the cover letter that should have been sent out on the 24th and the content
> herein relevent to that set? Or is it accurate and the label on the cover
> letter of this set is wrong and should have been V6?
>
> I have little confidence in both sets and as such won't be reviewing them.
> Please send a new revision that is properly labeled.
>
> Thanks,
> Mathieu
>
Mistakenly i forgot to update label for cover letter to V6.

I have uploaded patch set V7 with updated cover letter.

There is no change in patches.

>> drivers/rpmsg/qcom_glink_native.c | 125 ++++++++++++++++++++++++++++++++++++++
>> drivers/rpmsg/rpmsg_char.c | 76 ++++++++++++++++++++++-
>> drivers/rpmsg/rpmsg_core.c | 40 ++++++++++++
>> drivers/rpmsg/rpmsg_internal.h | 5 ++
>> include/linux/rpmsg.h | 27 ++++++++
>> 5 files changed, 270 insertions(+), 3 deletions(-)
>>
>> --
>> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
>> a Linux Foundation Collaborative Project
>>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project

2020-09-02 16:42:08

by Mathieu Poirier

[permalink] [raw]
Subject: Re: [PATCH V5 0/4] Signaling api support in glink/rpmsg clients

On Wed, 2 Sep 2020 at 10:30, Deepak Kumar Singh <[email protected]> wrote:
>
>
> On 7/6/2020 11:34 PM, Mathieu Poirier wrote:
> > Hi Deepak,
> >
> > On Fri, Jun 26, 2020 at 08:16:55PM +0530, Deepak Kumar Singh wrote:
> >> Change from version 5
> >> [V5,4/4] rpmsg: char: Add signal callback and POLLPRI support
> >> Updated for sparse warning. Replaced POLLPRI => EPOLLPRI to fix
> >> warning.
> >>
> >> Change from version 4
> >> I am taking over these patches from [email protected]
> >> Fixed all the trivial review comments.
> >>
> >> Signal conversion to and from native signal as done in patch V4,2/4
> >> is intentional.
> >>
> >> Arun Kumar Neelakantam (3):
> >> rpmsg: glink: Add support to handle signals command
> >> rpmsg: char: Add TIOCMGET/TIOCMSET ioctl support
> >> rpmsg: char: Add signal callback and POLLPRI support
> >>
> >> Deepak Kumar Singh (1):
> >> rpmsg: core: Add signal API support
> > I'm confused here - V5 (or what I think it is) was sent out on June 24th without
> > a cover letter. This set has a cover letter but it is labeled V5. So is this
> > the cover letter that should have been sent out on the 24th and the content
> > herein relevent to that set? Or is it accurate and the label on the cover
> > letter of this set is wrong and should have been V6?
> >
> > I have little confidence in both sets and as such won't be reviewing them.
> > Please send a new revision that is properly labeled.
> >
> > Thanks,
> > Mathieu
> >
> Mistakenly i forgot to update label for cover letter to V6.
>
> I have uploaded patch set V7 with updated cover letter.

Thank you for doing that - I have added your set to my list of patches
to review. Note that I have a fair amount of patches to go over
lately and as such getting to yours will take some time.

Regards,
Mathieu

>
> There is no change in patches.
>
> >> drivers/rpmsg/qcom_glink_native.c | 125 ++++++++++++++++++++++++++++++++++++++
> >> drivers/rpmsg/rpmsg_char.c | 76 ++++++++++++++++++++++-
> >> drivers/rpmsg/rpmsg_core.c | 40 ++++++++++++
> >> drivers/rpmsg/rpmsg_internal.h | 5 ++
> >> include/linux/rpmsg.h | 27 ++++++++
> >> 5 files changed, 270 insertions(+), 3 deletions(-)
> >>
> >> --
> >> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> >> a Linux Foundation Collaborative Project
> >>
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
>