]> git.baikalelectronics.ru Git - kernel.git/commitdiff
gpio: virtio: remove timeout
authorVincent Whitchurch <vincent.whitchurch@axis.com>
Mon, 20 Dec 2021 13:06:56 +0000 (14:06 +0100)
committerBartosz Golaszewski <brgl@bgdev.pl>
Tue, 21 Dec 2021 15:22:58 +0000 (16:22 +0100)
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: bac8eacd87f71b580b8 ("gpio: Add virtio-gpio driver")
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
drivers/gpio/gpio-virtio.c

index 84f96b78f32af34d9ce45a2172a1953887b9c65c..9f4941bc57604bdacfd4e2605ec760965e2589e0 100644 (file)
@@ -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);