mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-21 05:29:33 +07:00
bnxt_en: Extend ETHTOOL_RESET to hot reset driver.
If firmware supports hot reset, extend ETHTOOL_RESET to support hot reset driver which does not require a driver reload after ETHTOOL_RESET. The driver will go through the same coordinated reset sequence as a firmware initiated fatal/non-fatal reset. Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5b306bde2b
commit
0a3f4e4f34
@ -6947,6 +6947,8 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
|
||||
bp->flags |= BNXT_FLAG_ROCEV2_CAP;
|
||||
if (flags & FUNC_QCAPS_RESP_FLAGS_PCIE_STATS_SUPPORTED)
|
||||
bp->fw_cap |= BNXT_FW_CAP_PCIE_STATS_SUPPORTED;
|
||||
if (flags & FUNC_QCAPS_RESP_FLAGS_HOT_RESET_CAPABLE)
|
||||
bp->fw_cap |= BNXT_FW_CAP_HOT_RESET;
|
||||
if (flags & FUNC_QCAPS_RESP_FLAGS_EXT_STATS_SUPPORTED)
|
||||
bp->fw_cap |= BNXT_FW_CAP_EXT_STATS_SUPPORTED;
|
||||
if (flags & FUNC_QCAPS_RESP_FLAGS_ERROR_RECOVERY_CAPABLE)
|
||||
|
@ -1671,6 +1671,7 @@ struct bnxt {
|
||||
#define BNXT_FW_CAP_PCIE_STATS_SUPPORTED 0x00020000
|
||||
#define BNXT_FW_CAP_EXT_STATS_SUPPORTED 0x00040000
|
||||
#define BNXT_FW_CAP_ERR_RECOVER_RELOAD 0x00100000
|
||||
#define BNXT_FW_CAP_HOT_RESET 0x00200000
|
||||
|
||||
#define BNXT_NEW_RM(bp) ((bp)->fw_cap & BNXT_FW_CAP_NEW_RM)
|
||||
u32 hwrm_spec_code;
|
||||
|
@ -1787,6 +1787,8 @@ static int bnxt_firmware_reset(struct net_device *dev,
|
||||
case BNXT_FW_RESET_CHIP:
|
||||
req.embedded_proc_type = FW_RESET_REQ_EMBEDDED_PROC_TYPE_CHIP;
|
||||
req.selfrst_status = FW_RESET_REQ_SELFRST_STATUS_SELFRSTASAP;
|
||||
if (bp->fw_cap & BNXT_FW_CAP_HOT_RESET)
|
||||
req.flags = FW_RESET_REQ_FLAGS_RESET_GRACEFUL;
|
||||
break;
|
||||
case BNXT_FW_RESET_AP:
|
||||
req.embedded_proc_type = FW_RESET_REQ_EMBEDDED_PROC_TYPE_AP;
|
||||
@ -2983,7 +2985,8 @@ static int bnxt_reset(struct net_device *dev, u32 *flags)
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
if (pci_vfs_assigned(bp->pdev)) {
|
||||
if (pci_vfs_assigned(bp->pdev) &&
|
||||
!(bp->fw_cap & BNXT_FW_CAP_HOT_RESET)) {
|
||||
netdev_err(dev,
|
||||
"Reset not allowed when VFs are assigned to VMs\n");
|
||||
return -EBUSY;
|
||||
@ -2996,7 +2999,9 @@ static int bnxt_reset(struct net_device *dev, u32 *flags)
|
||||
|
||||
rc = bnxt_firmware_reset(dev, BNXT_FW_RESET_CHIP);
|
||||
if (!rc) {
|
||||
netdev_info(dev, "Reset request successful. Reload driver to complete reset\n");
|
||||
netdev_info(dev, "Reset request successful.\n");
|
||||
if (!(bp->fw_cap & BNXT_FW_CAP_HOT_RESET))
|
||||
netdev_info(dev, "Reload driver to complete reset\n");
|
||||
*flags = 0;
|
||||
}
|
||||
} else if (*flags == ETH_RESET_AP) {
|
||||
|
Loading…
Reference in New Issue
Block a user