summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Mason <jdmason@kudzu.us>2018-06-11 16:13:12 -0400
committerJon Mason <jdmason@kudzu.us>2018-06-17 18:00:53 -0400
commitb1ce023ae8a2137ac8a1413791ddf86e1b2675a7 (patch)
tree63e97d72ec7f277c26de4ad984160dd38185eb78
parentce397d215ccd07b8ae3f71db689aedb85d56ab40 (diff)
downloadlinux-next-b1ce023ae8a2137ac8a1413791ddf86e1b2675a7.tar.gz
ntb_netdev: fix sleep time mismatch
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>
-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 9f6f7ccd44f7..306a662eba94 100644
--- a/drivers/net/ntb_netdev.c
+++ b/drivers/net/ntb_netdev.c
@@ -236,7 +236,7 @@ static void ntb_netdev_tx_timer(struct timer_list *t)
struct net_device *ndev = dev->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()