From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) (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 6F02C3D4123 for ; Wed, 15 Apr 2026 14:28:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776263326; cv=none; b=hzDJQwwsEI+1J6yqaQXvVMUGKijeLDsxD5mXTi4UhMmcmAds15sSj5amfC5kJryIiVPJ0qODrHW+Hf2sKmELUpfdSfJKbXxmPHZ4IX4seC8UpZkA5xHXeqry3xDBQroa+MfM09Xf+EQHiVvPzkzAiQ9rI0LtMa7bZoTwK8CL6Ng= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776263326; c=relaxed/simple; bh=GUF4ORCJjHX1uOeyka72W243jz1bbjHEIX86BDqtL08=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iJzWVhLljOL66nhjh9sbUI1wDE6CiT47vcaLKOScxoCcrQbEJWZMkohQRflqPja+glSTD2MZrnQRUGJL0gtPeQ2vEYmn6Nhn/IbHnFHX0roLwaidviDMjRaSR8Ze9QLc9rSo+6pZqO1gRMYOmcovSdQIEp1bC+/rpmr13PLa45o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=nDdDUI5k; arc=none smtp.client-ip=198.175.65.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="nDdDUI5k" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1776263325; x=1807799325; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GUF4ORCJjHX1uOeyka72W243jz1bbjHEIX86BDqtL08=; b=nDdDUI5kNjOW8zdwoPmL/eBlW6q3GxuvnhVudc1gJB9uOgMK0d/qVHcW DiJtK/eVvxGf590rUHu3JZgTNJQvOrxObU/IrEXQhlc+ji744cYdT2Ngs 76E6QVcIacXxURkKvcd3/cIDzMOBYP+mHSZXXL0ctoLF5YECxNcmc7iOs MgSfZCk0oaRrSudxM6cgY7hOVD06Rhcg8QBPI8pVkckQbr6iEFgdQ9mIM Wbi99VnfUTxlmnsYRG9ZCUGl+0AG8NF0lVyMLezE6BEx9as2V6XeasU0M FQJcCxkuoEl2i05T4CFKD7DE0fXp08V9p9L8Sa1hgjhS2npQf6FnFdxfG A==; X-CSE-ConnectionGUID: ghu9YihQTx6w1Twr7J8q1g== X-CSE-MsgGUID: bGKr8A5+SgODkyz8aIgg0g== X-IronPort-AV: E=McAfee;i="6800,10657,11760"; a="77423728" X-IronPort-AV: E=Sophos;i="6.23,179,1770624000"; d="scan'208";a="77423728" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2026 07:28:45 -0700 X-CSE-ConnectionGUID: p8WwbvmeQryNK1OaKDX03Q== X-CSE-MsgGUID: LFzYkiuVSZuRDUCnJd0bmQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,179,1770624000"; d="scan'208";a="234467829" Received: from amlin-019-225.igk.intel.com ([10.102.19.225]) by orviesa003.jf.intel.com with ESMTP; 15 Apr 2026 07:28:43 -0700 From: Aleksandr Loktionov To: intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com, aleksandr.loktionov@intel.com Cc: netdev@vger.kernel.org, Simon Horman , Jacob Keller Subject: [PATCH iwl-net v3 1/6] ixgbe: fix SWFW semaphore timeout for X550 family Date: Wed, 15 Apr 2026 16:28:36 +0200 Message-ID: <20260415142841.3222399-2-aleksandr.loktionov@intel.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260415142841.3222399-1-aleksandr.loktionov@intel.com> References: <20260415142841.3222399-1-aleksandr.loktionov@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit According to FW documentation, the most time-consuming FW operation is Shadow RAM (SR) dump which takes up to 3.2 seconds. For X550 family devices the module-update FW command can take over 4.5 s. The default semaphore loop runs 200 iterations with a 5 ms sleep each, giving a maximum wait of 1 s -- not "200 ms" as previously stated in error. This is insufficient for X550 family FW update operations and causes spurious EBUSY failures. Extend the SW/FW semaphore timeout from 1 s to 5 s (1000 iterations x 5 ms) for all three X550 variants: ixgbe_mac_X550, ixgbe_mac_X550EM_x, and ixgbe_mac_x550em_a. All three share the same FW and exhibit the same worst-case latency. Use three explicit mac.type comparisons rather than a range check so future MAC additions are not inadvertently captured. The timeout variable is set immediately before the loop so the intent is clear, with an inline comment stating the resulting maximum delay. Fixes: 030eaece2d77 ("ixgbe: Add x550 SW/FW semaphore support") Suggested-by: Soumen Karmakar Suggested-by: Marta Plantykow Cc: stable@vger.kernel.org Signed-off-by: Aleksandr Loktionov Reviewed-by: Simon Horman Reviewed-by: Jacob Keller --- v2 -> v3: - Add Reviewed-by: Simon Horman, Reviewed-by: Jacob Keller; no code change (Jacob suggested read_poll_timeout() but accepted as-is). v1 -> v2: - Squash with 0015 (X550EM extension); fix commit message ("200ms" was wrong, actual default is 1 s); replace >= / <= range check with three explicit mac.type == comparisons per Tony Nguyen. drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c index e67e2fe..a3c8f51 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c @@ -577,6 +577,15 @@ int ixgbe_acquire_swfw_sync_X540(struct ixgbe_hw *hw, u32 mask) swmask |= swi2c_mask; fwmask |= swi2c_mask << 2; + /* Extend to 5 s (1000 x 5 ms) for X550 family; default is 1 s + * (200 x 5 ms). FW SR-dump takes up to 3.2 s; module-update up + * to 4.5 s. + */ + if (hw->mac.type == ixgbe_mac_X550 || + hw->mac.type == ixgbe_mac_X550EM_x || + hw->mac.type == ixgbe_mac_x550em_a) + timeout = 1000; + for (i = 0; i < timeout; i++) { /* SW NVM semaphore bit is used for access to all * SW_FW_SYNC bits (not just NVM) -- 2.52.0