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.swiatkow...@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 --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");
-- 
2.42.0

Reply via email to