From: Jon Mason Date: Mon, 11 Jun 2018 20:13:12 +0000 (-0400) Subject: ntb_netdev: fix sleep time mismatch X-Git-Tag: v4.20-rc1~4^2~10 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a861594b1b7ffd630f335b351c4e9f938feadb8e;p=uclinux-h8%2Flinux.git 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 Signed-off-by: Jon Mason Acked-by: Dave Jiang --- diff --git a/drivers/net/ntb_netdev.c b/drivers/net/ntb_netdev.c index b12023bc2cab..df8d49ad48c3 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()