Linux PCI Non-Transparent Bridge framework and drivers
 help / color / mirror / Atom feed
* [PATCH] ntb_netdev: fix sleep time mismatch
@ 2018-06-11 20:39 Jon Mason
  2018-06-11 20:50 ` Dave Jiang
  2018-06-11 22:33 ` Logan Gunthorpe
  0 siblings, 2 replies; 13+ messages in thread
From: Jon Mason @ 2018-06-11 20:39 UTC (permalink / raw)
  To: linux-ntb; +Cc: Jon Mason

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>
---
 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 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()
-- 
2.14.4


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-06-13  0:05 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-11 20:39 [PATCH] ntb_netdev: fix sleep time mismatch Jon Mason
2018-06-11 20:50 ` Dave Jiang
2018-06-11 22:33 ` Logan Gunthorpe
2018-06-12  3:15   ` Jon Mason
2018-06-12 16:11     ` Logan Gunthorpe
2018-06-12 21:33       ` Eric Pilmore
2018-06-12 21:44         ` Logan Gunthorpe
2018-06-12 21:59           ` Eric Pilmore
2018-06-12 22:04             ` Logan Gunthorpe
2018-06-12 22:17               ` Dave Jiang
2018-06-12 22:27                 ` Logan Gunthorpe
2018-06-12 22:55                   ` Eric Pilmore
2018-06-13  0:04                     ` Logan Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox