On Thu, Apr 20, 2023 at 11:51:29AM +0530, Sarannya S wrote: > diff --git a/drivers/rpmsg/rpmsg_char.c b/drivers/rpmsg/rpmsg_char.c [..] > @@ -297,14 +317,31 @@ static long rpmsg_eptdev_ioctl(struct file *fp, unsigned int cmd, > { > struct rpmsg_eptdev *eptdev = fp->private_data; > > - if (cmd != RPMSG_DESTROY_EPT_IOCTL) > - return -EINVAL; > + bool set; > + int ret; > > - /* Don't allow to destroy a default endpoint. */ > - if (eptdev->default_ept) > - return -EINVAL; > + switch (cmd) { > + case RPMSG_GET_OUTGOING_FLOWCONTROL: > + eptdev->remote_flow_updated = false; > + ret = put_user(eptdev->remote_flow, (int __user *)arg); > + break; > + case RPMSG_SET_INCOMING_FLOWCONTROL: > + set = !!arg; > + ret = rpmsg_set_flow_control(eptdev->ept, set, 0); The last parameter should be eptdev->chinfo.dst. Regards, Bjorn