From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A2437CD3436 for ; Fri, 8 May 2026 03:48:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 6E250414C9; Fri, 8 May 2026 03:48:52 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id dQ5MU-B10xXz; Fri, 8 May 2026 03:48:50 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 6C137414C8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1778212130; bh=Na84m9kRzq+PH1GMI4hKGKYJ2RaKgHZOkMxXeleq4tI=; h=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=tRBimOi6Ll47wfYe0rlESS2A3GVamTOUzqCOy2A/3yM4JUtOfb47GIgwH2ZpxI3Cd eAKy9pY9ydTLuYngQFacGnGqoXne2ouNyaZboeCp/daCxMNLuksAUP+UeeLwURowPq lIsD+9m81M6L6J7M/boG36REL6cx+/EOyzxAnwnENX6lkpoH6gyPOthld9rkVR01wx +J6zJYOeB9fGvDdhQrnSidpC3JJtk+3D3+0+0CJ9zx+n4mI3lbGadLuc0cunufrDZl lgV1CB7Dw6bCW5IYdtUoA6z2arHtR10q80XahIe05COTHo9w1UZmlvWuBUoscPR6wA uK3mHZZD3i0HQ== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 6C137414C8; Fri, 8 May 2026 03:48:50 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists1.osuosl.org (Postfix) with ESMTP id D9CFB272 for ; Fri, 8 May 2026 03:48:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id CBFBF414C8 for ; Fri, 8 May 2026 03:48:48 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id nrKdc5zlyUyD for ; Fri, 8 May 2026 03:48:48 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=198.175.65.13; helo=mgamail.intel.com; envelope-from=khai.wen.tan@linux.intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 9FB12414C4 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 9FB12414C4 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by smtp4.osuosl.org (Postfix) with ESMTPS id 9FB12414C4 for ; Fri, 8 May 2026 03:48:47 +0000 (UTC) X-CSE-ConnectionGUID: ey3Opvb+TaCwjhJoyClOcw== X-CSE-MsgGUID: XcM7FjbkQwy8qr+RJxbCzw== X-IronPort-AV: E=McAfee;i="6800,10657,11779"; a="90278858" X-IronPort-AV: E=Sophos;i="6.23,222,1770624000"; d="scan'208";a="90278858" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2026 20:48:47 -0700 X-CSE-ConnectionGUID: ZVbTtdOBSTy5opvJ/1Lc1w== X-CSE-MsgGUID: vUBzAKXPTDuBEzWjQE7hLQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,222,1770624000"; d="scan'208";a="236767299" Received: from unknown (HELO localhost.png.intel.com) ([10.107.255.61]) by orviesa009.jf.intel.com with ESMTP; 07 May 2026 20:48:42 -0700 From: KhaiWenTan To: anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, faizal.abdul.rahim@intel.com, hong.aun.looi@intel.com, hector.blanco.alcaine@intel.com, khai.wen.tan@intel.com, Faizal Rahim , Aleksandr Loktionov , Khai Wen Tan Date: Fri, 8 May 2026 05:47:03 +0800 Message-ID: <20260507214706.309984-2-khai.wen.tan@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260507214706.309984-1-khai.wen.tan@linux.intel.com> References: <20260507214706.309984-1-khai.wen.tan@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1778212128; x=1809748128; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IysmtrfEnBl2FAT/X43D4kfZ0H/PNoYdWVnFXWlv2xE=; b=RXRry30oxlfyQ51PH0RZpsjl1iupkmD2W9/aIiQGAJXbP6h2/S4uDZ55 LxaQA+gQjhFY/+XlTvc4ihQpND4yGbNiRqPTPzCQtzs1Pv52Hkk1v7VOg MEJryy678v6aYEluJmwygx4as87JMItebPe0F+QcMW7afZm01uXSdvYuB fb3DrvEguwyns/14+AqMC3eZ0jrwX2iMiMKY4/jvgRZPDXOCoa88K6HF+ MSVDJZA7HQFjidlA9Byal5elEOERVuRB2pE3EMZFP0HBt9TP4vAv1NQFt J8hMWUmdr4E2TTtGVrXhSnHXI8II4eOfK2WTLNqxs8Eb2ND3WenxSFnlP g==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=none (p=none dis=none) header.from=linux.intel.com X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=RXRry30o Subject: [Intel-wired-lan] [PATCH iwl-next v5 1/4] igc: remove unused autoneg_failed field X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" From: Faizal Rahim autoneg_failed in struct igc_mac_info is never set in the igc driver. Remove the field and the dead code checking it in igc_config_fc_after_link_up(). The field originates from the e1000/e1000e fiber/serdes forced-link path, where MAC-level autoneg timeout sets it to signal the flow-control code to force pause. igc supports only copper, so it never needs to set this field. Reviewed-by: Looi Hong Aun Reviewed-by: Aleksandr Loktionov Signed-off-by: Faizal Rahim Signed-off-by: Khai Wen Tan --- drivers/net/ethernet/intel/igc/igc_hw.h | 1 - drivers/net/ethernet/intel/igc/igc_mac.c | 16 +--------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/net/ethernet/intel/igc/igc_hw.h b/drivers/net/ethernet/intel/igc/igc_hw.h index be8a49a86d09..86ab8f566f44 100644 --- a/drivers/net/ethernet/intel/igc/igc_hw.h +++ b/drivers/net/ethernet/intel/igc/igc_hw.h @@ -92,7 +92,6 @@ struct igc_mac_info { bool asf_firmware_present; bool arc_subsystem_valid; - bool autoneg_failed; bool get_link_status; }; diff --git a/drivers/net/ethernet/intel/igc/igc_mac.c b/drivers/net/ethernet/intel/igc/igc_mac.c index 7ac6637f8db7..142beb9ae557 100644 --- a/drivers/net/ethernet/intel/igc/igc_mac.c +++ b/drivers/net/ethernet/intel/igc/igc_mac.c @@ -438,28 +438,14 @@ void igc_config_collision_dist(struct igc_hw *hw) * Checks the status of auto-negotiation after link up to ensure that the * speed and duplex were not forced. If the link needed to be forced, then * flow control needs to be forced also. If auto-negotiation is enabled - * and did not fail, then we configure flow control based on our link - * partner. + * then we configure flow control based on our link partner. */ s32 igc_config_fc_after_link_up(struct igc_hw *hw) { u16 mii_status_reg, mii_nway_adv_reg, mii_nway_lp_ability_reg; - struct igc_mac_info *mac = &hw->mac; u16 speed, duplex; s32 ret_val = 0; - /* Check for the case where we have fiber media and auto-neg failed - * so we had to force link. In this case, we need to force the - * configuration of the MAC to match the "fc" parameter. - */ - if (mac->autoneg_failed) - ret_val = igc_force_mac_fc(hw); - - if (ret_val) { - hw_dbg("Error forcing flow control settings\n"); - goto out; - } - /* In auto-neg, we need to check and see if Auto-Neg has completed, * and if so, how the PHY and link partner has flow control * configured. -- 2.43.0