Skip to content

Commit 3e4d9a4

Browse files
vwaxbrgl
authored andcommitted
gpio: virtio: remove timeout
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: 3a29355 ("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>
1 parent 9a5875f commit 3e4d9a4

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

drivers/gpio/gpio-virtio.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,7 @@ static int _virtio_gpio_req(struct virtio_gpio *vgpio, u16 type, u16 gpio,
100100
virtqueue_kick(vgpio->request_vq);
101101
mutex_unlock(&vgpio->lock);
102102

103-
if (!wait_for_completion_timeout(&line->completion, HZ)) {
104-
dev_err(dev, "GPIO operation timed out\n");
105-
ret = -ETIMEDOUT;
106-
goto out;
107-
}
103+
wait_for_completion(&line->completion);
108104

109105
if (unlikely(res->status != VIRTIO_GPIO_STATUS_OK)) {
110106
dev_err(dev, "GPIO request failed: %d\n", gpio);

0 commit comments

Comments
 (0)