From: "Michael S. Tsirkin" <mst@redhat.com>
To: Vincent Whitchurch <vincent.whitchurch@axis.com>
Cc: "Enrico Weigelt, metux IT consult" <info@metux.net>,
Viresh Kumar <vireshk@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
kernel@axis.com, Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Viresh Kumar <viresh.kumar@linaro.org>,
linux-gpio@vger.kernel.org,
virtualization@lists.linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpio: virtio: remove timeout
Date: Mon, 20 Dec 2021 10:35:43 -0500 [thread overview]
Message-ID: <20211220103537-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20211220130656.16900-1-vincent.whitchurch@axis.com>
On Mon, Dec 20, 2021 at 02:06:56PM +0100, Vincent Whitchurch wrote:
> The driver imposes an arbitrary one second timeout on virtio requests,
> but the specification doesn't prevent the virtio device from taking
> longer to process requests, so remove this timeout to support all
> systems and device implementations.
>
> Fixes: 3a29355a22c0275fe86 ("gpio: Add virtio-gpio driver")
> Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> drivers/gpio/gpio-virtio.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/gpio/gpio-virtio.c b/drivers/gpio/gpio-virtio.c
> index 84f96b78f32a..9f4941bc5760 100644
> --- a/drivers/gpio/gpio-virtio.c
> +++ b/drivers/gpio/gpio-virtio.c
> @@ -100,11 +100,7 @@ static int _virtio_gpio_req(struct virtio_gpio *vgpio, u16 type, u16 gpio,
> virtqueue_kick(vgpio->request_vq);
> mutex_unlock(&vgpio->lock);
>
> - if (!wait_for_completion_timeout(&line->completion, HZ)) {
> - dev_err(dev, "GPIO operation timed out\n");
> - ret = -ETIMEDOUT;
> - goto out;
> - }
> + wait_for_completion(&line->completion);
>
> if (unlikely(res->status != VIRTIO_GPIO_STATUS_OK)) {
> dev_err(dev, "GPIO request failed: %d\n", gpio);
> --
> 2.33.1
next prev parent reply other threads:[~2021-12-20 15:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-20 13:06 [PATCH] gpio: virtio: remove timeout Vincent Whitchurch
2021-12-20 14:54 ` Bartosz Golaszewski
2021-12-20 15:35 ` Michael S. Tsirkin
2021-12-20 15:35 ` Michael S. Tsirkin [this message]
2021-12-21 4:26 ` Viresh Kumar
2021-12-21 15:23 ` Bartosz Golaszewski
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=20211220103537-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=bgolaszewski@baylibre.com \
--cc=brgl@bgdev.pl \
--cc=info@metux.net \
--cc=kernel@axis.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vincent.whitchurch@axis.com \
--cc=viresh.kumar@linaro.org \
--cc=vireshk@kernel.org \
--cc=virtualization@lists.linux-foundation.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