netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Schmidt <mschmidt@redhat.com>
To: netdev@vger.kernel.org
Cc: Veerasenareddy Burru <vburru@marvell.com>,
	Sathesh Edara <sedara@marvell.com>,
	"David S. Miller" <davem@davemloft.net>,
	Abhijit Ayarekar <aayarekar@marvell.com>,
	Satananda Burla <sburla@marvell.com>,
	Vimlesh Kumar <vimleshk@marvell.com>
Subject: [PATCH net 1/4] octeon_ep: fix timeout value for waiting on mbox response
Date: Thu, 10 Aug 2023 17:01:11 +0200	[thread overview]
Message-ID: <20230810150114.107765-2-mschmidt@redhat.com> (raw)
In-Reply-To: <20230810150114.107765-1-mschmidt@redhat.com>

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 <mschmidt@redhat.com>
---
 drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_net.c b/drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_net.c
index 1cc6af2feb38..565320ec24f8 100644
--- a/drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_net.c
+++ b/drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_net.c
@@ -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;
-- 
2.41.0


  reply	other threads:[~2023-08-10 15:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-10 15:01 [PATCH net 0/4] octeon_ep: fixes for error and remove paths Michal Schmidt
2023-08-10 15:01 ` Michal Schmidt [this message]
2023-08-10 15:50   ` [PATCH net 1/4] octeon_ep: fix timeout value for waiting on mbox response Simon Horman
2023-08-10 15:01 ` [PATCH net 2/4] octeon_ep: cancel tx_timeout_task later in remove sequence Michal Schmidt
2023-08-10 15:48   ` Simon Horman
2023-08-11 15:58     ` Michal Schmidt
2023-08-12 17:43       ` Simon Horman
2023-08-10 15:01 ` [PATCH net 3/4] octeon_ep: cancel ctrl_mbox_task after intr_poll_task Michal Schmidt
2023-08-10 15:01 ` [PATCH net 4/4] octeon_ep: cancel queued works in probe error path Michal Schmidt
2023-08-15  2:10 ` [PATCH net 0/4] octeon_ep: fixes for error and remove paths patchwork-bot+netdevbpf

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=20230810150114.107765-2-mschmidt@redhat.com \
    --to=mschmidt@redhat.com \
    --cc=aayarekar@marvell.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=sburla@marvell.com \
    --cc=sedara@marvell.com \
    --cc=vburru@marvell.com \
    --cc=vimleshk@marvell.com \
    /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;
as well as URLs for NNTP newsgroup(s).