From: Jie Deng <jie.deng@intel.com>
To: Viresh Kumar <viresh.kumar@linaro.org>,
Wolfram Sang <wsa@kernel.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>
Cc: "Vincent Guittot" <vincent.guittot@linaro.org>,
"Arnd Bergmann" <arnd@kernel.org>,
stratos-dev@op-lists.linaro.org,
"Alex Bennée" <alex.bennee@linaro.org>,
cohuck@redhat.com,
"Vincent Whitchurch" <vincent.whitchurch@axis.com>,
linux-i2c@vger.kernel.org,
virtualization@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, conghui.chen@intel.com
Subject: Re: [PATCH] i2c: virtio: Add support for zero-length requests
Date: Fri, 22 Oct 2021 14:51:10 +0800 [thread overview]
Message-ID: <0adf1c36-a00b-f16f-e631-439148c4f956@intel.com> (raw)
In-Reply-To: <7c58868cd26d2fc4bd82d0d8b0dfb55636380110.1634808714.git.viresh.kumar@linaro.org>
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.
>
> + 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 ?
next prev parent reply other threads:[~2021-10-22 6:51 UTC|newest]
Thread overview: 6+ 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 [this message]
2021-10-22 6:58 ` Viresh Kumar
2021-10-22 7:08 ` Arnd Bergmann
2021-10-22 9:03 ` Michael S. Tsirkin
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=0adf1c36-a00b-f16f-e631-439148c4f956@intel.com \
--to=jie.deng@intel.com \
--cc=alex.bennee@linaro.org \
--cc=arnd@kernel.org \
--cc=cohuck@redhat.com \
--cc=conghui.chen@intel.com \
--cc=jasowang@redhat.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--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