]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Implement faster recovery for firmware fatal error.
authorMichael Chan <michael.chan@broadcom.com>
Sun, 14 Feb 2021 23:04:57 +0000 (18:04 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Feb 2021 01:27:50 +0000 (17:27 -0800)
commitdab62e7c2de7b035c928a8babee27a6127891fdf
tree3ab86a6f6e95d588de82befb8019d1838832234a
parentbe6d755f3d0c7c76d07f980bca6dd7e70dcec452
bnxt_en: Implement faster recovery for firmware fatal error.

During some fatal firmware error conditions, the PCI config space
register 0x2e which normally contains the subsystem ID will become
0xffff.  This register will revert back to the normal value after
the chip has completed core reset.  If we detect this condition,
we can poll this config register immediately for the value to revert.
Because we use config read cycles to poll this register, there is no
possibility of Master Abort if we happen to read it during core reset.
This speeds up recovery significantly as we don't have to wait for the
conservative min_time before polling MMIO to see if the firmware has
come out of reset.  As soon as this register changes value we can
proceed to re-initialize the device.

Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
Reviewed-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Reviewed-by: Andy Gospodarek <gospo@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c