Commit bae8a003 authored by Vasundhara Volam's avatar Vasundhara Volam Committed by David S. Miller
Browse files

bnxt_en: Remove the read of BNXT_FW_RESET_INPROG_REG after firmware reset.



Once the chip goes through reset, the register mapping may be lost
and any read of the mapped health registers may return garbage value
until the registers are mapped again in the init path.

Reading BNXT_FW_RESET_INPROG_REG after firmware reset will likely
return garbage value due to the above reason.  Reading this register
is for information purpose only so remove it.

Reviewed-by: default avatarEdwin Peer <edwin.peer@broadcom.com>
Signed-off-by: default avatarVasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2924ad95
Loading
Loading
Loading
Loading
+11 −20
Original line number Diff line number Diff line
@@ -11769,14 +11769,11 @@ static void bnxt_fw_reset_task(struct work_struct *work)
		return;
	case BNXT_FW_RESET_STATE_ENABLE_DEV:
		bnxt_inv_fw_health_reg(bp);
		if (test_bit(BNXT_STATE_FW_FATAL_COND, &bp->state)) {
			u32 val;

			if (!bp->fw_reset_min_dsecs) {
		if (test_bit(BNXT_STATE_FW_FATAL_COND, &bp->state) &&
		    !bp->fw_reset_min_dsecs) {
			u16 val;

				pci_read_config_word(bp->pdev, PCI_SUBSYSTEM_ID,
						     &val);
			pci_read_config_word(bp->pdev, PCI_SUBSYSTEM_ID, &val);
			if (val == 0xffff) {
				if (bnxt_fw_reset_timeout(bp)) {
					netdev_err(bp->dev, "Firmware reset aborted, PCI config space invalid\n");
@@ -11786,12 +11783,6 @@ static void bnxt_fw_reset_task(struct work_struct *work)
				return;
			}
		}
			val = bnxt_fw_health_readl(bp,
						   BNXT_FW_RESET_INPROG_REG);
			if (val)
				netdev_warn(bp->dev, "FW reset inprog %x after min wait time.\n",
					    val);
		}
		clear_bit(BNXT_STATE_FW_FATAL_COND, &bp->state);
		if (pci_enable_device(bp->pdev)) {
			netdev_err(bp->dev, "Cannot re-enable PCI device\n");