Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3243140imc; Wed, 13 Mar 2019 12:32:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqwh6Fe2t5G7Dsm7ejjhu+3uAFZAidL9ouagtHpt8+Cmy2BjE77y0R4wy0iq7/VozJYtYTUa X-Received: by 2002:a17:902:ca4:: with SMTP id 33mr34810784plt.186.1552505533772; Wed, 13 Mar 2019 12:32:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552505533; cv=none; d=google.com; s=arc-20160816; b=e1qQ360o+3+s0PtvIzC7TaZWC9epEJPksaEPINDXG9J5XrzW/Mp1sli94ZzGNsrDg8 85E+Wr4ay3gJBreiXHZuxzwaVA+KbvtyiLjIGh2ibXDH7M0i9eOcsuLg/gk5WVQ61AE3 lVLPzVFwq2H+giTw6TZgAwRycrZ+9TQwmBn2yEyqyB+CUWLFx5ANBe4cSJ8yj8ciDWvm EJsRUjhGKIti72aIwE5CsQztPlGUQJriW2RROWXcegLGRj7Mudnjr1L1nXz40eohIzZ4 BtneZ+Kgu2yIoWcuTIgjDQNueydMjziZkp7gFVinifWsj99Md2injsTekp/Ijy2fx3y3 zTiA== 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=z4b7/hicMaeiFLQNEIxnIac0xaKfWFDGLvekh4vUQoo=; b=bKdKbp4oZD+nX5dehX/Awe5PUUAAtZ728VIsH2XloK3asMLxRxsZsHX7ZvuGpCJoRl HzHA/oz3gUXdCCAxUOIKp6tQJ/mccGdbEMQhsh5BmNOr3fQbnt3utz0W54gydzEHmc1V xOHttVLsRilCGvDWJVVkgc+SohdUMJn97gAy9yh80DfRKur5YMs41SHQKQ407XBdV21U /rE18+26SdFpBd6syyHGUYMzRd7036c+5NlRIYqE8kNrBlOHu21aoA0JC6xXHw7UOKrZ 9O8YjntSkH8pqtn2EUILI+7aea3/v7z37LDJIsJIajrLrmjvL9djxrHPOPzxq6q66qa/ lTuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WJRAjFsc; 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 25si10588738pgt.419.2019.03.13.12.31.57; Wed, 13 Mar 2019 12:32:13 -0700 (PDT) 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=WJRAjFsc; 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 S1727666AbfCMT3t (ORCPT + 99 others); Wed, 13 Mar 2019 15:29:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:43268 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727249AbfCMTMk (ORCPT ); Wed, 13 Mar 2019 15:12:40 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (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 9EF522075C; Wed, 13 Mar 2019 19:12:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552504359; bh=sTTE+BVeq+nnyGrb3DQa9hLV8gpn8zpZLTTA4f9U0Lg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WJRAjFsc7q7MSR44r8KWDJlQ2HrJZsp8WaXw7Hv9kZnF7+es7Y+8+9IexHciI9f6w p8aEIlv4A6KgTK7BuAF18ct+FO3bl1veiH0YjPETOk24RGcIjDQD/t/UuuYpoW5u9P kksg88Lz56ZkhgVHfVGBf9tHSRZuJ6ZAozu38tB0= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Michael Chan , "David S . Miller" , Sasha Levin , netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.20 56/60] bnxt_en: Fix typo in firmware message timeout logic. Date: Wed, 13 Mar 2019 15:10:17 -0400 Message-Id: <20190313191021.158171-56-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190313191021.158171-1-sashal@kernel.org> References: <20190313191021.158171-1-sashal@kernel.org> MIME-Version: 1.0 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: Michael Chan [ Upstream commit 67681d02aaa1db9044a16df4ca9c77cde1221a3e ] The logic that polls for the firmware message response uses a shorter sleep interval for the first few passes. But there was a typo so it was using the wrong counter (larger counter) for these short sleep passes. The result is a slightly shorter timeout period for these firmware messages than intended. Fix it by using the proper counter. Fixes: 9751e8e71487 ("bnxt_en: reduce timeout on initial HWRM calls") Signed-off-by: Michael Chan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 29b068b81e2a..938ea8ada0da 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -3844,7 +3844,7 @@ static int bnxt_hwrm_do_send_msg(struct bnxt *bp, void *msg, u32 msg_len, if (len) break; /* on first few passes, just barely sleep */ - if (i < DFLT_HWRM_CMD_TIMEOUT) + if (i < HWRM_SHORT_TIMEOUT_COUNTER) usleep_range(HWRM_SHORT_MIN_TIMEOUT, HWRM_SHORT_MAX_TIMEOUT); else -- 2.19.1