Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5996765ybc; Wed, 27 Nov 2019 13:07:17 -0800 (PST) X-Google-Smtp-Source: APXvYqz9Gsmwli4zJiDBR9hQ6IyxRDocDRa2oH1Wxr+q6YaR6iYDZZfeUfIyJWUiuwaZKGT9ruYT X-Received: by 2002:a05:6402:282:: with SMTP id l2mr35294844edv.187.1574888837184; Wed, 27 Nov 2019 13:07:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888837; cv=none; d=google.com; s=arc-20160816; b=ZQhaCSGNDEy9NrSr5MmW+Cdrb5mqWC5KXKN525LiB7J1LLpP+vylbY42JgJxe80PJw 6MPZXAXN4Ngscm7npUbMB/pNIY0EIFl+kZqy6GnFA2EtjI/QSaX7vWCcgWgsz1EOYfup hSwftrT22QyklJ+ejBdYH1EMBnvJ3bYLsq4pDuA/A3UvVH0kzQ2I3PGcWNilj6PuMi4k xyzDeUfgxOjPQVGfgKGQ/zBL4jbAWL7CZnNBL3BU174OKV6PhPFOdicn1ZGY75zU2r6w rtEQwkoUFLV8ZqZOPr+g8mQpE5ORxjKIIUw9v52V3ce9nDQo25BqO/Z8liXUTEbcJxBK GXAw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4F4vEEY0pDaSHG6gf1WntF3/4C04qVhaH/6918S19q0=; b=JW8racDvzn/kAWHY1FcaB1tufYXkqgnIxOQLXZjQ5qR+cWi+theLIH4oXwczMy0M1t y/lgeTwqW/WZlQ+h9JDWNC4H5nY/ui0qE/Nz8asa7mwGlawZmbXvl7KhS+/o3aONFT6c JEOTovVk5Wd4ag2GqBb2SjY8wavtUl0gQy7g5zudp7TFftcpBOHTMnLmAd2MtyS+nEeT 3XeAkVXU5zYh8AldMIkUVDc2l6td7Mx+Hj3KKm4sQLJlcaZAh22aF3yvnw1yuFIsN4zM us86wy9y1MR9t3voLYI2TSHaDUq4CLECx1m7WxPNFoZQNdzpj3MAsi+mlESit35pcuKN qKQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vxHctKIp; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e7si12637439ede.66.2019.11.27.13.06.53; Wed, 27 Nov 2019 13:07:17 -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=vxHctKIp; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730931AbfK0VDu (ORCPT + 99 others); Wed, 27 Nov 2019 16:03:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:57032 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732072AbfK0VDo (ORCPT ); Wed, 27 Nov 2019 16:03:44 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B11B12086A; Wed, 27 Nov 2019 21:03:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888624; bh=HUmds+9b5PGZVPdZ+yxdGP7APAcPSnss65fij7jLvqg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vxHctKIpUpuTYucZ0a4Otqg03XfcI6+lXXCAS23no8OK1iy4TApROUqN4gnzLcjhd CkR4fdafo9vUC+ANgn22rRBqpMCWSFkHTPPLWZcDf61qiUxAA9kH5cxPFG5RTqtCI3 V+2AAE10nhfhrVz8HbSfwxGFQdyYAZXMfQ2P+AE4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Gerd W. Haeussler" , Jon Mason , Dave Jiang , Sasha Levin Subject: [PATCH 4.19 189/306] ntb_netdev: fix sleep time mismatch Date: Wed, 27 Nov 2019 21:30:39 +0100 Message-Id: <20191127203129.056658560@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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