]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ice: treat subfunction VSI the same as PF VSI
authorMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tue, 20 Aug 2024 06:57:49 +0000 (08:57 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 6 Sep 2024 18:01:24 +0000 (11:01 -0700)
When subfunction VSI is open the same code as for PF VSI should be
executed. Also when up is complete. Reflect that in code by adding
subfunction VSI to consideration.

In case of stopping, PF doesn't have additional tasks, so the same
is with subfunction VSI.

Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_main.c

index b11124fef4b99eb7fcc42c01f3d0ad495e57a5c0..c2e56413645a8f8d96d9757fec404dc16c5a132a 100644 (file)
@@ -6754,7 +6754,8 @@ static int ice_up_complete(struct ice_vsi *vsi)
 
        if (vsi->port_info &&
            (vsi->port_info->phy.link_info.link_info & ICE_AQ_LINK_UP) &&
-           vsi->netdev && vsi->type == ICE_VSI_PF) {
+           ((vsi->netdev && (vsi->type == ICE_VSI_PF ||
+                             vsi->type == ICE_VSI_SF)))) {
                ice_print_link_msg(vsi, true);
                netif_tx_start_all_queues(vsi->netdev);
                netif_carrier_on(vsi->netdev);
@@ -7452,7 +7453,7 @@ int ice_vsi_open(struct ice_vsi *vsi)
 
        ice_vsi_cfg_netdev_tc(vsi, vsi->tc_cfg.ena_tc);
 
-       if (vsi->type == ICE_VSI_PF) {
+       if (vsi->type == ICE_VSI_PF || vsi->type == ICE_VSI_SF) {
                /* Notify the stack of the actual queue counts. */
                err = netif_set_real_num_tx_queues(vsi->netdev, vsi->num_txq);
                if (err)