summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Mason <jdmason@kudzu.us>2018-06-11 23:13:12 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-01 11:13:59 +0300
commit6cfdf432b42192abd5369c556f2ecf2a789e8ce9 (patch)
tree382d666ab4562768885ff18e6d582613dacfb09b
parent246db31c2326c4d38d0062eca5321dcdaabf0acb (diff)
downloadlinux-6cfdf432b42192abd5369c556f2ecf2a789e8ce9.tar.xz
ntb_netdev: fix sleep time mismatch
[ 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@cesys-it.com> Signed-off-by: Jon Mason <jdmason@kudzu.us> Acked-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/ntb_netdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ntb_netdev.c b/drivers/net/ntb_netdev.c
index 0250aa9ae2cb..97bf49ad81a6 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()