mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
bnxt_en: Skip firmware fatal error recovery if chip is not accessible
[ Upstream commit83474a9b25] Driver starts firmware fatal error recovery by detecting heartbeat failure or fw reset count register changing. But these checks are not reliable if the device is not accessible. This can happen while DPC (Downstream Port containment) is in progress. Skip firmware fatal recovery if pci_device_is_present() returns false. Fixes:acfb50e4e7("bnxt_en: Add FW fatal devlink_health_reporter.") Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com> Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com> Signed-off-by: Vikas Gupta <vikas.gupta@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5fc86a4580
commit
5ce24936d5
@@ -11576,6 +11576,7 @@ static void bnxt_tx_timeout(struct net_device *dev, unsigned int txqueue)
|
|||||||
static void bnxt_fw_health_check(struct bnxt *bp)
|
static void bnxt_fw_health_check(struct bnxt *bp)
|
||||||
{
|
{
|
||||||
struct bnxt_fw_health *fw_health = bp->fw_health;
|
struct bnxt_fw_health *fw_health = bp->fw_health;
|
||||||
|
struct pci_dev *pdev = bp->pdev;
|
||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
if (!fw_health->enabled || test_bit(BNXT_STATE_IN_FW_RESET, &bp->state))
|
if (!fw_health->enabled || test_bit(BNXT_STATE_IN_FW_RESET, &bp->state))
|
||||||
@@ -11589,7 +11590,7 @@ static void bnxt_fw_health_check(struct bnxt *bp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
val = bnxt_fw_health_readl(bp, BNXT_FW_HEARTBEAT_REG);
|
val = bnxt_fw_health_readl(bp, BNXT_FW_HEARTBEAT_REG);
|
||||||
if (val == fw_health->last_fw_heartbeat) {
|
if (val == fw_health->last_fw_heartbeat && pci_device_is_present(pdev)) {
|
||||||
fw_health->arrests++;
|
fw_health->arrests++;
|
||||||
goto fw_reset;
|
goto fw_reset;
|
||||||
}
|
}
|
||||||
@@ -11597,7 +11598,7 @@ static void bnxt_fw_health_check(struct bnxt *bp)
|
|||||||
fw_health->last_fw_heartbeat = val;
|
fw_health->last_fw_heartbeat = val;
|
||||||
|
|
||||||
val = bnxt_fw_health_readl(bp, BNXT_FW_RESET_CNT_REG);
|
val = bnxt_fw_health_readl(bp, BNXT_FW_RESET_CNT_REG);
|
||||||
if (val != fw_health->last_fw_reset_cnt) {
|
if (val != fw_health->last_fw_reset_cnt && pci_device_is_present(pdev)) {
|
||||||
fw_health->discoveries++;
|
fw_health->discoveries++;
|
||||||
goto fw_reset;
|
goto fw_reset;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user