Merge tag 'rust-6.9' of https://github.com/Rust-for-Linux/linux
[sfrench/cifs-2.6.git] / drivers / net / ethernet / mellanox / mlx5 / core / devlink.c
index 3e064234f6fe950273e16a80f31b365e3cad4865..98d4306929f3edf3782d573b5f207a04d64fecdb 100644 (file)
@@ -157,6 +157,12 @@ static int mlx5_devlink_reload_down(struct devlink *devlink, bool netns_change,
                return -EOPNOTSUPP;
        }
 
+       if (action == DEVLINK_RELOAD_ACTION_FW_ACTIVATE &&
+           !dev->priv.fw_reset) {
+               NL_SET_ERR_MSG_MOD(extack, "FW activate is unsupported for this function");
+               return -EOPNOTSUPP;
+       }
+
        if (mlx5_core_is_pf(dev) && pci_num_vf(pdev))
                NL_SET_ERR_MSG_MOD(extack, "reload while VFs are present is unfavorable");