Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3715192pxv; Mon, 26 Jul 2021 10:04:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0ca26YydO4aUbf1fpfRd1DnuIUTApbqfRm54IGwKtSZ6IHUVxBTMLf0FWdPrbpilDJipE X-Received: by 2002:aa7:cf90:: with SMTP id z16mr22377345edx.303.1627319098577; Mon, 26 Jul 2021 10:04:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627319098; cv=none; d=google.com; s=arc-20160816; b=VpwzN5CgdOKNNlGYSN0dnfq7B2NnNe8x6ZkEaynTGnI8o4B7LhC1qY6Q5DjgV+XrqV IhEkB3QSFgAfLkqfZ2CCUHaf0N5AfAkPtNddVSnVkarvRSBD1b4aVQqQ9i7BOvuOCqEo Ql2YGk1yfJdNbUje0U6S7iWdIYAZUgZeknEWJqoP+2O+d/hqp4j/reQVfPfY3WybHnfD 5hZfKTRio2jc+NNRTqrQb5+3nB7gxZZXtmNBzhxHB5ZkN8nOQyO+vnSuA4+e4lOqPpRH ohGIgYG6uAuHJKWfkJe3/WfD2PGzrjxQAyOhA9C0yQM765Whz+PMldUfaXj9BXGCAU07 W8SA== 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=43UIEmtSxmJIq8tHynvFb+etSIvDPwfD41Zg1L7DxeQ=; b=Uuny1z6kdeA8gnZztQOwJFD+/Q27OREda9vcJBtq6UCKRBFIczuP1x7tJV8Gmdyj9e rVLzggHTXxZ8V458Rh1+HHDEBvoEYRCDjVZaZ/MmMWnLvfzWu7QUFsb3oRl92e2Gjbk1 YsU5CsY5DGkT2qiOxanvuBPGbMFoXnlSnvRaqpxPnZm4y7eDY2Fu9PowvGAKcWY5x8D0 8QlmHL3cU2+CD2HVwaLRwcs3M5qkITjcAUaxwCnlCv4jQW+SLEO1pFr0kZkE0xdkKQUQ GZD3se2MxYyiGyuhI9XG/LRF509xA4WEln88zCSX/HAT4F1VxWk//jK2QVWHDEk7zPT/ 7avg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=n2fVLN0A; 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 h14si452524edr.479.2021.07.26.10.04.35; Mon, 26 Jul 2021 10:04:58 -0700 (PDT) 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=n2fVLN0A; 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 S237549AbhGZPkJ (ORCPT + 99 others); Mon, 26 Jul 2021 11:40:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:37568 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237404AbhGZPWs (ORCPT ); Mon, 26 Jul 2021 11:22:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5A0C960240; Mon, 26 Jul 2021 16:03:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627315396; bh=j3wE9b5BjrC6n/xTO2y74WujNoBcqvyf2zLfTFFuLzQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n2fVLN0AvaQ6Och/aKSnu4gFpVJGG3R/sCPvweiIKlitXUVS+qr26l+z7Vyx3alyt qTHTeOOujA9EkiuPljAtUj3Qnd0tt2rC1+GvXHQgjU0rQ9TULH+AjJjoZ+5P6PCF5U iNQBvtzbcERC1i+2FXP3nqmd0RO4a8WVoL4GtJ/o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Chan , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 081/167] bnxt_en: Add missing check for BNXT_STATE_ABORT_ERR in bnxt_fw_rset_task() Date: Mon, 26 Jul 2021 17:38:34 +0200 Message-Id: <20210726153842.134771885@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210726153839.371771838@linuxfoundation.org> References: <20210726153839.371771838@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: Michael Chan [ Upstream commit 6cd657cb3ee6f4de57e635b126ffbe0e51d00f1a ] In the BNXT_FW_RESET_STATE_POLL_VF state in bnxt_fw_reset_task() after all VFs have unregistered, we need to check for BNXT_STATE_ABORT_ERR after we acquire the rtnl_lock. If the flag is set, we need to abort. Fixes: 230d1f0de754 ("bnxt_en: Handle firmware reset.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index f003f08de167..dee6bcfe2fe2 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -11480,6 +11480,10 @@ static void bnxt_fw_reset_task(struct work_struct *work) } bp->fw_reset_timestamp = jiffies; rtnl_lock(); + if (test_bit(BNXT_STATE_ABORT_ERR, &bp->state)) { + rtnl_unlock(); + goto fw_reset_abort; + } bnxt_fw_reset_close(bp); if (bp->fw_cap & BNXT_FW_CAP_ERR_RECOVER_RELOAD) { bp->fw_reset_state = BNXT_FW_RESET_STATE_POLL_FW_DOWN; -- 2.30.2