From patchwork Tue Oct 10 17:32:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ertman, David M" X-Patchwork-Id: 13415811 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5C30171C1 for ; Tue, 10 Oct 2023 17:30:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="SCPXqWvv" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1045694 for ; Tue, 10 Oct 2023 10:30:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696959016; x=1728495016; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=L2n0pBZLx8X5Vmzd2nbtc8v2w1Pf/4OYLxqFj2aYq5M=; b=SCPXqWvvjJsTdU7yNa770OvhSSPqb4jCrScb2dCDBQC6isVhmmITGw21 c5FFEGQkb8udueYsLHI+4Nn7+Co6NuBiNXwEpEX+1YAlyLur9n+pg4KnP JZ8Cj0buLW/Zk1RBu03N+cKUpbKPdWXLe0BDlnCuYagF3dMdjw8znDzNI 0uV25cncnYCSfsB7+x/GgZJDfllVm4uDVTMb35g6nuL9NBTbSbcRCf0WT 817rAp4CFVhYV2BPCsUE/RzhR5zlT+PKWGonA7D5J5tBfpTDFjy6ZI/QB Vrt53yLnPNJmFWfKnOLHNVa+YTFracd9IU7mgnpVBQRTfvQPTwBuxSbEf w==; X-IronPort-AV: E=McAfee;i="6600,9927,10859"; a="3051151" X-IronPort-AV: E=Sophos;i="6.03,213,1694761200"; d="scan'208";a="3051151" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2023 10:30:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10859"; a="747125117" X-IronPort-AV: E=Sophos;i="6.03,213,1694761200"; d="scan'208";a="747125117" Received: from dmert-dev.jf.intel.com ([10.166.241.14]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2023 10:30:12 -0700 From: Dave Ertman To: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org Subject: [PATCH iwl-next v2] ice: Fix SRIOV LAG disable on non-compliant aggreagate Date: Tue, 10 Oct 2023 10:32:15 -0700 Message-Id: <20231010173215.1502053-1-david.m.ertman@intel.com> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org If an attribute of an aggregate interface disqualifies it from supporting SRIOV, the driver will unwind the SRIOV support. Currently the driver is clearing the feature bit for all interfaces in the aggregate, but this is not allowing the other interfaces to unwind successfully on driver unload. Only clear the feature bit for the interface that is currently unwinding. Fixes: bf65da2eb279 ("ice: enforce interface eligibility and add messaging for SRIOV LAG") Signed-off-by: Dave Ertman Reviewed-by: Wojciech Drewek Reviewed-by: Simon Horman Tested-by: Sujai Buvaneswaran --- drivers/net/ethernet/intel/ice/ice_lag.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_lag.c b/drivers/net/ethernet/intel/ice/ice_lag.c index 2c96d1883e19..f405c07410a7 100644 --- a/drivers/net/ethernet/intel/ice/ice_lag.c +++ b/drivers/net/ethernet/intel/ice/ice_lag.c @@ -1513,18 +1513,12 @@ static void ice_lag_chk_disabled_bond(struct ice_lag *lag, void *ptr) */ static void ice_lag_disable_sriov_bond(struct ice_lag *lag) { - struct ice_lag_netdev_list *entry; struct ice_netdev_priv *np; - struct net_device *netdev; struct ice_pf *pf; - list_for_each_entry(entry, lag->netdev_head, node) { - netdev = entry->netdev; - np = netdev_priv(netdev); - pf = np->vsi->back; - - ice_clear_feature_support(pf, ICE_F_SRIOV_LAG); - } + np = netdev_priv(lag->netdev); + pf = np->vsi->back; + ice_clear_feature_support(pf, ICE_F_SRIOV_LAG); } /**