]> Git Repo - linux.git/commitdiff
octeon_ep: fix timeout value for waiting on mbox response
authorMichal Schmidt <[email protected]>
Thu, 10 Aug 2023 15:01:11 +0000 (17:01 +0200)
committerJakub Kicinski <[email protected]>
Tue, 15 Aug 2023 02:08:13 +0000 (19:08 -0700)
The intention was to wait up to 500 ms for the mbox response.
The third argument to wait_event_interruptible_timeout() is supposed to
be the timeout duration. The driver mistakenly passed absolute time
instead.

Fixes: 577f0d1b1c5f ("octeon_ep: add separate mailbox command and response queues")
Signed-off-by: Michal Schmidt <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_net.c

index 1cc6af2feb38afbdc6cc3bb67c8ea821ce3a8046..565320ec24f81e3fadd87460b5ab89ca4bdbcbd0 100644 (file)
@@ -55,7 +55,7 @@ static int octep_send_mbox_req(struct octep_device *oct,
        list_add_tail(&d->list, &oct->ctrl_req_wait_list);
        ret = wait_event_interruptible_timeout(oct->ctrl_req_wait_q,
                                               (d->done != 0),
-                                              jiffies + msecs_to_jiffies(500));
+                                              msecs_to_jiffies(500));
        list_del(&d->list);
        if (ret == 0 || ret == 1)
                return -EAGAIN;
This page took 0.057322 seconds and 4 git commands to generate.