Commit a6c81e32 authored by shantiprasad shettar's avatar shantiprasad shettar Committed by Paolo Abeni
Browse files

bnxt_en: Query FW parameters when the CAPS_CHANGE bit is set



Newer FW can set the CAPS_CHANGE flag during ifup if some capabilities
or configurations have changed.  For example, the CoS queue
configurations may have changed.  Support this new flag by treating it
almost like FW reset.  The driver will essentially rediscover all
features and capabilities, reconfigure all backing store context memory,
reset everything to default, and reserve all resources.

Reviewed-by: default avatarSomnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: default avatarPavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: default avatarshantiprasad shettar <shantiprasad.shettar@broadcom.com>
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Link: https://patch.msgid.link/20250310183129.3154117-5-michael.chan@broadcom.com


Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 2c4d376c
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -12309,6 +12309,7 @@ static int bnxt_hwrm_if_change(struct bnxt *bp, bool up)
	struct hwrm_func_drv_if_change_input *req;
	bool fw_reset = !bp->irq_tbl;
	bool resc_reinit = false;
	bool caps_change = false;
	int rc, retry = 0;
	u32 flags = 0;

@@ -12364,8 +12365,11 @@ static int bnxt_hwrm_if_change(struct bnxt *bp, bool up)
		set_bit(BNXT_STATE_ABORT_ERR, &bp->state);
		return -ENODEV;
	}
	if (resc_reinit || fw_reset) {
		if (fw_reset) {
	if (flags & FUNC_DRV_IF_CHANGE_RESP_FLAGS_CAPS_CHANGE)
		caps_change = true;

	if (resc_reinit || fw_reset || caps_change) {
		if (fw_reset || caps_change) {
			set_bit(BNXT_STATE_FW_RESET_DET, &bp->state);
			if (!test_bit(BNXT_STATE_IN_FW_RESET, &bp->state))
				bnxt_ulp_irq_stop(bp);