From patchwork Fri Apr 19 18:34:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 13636735 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com [209.85.128.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2568E10A03 for ; Fri, 19 Apr 2024 18:35:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713551708; cv=none; b=UaxtKHSnrKiFTnZYu5XuzUAUQQEnihWvf6E9jwmF/7kkiwB1OqekHtGhtSQIAkHCtl3Xl7BcH5c9skno2gKBK0IoHdtiaoYDeK3OZSHDdghXqi/9LGwK6Cd4vL/rK4BJWXDpWDUOpeReKniAdoH6y6SfndeYSq8KVBmSJ0wmmuI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713551708; c=relaxed/simple; bh=Ml8/937jFhye0y3Yf/vPWhjimX4yDAH5Z7hfITWUiI0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=GQDiApy1uTOyofujRNm4G9rNFYRQEh0kHdkca1emPh07mkXv6YWz8oGMKfMJEe6SBL/qrB7lcG+vqH7QUuzmGFtTo5y7VbfK8ZBRDX2H7jRE0cukfATW6VK5B64tGzCiTXxEdBYhbNqaujWBUI1FMjVSd1zVCF3b8uYZPAwdBqQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=gA6MWDdT; arc=none smtp.client-ip=209.85.128.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="gA6MWDdT" Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-618944792c3so25597477b3.1 for ; Fri, 19 Apr 2024 11:35:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1713551706; x=1714156506; darn=vger.kernel.org; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=YuVotY1Y4abWTYP7W/0CLEsNrurxmM2C4qIEgMh1E8w=; b=gA6MWDdTs1pztH9P9sHzLC1UQlQ3BzoSLGLGtT+dKVbttxsC7QTRlIRQ5hU/wAq0RE /UkCyZLLRjAu9FKd9KcDYBaHtzZk0Wi1U8zHWWWaUAVZuRu3Gy6F/DoabIz1WUR6f5S1 Iu+BbqUOyDFnlXE0Jrf3SFNrocgEeQQrUlnsg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713551706; x=1714156506; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YuVotY1Y4abWTYP7W/0CLEsNrurxmM2C4qIEgMh1E8w=; b=wG9wm5k1hQRBzi5aKZQQEapNzLIlCHtAL6kFiTlXAUeKw+M3L3OVZxvO1UEkdR5FFY vrFsyvTV1wp5HmazaNcwsKVY7/r3Dkchhef0V3CKeJxxpW0qjaygCT9et84FFFhfQxP8 E3YH61wLmNY5yKnziIM5id+l6Vdk9rqc64QXSmdplFTCF2f4O6VWY6yvy8Pn8J7q2w49 dYA7emkZ7tYMUpQJakyozuYMJIyMdZRRdSV19e2/OQ4sW4u+5jkpbd49gKUdLkZtJO9p MVSoSQHbJQqc1HIMJ4EMVY9e4KAm6MI/UN0ir6OSFTTms9uKdcRchtCZveSEpTI3Fd2z 3YuQ== X-Gm-Message-State: AOJu0YyLYWHhV+nb1745xrWAhaRUkb7v9NXagaq1IBUkB89QjfiRf6Yk u0UQgZ567jUu9hq5JbQygMVscP26q/7jARrodN8CaWcrWrgh5f1nLuexNjf5TA== X-Google-Smtp-Source: AGHT+IF5EUhfB0YxiEUOm70nDGztNDk9kaIlemTB9vV8DA+32lu6CAAL3tC8Y8X3vRqjjDiEUSQC+g== X-Received: by 2002:a05:690c:fd6:b0:614:cd12:d55d with SMTP id dg22-20020a05690c0fd600b00614cd12d55dmr3463286ywb.10.1713551705891; Fri, 19 Apr 2024 11:35:05 -0700 (PDT) Received: from lvnvda5233.lvn.broadcom.net ([192.19.161.250]) by smtp.gmail.com with ESMTPSA id d12-20020ac851cc000000b00438527a4eb5sm547940qtn.10.2024.04.19.11.35.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Apr 2024 11:35:05 -0700 (PDT) From: Michael Chan To: davem@davemloft.net Cc: netdev@vger.kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, andrew.gospodarek@broadcom.com Subject: [PATCH net 3/3] bnxt_en: Fix error recovery for 5760X (P7) chips Date: Fri, 19 Apr 2024 11:34:49 -0700 Message-Id: <20240419183449.234327-4-michael.chan@broadcom.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20240419183449.234327-1-michael.chan@broadcom.com> References: <20240419183449.234327-1-michael.chan@broadcom.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org During error recovery, such as AER fatal error slot reset, we call bnxt_try_map_fw_health_reg() to try to get access to the health register to determine the firmware state. Fix bnxt_try_map_fw_health_reg() to recognize the P7 chip correctly and set up the health register. This fixes this type of AER slot reset failure: bnxt_en 0000:04:00.0: AER: PCIe Bus Error: severity=Uncorrectable (Fatal), type=Inaccessible, (Unregistered Agent ID) bnxt_en 0000:04:00.0 enp4s0f0np0: PCI I/O error detected bnxt_en 0000:04:00.0 bnxt_re0: Handle device suspend call bnxt_en 0000:04:00.1 enp4s0f1np1: PCI I/O error detected bnxt_en 0000:04:00.1 bnxt_re1: Handle device suspend call pcieport 0000:00:02.0: AER: Root Port link has been reset (0) bnxt_en 0000:04:00.0 enp4s0f0np0: PCI Slot Reset bnxt_en 0000:04:00.0: enabling device (0000 -> 0002) bnxt_en 0000:04:00.0: Firmware not ready bnxt_en 0000:04:00.1 enp4s0f1np1: PCI Slot Reset bnxt_en 0000:04:00.1: enabling device (0000 -> 0002) bnxt_en 0000:04:00.1: Firmware not ready pcieport 0000:00:02.0: AER: device recovery failed Fixes: a432a45bdba4 ("bnxt_en: Define basic P7 macros") Signed-off-by: Michael Chan --- 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 86c1c30c70d5..ed04a90a4fdd 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -9089,7 +9089,7 @@ static void bnxt_try_map_fw_health_reg(struct bnxt *bp) BNXT_FW_HEALTH_WIN_BASE + BNXT_GRC_REG_CHIP_NUM); } - if (!BNXT_CHIP_P5(bp)) + if (!BNXT_CHIP_P5_PLUS(bp)) return; status_loc = BNXT_GRC_REG_STATUS_P5 |