From patchwork Mon Dec 11 21:19:28 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: 13488054 X-Patchwork-Delegate: kuba@kernel.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ex2vMPOy" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58B95CF for ; Mon, 11 Dec 2023 13:17:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702329455; x=1733865455; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=yuAX9jyl65lpPzqJ71UXXGHbloXh0bqU1dqvk5SDlHo=; b=ex2vMPOyGJ1roANGbpO5LrtwNxO3F4wEyMl9pv2jSGYH69yvOYoFa2Pa hLD+c0lHrizDnEfKQD758/0Kuq0wdKoOIENmcK4KDcOazVmYQZx8EVi9E i1IwbWjJqCygLlkV1OSi0sXjbksAIK8TlEwAOlgdPgPTqoG2LgvwlANPQ YJyVekEl5YU7ygiuO8Xt3zhje3bsznA5NEvodkDjbVKjL44wJXQxAKXxM mmpjzCPjJRfrp6R+SI8JnbD47pyTQraEfQc0lwAlCudbASRhngUKk9K7v OzzFN+BsoK77rC4vh7OJElEygG7oDb0uGm82hjDvpupuD2TeaA1hgWZgJ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10921"; a="13406215" X-IronPort-AV: E=Sophos;i="6.04,268,1695711600"; d="scan'208";a="13406215" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Dec 2023 13:17:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,268,1695711600"; d="scan'208";a="14662033" Received: from dmert-dev.jf.intel.com ([10.166.241.14]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Dec 2023 13:17:34 -0800 From: Dave Ertman To: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org, Jesse Brandeburg Subject: [PATCH iwl-net v2] ice: alter feature support check for SRIOV and LAG Date: Mon, 11 Dec 2023 13:19:28 -0800 Message-Id: <20231211211928.2261079-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-Patchwork-Delegate: kuba@kernel.org Previously, the ice driver had support for using a hanldler for bonding netdev events to ensure that conflicting features were not allowed to be activated at the same time. While this was still in place, additional support was added to specifically support SRIOV and LAG together. These both utilized the netdev event handler, but the SRIOV and LAG feature was behind a capabilities feature check to make sure the current NVM has support. The exclusion part of the event handler should be removed since there are users who have custom made solutions that depend on the non-exclusion of features. Wrap the creation/registration and cleanup of the event handler and associated structs in the probe flow with a feature check so that the only systems that support the full implementation of LAG features will initialize support. This will leave other systems unhindered with functionality as it existed before any LAG code was added. Fixes: bb52f42acef6 ("ice: Add driver support for firmware changes for LAG") Reviewed-by: Jesse Brandeburg Signed-off-by: Dave Ertman Reviewed-by: Simon Horman Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) --- v2: Added Fixes tag --- drivers/net/ethernet/intel/ice/ice_lag.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/intel/ice/ice_lag.c b/drivers/net/ethernet/intel/ice/ice_lag.c index 280994ee5933..b47cd43ae871 100644 --- a/drivers/net/ethernet/intel/ice/ice_lag.c +++ b/drivers/net/ethernet/intel/ice/ice_lag.c @@ -1981,6 +1981,8 @@ int ice_init_lag(struct ice_pf *pf) int n, err; ice_lag_init_feature_support_flag(pf); + if (!ice_is_feature_supported(pf, ICE_F_SRIOV_LAG)) + return 0; pf->lag = kzalloc(sizeof(*lag), GFP_KERNEL); if (!pf->lag)