Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3527259pxb; Mon, 1 Mar 2021 12:21:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJwe9PIlo2B8a7IJeF6KcZBIVOcrJXu/vx9/0V2eZDjmVxgR7tTQliMJq5TNEoUR4vHjI7LX X-Received: by 2002:aa7:d588:: with SMTP id r8mr17910755edq.88.1614630061075; Mon, 01 Mar 2021 12:21:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614630061; cv=none; d=google.com; s=arc-20160816; b=m2p7lvnzqvEG5u9Bq13vCVo+IitOhGxrRnKyfBvKCqq1k2IrlvKc/W/YZWbI2PY2VS 5/0D12J+f6jedt+YmbmdFdq0tEWS0fDOEHinfIb/XTNvU9i34/zKBePd0+vFELN1wi1J Y/kGf04jQJoIGRQlRkHscqj/1pX11QkFGllE4B/surtDyjt/sWHRsJ9jGbcB/2kF7v+E QeesxEZjGGylrfO8OuRem2cVeP9+lSKb9tstpaj/szaIAZMJESD8MATb77vbzIffu9Dj jrAQF1hsfGBMWcmQ8l2mFZHkL9vKeTe2C7oEJs379WlDYoiOC9kQMWHqLxvT8AKCGCGa H8Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6gTg5vh7RJzbark0u1Nm0eGSSv6AGqkt7JqShEdBjrA=; b=r7jeRS+JeIy6O7knIF5/HtQsQb8q2LC1o/hSo9b+DSgF0JPI6H62QQu2DChKiAED5p ew35hTnmOeqipcvNHYBkb3naOYdciOF1NsrImLr67otd5a+BwDtIYpLPMd9S+QkJWY1o AoiamZZ+wPdWGguW+ylvd5VsM0d+qChPVNH/UdKRfFyx6iIx7wYwo+wtza2u3IDbuRjT WS06dt17IJEEfWw6FOYIwVg4au+Anlyu7UqYc6td3Bt3ecqW3g4BYU5JNyWjhXqVyt9/ qDG58FzT0l/zIOmK9wzhe6tCSKFZFuZXe2oMU3r/RGxoJaJwvXyJZduCk5/C0ie2Sc67 jWEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dVekGxBE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pg14si4459450ejb.263.2021.03.01.12.20.38; Mon, 01 Mar 2021 12:21:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dVekGxBE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243107AbhCAUQM (ORCPT + 99 others); Mon, 1 Mar 2021 15:16:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:35190 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235978AbhCARED (ORCPT ); Mon, 1 Mar 2021 12:04:03 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2198964F3B; Mon, 1 Mar 2021 16:38:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614616732; bh=p5FXNcqSeVES+LWvUUwn3px+TbM2dlAivgzrRcQb9OA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dVekGxBEau1lQr/vdPnQKRN0KQEOfeyIdktPs2xQqYobx5eUetjHy+WgWH+kpFfkz 3TdASppMCXM1SBJM0l3NMK5RJ+y9G5LSzGjwvAk8IUUJ7W608abECsLzEonblGaHNN fq84vgATfVTI/y2Ty+FIgTCndbQEV9jhdvt0PJxY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Edwin Peer , Michael Chan , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 059/247] bnxt_en: reverse order of TX disable and carrier off Date: Mon, 1 Mar 2021 17:11:19 +0100 Message-Id: <20210301161034.547407173@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161031.684018251@linuxfoundation.org> References: <20210301161031.684018251@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Edwin Peer [ Upstream commit 132e0b65dc2b8bfa9721bfce834191f24fd1d7ed ] A TX queue can potentially immediately timeout after it is stopped and the last TX timestamp on that queue was more than 5 seconds ago with carrier still up. Prevent these intermittent false TX timeouts by bringing down carrier first before calling netif_tx_disable(). Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index db1a23b8d531d..44ed2f6e2d96c 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -6298,9 +6298,10 @@ void bnxt_tx_disable(struct bnxt *bp) txr->dev_state = BNXT_DEV_STATE_CLOSING; } } + /* Drop carrier first to prevent TX timeout */ + netif_carrier_off(bp->dev); /* Stop all TX queues */ netif_tx_disable(bp->dev); - netif_carrier_off(bp->dev); } void bnxt_tx_enable(struct bnxt *bp) -- 2.27.0