ice: recap the VSI and QoS info after rebuild
Subsystems (3)
PATCH v4 1/1 ice: recap the VSI and QoS info after rebuild
Fix IRDMA hardware initialization timeout (-110) after resume by separating VSI-dependent configuration from RDMA resource allocation, ensuring VSI is rebuilt before IRDMA accesses it.
After resume from suspend, IRDMA hardware initialization fails:
ice: IRDMA hardware initialization FAILED init_state=4 status=-110
Separate RDMA initialization into two phases:
1. ice_init_rdma() - Allocate resources only (no VSI/QoS access, no plug)
2. ice_rdma_finalize_setup() - Assign VSI/QoS info and plug device
This allows:
- ice_init_rdma() to stay in ice_resume() (mirrors ice_deinit_rdma() in ice_suspend())
- VSI assignment deferred until after ice_vsi_rebuild() completes
- QoS info updated after ice_dcb_rebuild() completes
- Device plugged only when control queues, VSI, and DCB are all ready
---
V1 -> V2: no changes.
V2 -> V3:
- mirrors init_rdma in resume as Tony Nguyen suggested to fix the memleak and move ice_plug_aux_dev/ice_unplug_aux_dev out of init/deinit rdma.
- ensure the correct VSI/QoS info is loaded after rebuild. V3 -> V4:
- Log warning when aux device plug fails.
- Remove incorrect xa_erase() call when xa_alloc() fails.
- Add pf->vsi NULL check.
drivers/net/ethernet/intel/ice/ice.h | 1 + drivers/net/ethernet/intel/ice/ice_idc.c | 44 +++++++++++++++++------ drivers/net/ethernet/intel/ice/ice_main.c | 7 +++- 3 files changed, 41 insertions(+), 11 deletions(-)
drivers/net/ethernet/intel/ice/ice.h +1 -0
@@ -990,6 +990,7 @@ int ice_schedule_reset(struct ice_pf *pf, enum ice_reset_req reset);void ice_print_link_msg (struct ice_vsi *vsi,bool isup);int ice_plug_aux_dev (struct ice_pf *pf);void ice_unplug_aux_dev (struct ice_pf *pf); +void ice_rdma_finalize_setup (struct ice_pf *pf);int ice_init_rdma (struct ice_pf *pf);void ice_deinit_rdma (struct ice_pf *pf);bool ice_is_wol_supported (struct ice_hw *hw);
drivers/net/ethernet/intel/ice/ice_idc.c +34 -10
69 lines not on this page · raw message
drivers/net/ethernet/intel/ice/ice_main.c +6 -1
@@ -5136,6 +5136,9 @@ int ice_load(struct ice_pf *pf)if (err) goto err_init_rdma; +/* Finalize RDMA: VSI already created, assign info and plug device */ +ice_rdma_finalize_setup (pf); +ice_service_task_restart (pf);clear_bit (ICE_DOWN , pf->state);
@@ -5167,6 +5170,7 @@ void ice_unload(struct ice_pf *pf)devl_assert_locked (priv_to_devlink (pf)); +ice_unplug_aux_dev (pf);ice_deinit_rdma (pf);ice_deinit_features (pf);ice_tc_indir_block_unregister (vsi);
@@ -5593,6 +5597,7 @@ static int ice_suspend(struct device *dev)*/ disabled =ice_service_task_stop (pf); +ice_unplug_aux_dev (pf);ice_deinit_rdma (pf);/* Already suspended?, then there is nothing to do */
@@ -7802,7 +7807,7 @@ static void ice_rebuild(struct ice_pf *pf, enum ice_reset_req reset_type)ice_health_clear (pf); -ice_plug_aux_dev (pf); +ice_rdma_finalize_setup (pf);if (ice_is_feature_supported (pf,ICE_F_SRIOV_LAG ))ice_lag_rebuild (pf);
Signature · 1 line
2.43.0
Quoted 18 lines · Aaron Ma
Fix IRDMA hardware initialization timeout (-110) after resume by separating VSI-dependent configuration from RDMA resource allocation, ensuring VSI is rebuilt before IRDMA accesses it.
After resume from suspend, IRDMA hardware initialization fails:
ice: IRDMA hardware initialization FAILED init_state=4 status=-110Separate RDMA initialization into two phases:
1.ice_init_rdma()- Allocate resources only (no VSI/QoS access, no plug)
2.ice_rdma_finalize_setup()- Assign VSI/QoS info and plug deviceThis allows:
-ice_init_rdma()to stay inice_resume()(mirrorsice_deinit_rdma()inice_suspend())
- VSI assignment deferred until afterice_vsi_rebuild()completes
- QoS info updated afterice_dcb_rebuild()completes
- Device plugged only when control queues, VSI, and DCB are all ready
Quoted 3 lines
Fixes bc69ad74867db ("ice: avoid IRQ collision to fix init failure on ACPI S3 resume")Reviewed-by Aleksandr Loktionov <[email protected]>Signed-off-by Aaron Ma <[email protected]>