[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20191116154729.9573-107-sashal@kernel.org>
Date: Sat, 16 Nov 2019 10:46:45 -0500
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Jon Mason <jdmason@...zu.us>,
"Gerd W . Haeussler" <gerd.haeussler@...ys-it.com>,
Dave Jiang <dave.jiang@...el.com>,
Sasha Levin <sashal@...nel.org>, linux-ntb@...glegroups.com,
netdev@...r.kernel.org
Subject: [PATCH AUTOSEL 4.14 107/150] ntb_netdev: fix sleep time mismatch
From: Jon Mason <jdmason@...zu.us>
[ Upstream commit a861594b1b7ffd630f335b351c4e9f938feadb8e ]
The tx_time should be in usecs (according to the comment above the
variable), but the setting of the timer during the rearming is done in
msecs. Change it to match the expected units.
Fixes: e74bfeedad08 ("NTB: Add flow control to the ntb_netdev")
Suggested-by: Gerd W. Haeussler <gerd.haeussler@...ys-it.com>
Signed-off-by: Jon Mason <jdmason@...zu.us>
Acked-by: Dave Jiang <dave.jiang@...el.com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/net/ntb_netdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ntb_netdev.c b/drivers/net/ntb_netdev.c
index 0250aa9ae2cbc..97bf49ad81a6d 100644
--- a/drivers/net/ntb_netdev.c
+++ b/drivers/net/ntb_netdev.c
@@ -236,7 +236,7 @@ static void ntb_netdev_tx_timer(unsigned long data)
struct ntb_netdev *dev = netdev_priv(ndev);
if (ntb_transport_tx_free_entry(dev->qp) < tx_stop) {
- mod_timer(&dev->tx_timer, jiffies + msecs_to_jiffies(tx_time));
+ mod_timer(&dev->tx_timer, jiffies + usecs_to_jiffies(tx_time));
} else {
/* Make sure anybody stopping the queue after this sees the new
* value of ntb_transport_tx_free_entry()
--
2.20.1
Powered by blists - more mailing lists