[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211022050222-mutt-send-email-mst@kernel.org>
Date: Fri, 22 Oct 2021 05:03:36 -0400
From: "Michael S. Tsirkin" <mst@...hat.com>
To: Jie Deng <jie.deng@...el.com>
Cc: Viresh Kumar <viresh.kumar@...aro.org>,
Wolfram Sang <wsa@...nel.org>,
Jason Wang <jasowang@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Arnd Bergmann <arnd@...nel.org>,
stratos-dev@...lists.linaro.org,
Alex Bennée <alex.bennee@...aro.org>,
cohuck@...hat.com,
Vincent Whitchurch <vincent.whitchurch@...s.com>,
linux-i2c@...r.kernel.org,
virtualization@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org, conghui.chen@...el.com
Subject: Re: [PATCH] i2c: virtio: Add support for zero-length requests
On Fri, Oct 22, 2021 at 02:51:10PM +0800, Jie Deng wrote:
>
> On 2021/10/21 17:47, Viresh Kumar wrote:
> > The virtio specification received a new mandatory feature
> > (VIRTIO_I2C_F_ZERO_LENGTH_REQUEST) for zero length requests. Fail if the
> > feature isn't offered by the device.
> >
> > For each read-request, set the VIRTIO_I2C_FLAGS_M_RD flag, as required
> > by the VIRTIO_I2C_F_ZERO_LENGTH_REQUEST feature.
> >
> > This allows us to support zero length requests, like SMBUS Quick, where
> > the buffer need not be sent anymore.
> >
> > Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
> > ---
> > Hi Wolfram,
> >
> > Please do not apply this until the spec changes [1] are merged, sending it early
> > to get review done. I will ping you later once the spec is merged.
> >
> > [1] https://lists.oasis-open.org/archives/virtio-dev/202110/msg00109.html
> >
> > drivers/i2c/busses/i2c-virtio.c | 56 ++++++++++++++++++---------------
> > include/uapi/linux/virtio_i2c.h | 6 ++++
> > 2 files changed, 36 insertions(+), 26 deletions(-)
> >
>
> Acked-by: Jie Deng<jie.deng@...el.com> once the spec is merged.
There's supposed to be space before < btw. and one puts # before any
comments this way tools can process the ack automatically:
Acked-by: Jie Deng<jie.deng@...el.com> # once the spec is merged.
>
>
> > + if (!virtio_has_feature(vdev, VIRTIO_I2C_F_ZERO_LENGTH_REQUEST)) {
> > + dev_err(&vdev->dev, "Zero-length request feature is mandatory\n");
> > + return -EINVAL;
>
>
> It might be better to return -EOPNOTSUPP ?
>
Powered by blists - more mailing lists