[PATCH iwl-net] ice: restore double VLAN port parameters on devlink reload

From: Petr Oros

Date: Mon Sep 21 2026 - 06:48:46 EST


Set Port Parameters with the double VLAN flag is issued from probe and
from ice_rebuild(), but not from the devlink reinit path. ice_init_hw()
resets the PF there and the port ends up in single VLAN mode while the
driver keeps operating in DVM, so outer VLAN tags requested through the
Tx descriptor by the PF and by VFs are silently not inserted until the
next probe.

Move the call into ice_init_dev(), which is shared by probe and reinit.

Fixes: 31c8db2c4fa7 ("ice: implement devlink reinit action")
Signed-off-by: Petr Oros <poros@xxxxxxxxxx>
---
drivers/net/ethernet/intel/ice/ice_main.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 423adc138dd67c..8c4b0fbc790644 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -4766,6 +4766,14 @@ int ice_init_dev(struct ice_pf *pf)
int err;

ice_set_pf_caps(pf);
+
+ err = ice_aq_set_port_params(pf->hw.port_info, ice_is_dvm_ena(&pf->hw),
+ NULL);
+ if (err) {
+ dev_err(dev, "ice_aq_set_port_params failed: %d\n", err);
+ return err;
+ }
+
err = ice_init_interrupt_scheme(pf);
if (err) {
dev_err(dev, "ice_init_interrupt_scheme failed: %d\n", err);
@@ -4909,7 +4917,6 @@ static void ice_init_link(struct ice_pf *pf)

static int ice_init_pf_sw(struct ice_pf *pf)
{
- bool dvm = ice_is_dvm_ena(&pf->hw);
struct ice_vsi *vsi;
int err;

@@ -4928,10 +4935,6 @@ static int ice_init_pf_sw(struct ice_pf *pf)
/* record the sw_id available for later use */
pf->first_sw->sw_id = pf->hw.port_info->sw_id;

- err = ice_aq_set_port_params(pf->hw.port_info, dvm, NULL);
- if (err)
- goto err_aq_set_port_params;
-
vsi = ice_pf_vsi_setup(pf, pf->hw.port_info);
if (!vsi) {
err = -ENOMEM;
@@ -4941,7 +4944,6 @@ static int ice_init_pf_sw(struct ice_pf *pf)
return 0;

err_pf_vsi_setup:
-err_aq_set_port_params:
kfree(pf->first_sw);
return err;
}
--
2.55.0