diff mbox series

[iwl-next,v1] ice: update representor after SF VSI config

Message ID 20240627081043.46211-1-michal.swiatkowski@linux.intel.com
State Under Review
Delegated to: Anthony Nguyen
Headers show
Series [iwl-next,v1] ice: update representor after SF VSI config | expand

Commit Message

Michal Swiatkowski June 27, 2024, 8:10 a.m. UTC
VSI for subfunction is only allocated when port representor is created.
The VSI id isn't correct at this state. Update the representor with
correct VSI id after the VSI is configured.

Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
---
It should be squashed with:
8a469e1a1cf9 ("ice: create port representor for SF")
---
 drivers/net/ethernet/intel/ice/ice_sf_eth.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/ice/ice_sf_eth.c b/drivers/net/ethernet/intel/ice/ice_sf_eth.c
index 73bb9c5d273d..abd74f30dabc 100644
--- a/drivers/net/ethernet/intel/ice/ice_sf_eth.c
+++ b/drivers/net/ethernet/intel/ice/ice_sf_eth.c
@@ -125,6 +125,8 @@  static int ice_sf_dev_probe(struct auxiliary_device *adev,
 	}
 	vsi->sf = dyn_port;
 
+	ice_eswitch_update_repr(&dyn_port->repr_id, vsi);
+
 	err = ice_devlink_create_sf_dev_port(sf_dev);
 	if (err) {
 		dev_err(dev, "Cannot add ice virtual devlink port for subfunction");