Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp768833ybc; Sat, 16 Nov 2019 08:21:35 -0800 (PST) X-Google-Smtp-Source: APXvYqxrck3qRunYd+4B6JgySLGp9tN5omws4AZDMg1x0o9wKUCymfD1TLZZ6UuQKptSfKYetuxP X-Received: by 2002:a17:906:7399:: with SMTP id f25mr11151039ejl.176.1573921295791; Sat, 16 Nov 2019 08:21:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573921295; cv=none; d=google.com; s=arc-20160816; b=GSPzpd3WxUzbsxk/bQL26RuF4Z9DzLV+FHKtZFgbtEhKFG5DEVOSiwnreP4BApNaFn akefoN/lK7LF3chy7e9tv+aPzDu8ynciL1JcJDjUc1Y6ZVAuTq2VE8RMUWj4KRPutnT5 ro4+s+WOe8c8NUhAtgQzpX7rkhdP9KYe/DsAl4MX6aLp0CpThfuTRt8n7gflce/UBKY3 bSxYbsDgoyi/0t5xoBbVN2MB6RjQRyNJW8Dglg23LExruM/9QiIXwMQ69GYwWu8JJQ5w QtmXafHbZ4qsOr5DqVZc5cCImwfc/siZ2S6KD2Blr8J2Q2iMFqvQ8SiE1ghM+NuL+Dd0 AAtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4F4vEEY0pDaSHG6gf1WntF3/4C04qVhaH/6918S19q0=; b=P1h9SKFMIgYWVUaKQQT3Nvu8loq8trcUDl8K2lhWuGdSFVckidUmEQsUEaITI8qT1z IXB3/sIlczunFABupsrkVZ/zGyltpQv1FlSC4bdh9DAqmOis1+pW00YA6OopgMr91LUb 7duGN0eLfHm/rrt+VeV4b+R5SIBGRrh6kXGwcvd9Lw87ew+pU8Y/1Pq6+O/h/rYNExU9 bJtFsFZ2es7NmF5zC6JbZdnyWuIBn4oLdL83lM094VVI4mc5de87i40bGrKnt3BK+i9h RDzXMddTU52su/CR1DMmVvRUJdLbwmFXwIsoA9eeIbaMZ0wRr3mFkd/hbWNlIAuhpfcm eE5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DYpt+74J; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i30si9384303edd.124.2019.11.16.08.21.10; Sat, 16 Nov 2019 08:21:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DYpt+74J; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729366AbfKPPqY (ORCPT + 99 others); Sat, 16 Nov 2019 10:46:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:52200 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729229AbfKPPqF (ORCPT ); Sat, 16 Nov 2019 10:46:05 -0500 Received: from sasha-vm.mshome.net (unknown [50.234.116.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5BB4220857; Sat, 16 Nov 2019 15:46:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573919164; bh=HUmds+9b5PGZVPdZ+yxdGP7APAcPSnss65fij7jLvqg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DYpt+74JiTYRynxon1wbtIkFhcyv3BLIvkjfSXasGF2O+5uXQgqRMumtE256O/Yv/ tF2FdVzI4jgiEQjpo2GgW7P5fOFEf19MDddRgIRpYME6qvIrA7Nv2+d7scDNAZ42PW gDYMLBfypECepKOBEsxFSx0Gst5aViR8c7ACw67g= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jon Mason , "Gerd W . Haeussler" , Dave Jiang , Sasha Levin , linux-ntb@googlegroups.com, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 172/237] ntb_netdev: fix sleep time mismatch Date: Sat, 16 Nov 2019 10:40:07 -0500 Message-Id: <20191116154113.7417-172-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116154113.7417-1-sashal@kernel.org> References: <20191116154113.7417-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jon Mason [ 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 Signed-off-by: Jon Mason Acked-by: Dave Jiang Signed-off-by: Sasha Levin --- 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 b12023bc2cab5..df8d49ad48c38 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.20.1