virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jie Deng <jie.deng@intel.com>
Cc: Arnd Bergmann <arnd@kernel.org>,
	Vincent Whitchurch <vincent.whitchurch@axis.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	cohuck@redhat.com, linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	Wolfram Sang <wsa@kernel.org>,
	conghui.chen@intel.com, linux-i2c@vger.kernel.org,
	stratos-dev@op-lists.linaro.org
Subject: Re: [PATCH] i2c: virtio: Add support for zero-length requests
Date: Fri, 22 Oct 2021 05:03:36 -0400	[thread overview]
Message-ID: <20211022050222-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <0adf1c36-a00b-f16f-e631-439148c4f956@intel.com>

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@linaro.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@intel.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@intel.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 ?
> 

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  parent reply	other threads:[~2021-10-22  9:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-21  9:47 [PATCH] i2c: virtio: Add support for zero-length requests Viresh Kumar
2021-10-22  6:51 ` Jie Deng
2021-10-22  6:58   ` Viresh Kumar
2021-10-22  9:03   ` Michael S. Tsirkin [this message]
2021-10-26 11:14 ` Viresh Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211022050222-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=arnd@kernel.org \
    --cc=cohuck@redhat.com \
    --cc=conghui.chen@intel.com \
    --cc=jie.deng@intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stratos-dev@op-lists.linaro.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vincent.whitchurch@axis.com \
    --cc=viresh.kumar@linaro.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=wsa@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).