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 smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 5311EE77173 for ; Thu, 5 Dec 2024 08:46:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 19B8484706; Thu, 5 Dec 2024 08:46:16 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 6m33bBNoowoE; Thu, 5 Dec 2024 08:46:15 +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 smtp1.osuosl.org 5C02B84723 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1733388375; bh=OIkB1X0EGrYbZm7Ilg0aRXz+b5Gn8QJyAj5fnhGou/I=; h=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=22+oZu2XV3z0hZS3G8PDrrDUWhP35xl+jVAp/VbxiCDTBk7k+SKWJ81+0xzTwpuDG MGWw8I+75wFcFDyktRi/WXpWTv2cLNGpbtFZVm0e4uwiPKdMqhVd87EeqsLAOr11UH tBAkxelvmz5RY51rOWJu2FqtxqpMbEBnGRq+mUpvLJXkxnQawVlCIackh6InGLdQS9 dUyH/4NuNA4UOmgxhpp74t0EpgqKowNFfRuljOhCqtJ83KnM4rR5wjnZQx4eZ8ksU0 Zobpz/asfIijQXi4O8NzYzN53xxaAT8Q3d4jcyv5cajNROnBST/WAJs47hXJDSEWFU Rv5m2GHvIpRyA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id 5C02B84723; Thu, 5 Dec 2024 08:46:15 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists1.osuosl.org (Postfix) with ESMTP id C96F11FDB for ; Thu, 5 Dec 2024 08:46:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 46B6384706 for ; Thu, 5 Dec 2024 08:46:11 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id HQAocx38TJXW for ; Thu, 5 Dec 2024 08:46:10 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.12; helo=mgamail.intel.com; envelope-from=piotr.kwapulinski@intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 809278471A DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 809278471A Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by smtp1.osuosl.org (Postfix) with ESMTPS id 809278471A for ; Thu, 5 Dec 2024 08:46:10 +0000 (UTC) X-CSE-ConnectionGUID: pzyDEA6aQyitJdjp5dPtFQ== X-CSE-MsgGUID: 7m4ZjhEnSrykBt7GLIrvag== X-IronPort-AV: E=McAfee;i="6700,10204,11276"; a="37623293" X-IronPort-AV: E=Sophos;i="6.12,209,1728975600"; d="scan'208";a="37623293" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2024 00:46:04 -0800 X-CSE-ConnectionGUID: 5rA+FfJgRGu0SwkZvoK+KA== X-CSE-MsgGUID: IZT2qFQ+TQuHr/K6oh92pQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,209,1728975600"; d="scan'208";a="94864218" Received: from pkwapuli-mobl1.ger.corp.intel.com (HELO vbox-pkwap.ger.corp.intel.com) ([10.246.2.76]) by orviesa008.jf.intel.com with ESMTP; 05 Dec 2024 00:46:02 -0800 From: Piotr Kwapulinski To: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org, Piotr Kwapulinski , Simon Horman Date: Thu, 5 Dec 2024 09:44:49 +0100 Message-ID: <20241205084450.4651-8-piotr.kwapulinski@intel.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20241205084450.4651-1-piotr.kwapulinski@intel.com> References: <20241205084450.4651-1-piotr.kwapulinski@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=1733388370; x=1764924370; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wN8g+2aWCN/UxDs47zeXidJBU8T9/AeTFsKPJpnngKs=; b=lpvZHBusIyWM2duETw7o+V5kh8NByxPmT/PWYng11thrN5msigkVXM8f 5VBhV7B143giR25WLis9tX9wftykrgGoiXV3lE16M55FNpeRn2FVdXj7x ESgk9VvThjqVzR+t+tUxbaJTGH/E5kbQcQZY+eLfcjso2GiPSPpor209P 1JaQpU7L6NdUa4IuOSl4ugbbPS1X67YhVTgLrspn97paJ5W/GvVVVgmyL 5gpn7qPCPzlnEBimvSpY2u727nKRaWpte4XuV8OA71tjJlnMFhJEOA6gO 812iHd2lri/uaq3eAQMs4uxx2rL8heqm7I0kwSSf4Ht9WtnEPROiH9TG9 g==; X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=intel.com X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=lpvZHBus Subject: [Intel-wired-lan] [PATCH iwl-next v12 7/8] ixgbe: Clean up the E610 link management related code 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" Required for enabling the link management in E610 device. Reviewed-by: Simon Horman Signed-off-by: Piotr Kwapulinski --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 17 +++++++++++------ drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 12 ++++++------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 0992775..1542859 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -237,6 +237,9 @@ static int ixgbe_get_parent_bus_info(struct ixgbe_adapter *adapter) * bandwidth details should be gathered from the parent bus instead of from the * device. Used to ensure that various locations all have the correct device ID * checks. + * + * Return: true if information should be collected from the parent bus, false + * otherwise */ static inline bool ixgbe_pcie_from_parent(struct ixgbe_hw *hw) { @@ -5528,7 +5531,9 @@ static void ixgbe_sfp_link_config(struct ixgbe_adapter *adapter) * ixgbe_non_sfp_link_config - set up non-SFP+ link * @hw: pointer to private hardware struct * - * Returns 0 on success, negative on failure + * Configure non-SFP link. + * + * Return: 0 on success, negative on failure **/ static int ixgbe_non_sfp_link_config(struct ixgbe_hw *hw) { @@ -7217,11 +7222,11 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter) for (i = 0; i < 16; i++) { hwstats->qptc[i] += IXGBE_READ_REG(hw, IXGBE_QPTC(i)); hwstats->qprc[i] += IXGBE_READ_REG(hw, IXGBE_QPRC(i)); - if ((hw->mac.type == ixgbe_mac_82599EB) || - (hw->mac.type == ixgbe_mac_X540) || - (hw->mac.type == ixgbe_mac_X550) || - (hw->mac.type == ixgbe_mac_X550EM_x) || - (hw->mac.type == ixgbe_mac_x550em_a)) { + if (hw->mac.type == ixgbe_mac_82599EB || + hw->mac.type == ixgbe_mac_X540 || + hw->mac.type == ixgbe_mac_X550 || + hw->mac.type == ixgbe_mac_X550EM_x || + hw->mac.type == ixgbe_mac_x550em_a) { hwstats->qbtc[i] += IXGBE_READ_REG(hw, IXGBE_QBTC_L(i)); IXGBE_READ_REG(hw, IXGBE_QBTC_H(i)); /* to clear */ hwstats->qbrc[i] += IXGBE_READ_REG(hw, IXGBE_QBRC_L(i)); diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c index d9a8cf0..1de0544 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c @@ -3505,13 +3505,13 @@ static int ixgbe_reset_hw_X550em(struct ixgbe_hw *hw) return status; } -/** ixgbe_set_ethertype_anti_spoofing_X550 - Enable/Disable Ethertype +/** ixgbe_set_ethertype_anti_spoofing_x550 - Enable/Disable Ethertype * anti-spoofing * @hw: pointer to hardware structure * @enable: enable or disable switch for Ethertype anti-spoofing * @vf: Virtual Function pool - VF Pool to set for Ethertype anti-spoofing **/ -static void ixgbe_set_ethertype_anti_spoofing_X550(struct ixgbe_hw *hw, +static void ixgbe_set_ethertype_anti_spoofing_x550(struct ixgbe_hw *hw, bool enable, int vf) { int vf_target_reg = vf >> 3; @@ -3527,12 +3527,12 @@ static void ixgbe_set_ethertype_anti_spoofing_X550(struct ixgbe_hw *hw, IXGBE_WRITE_REG(hw, IXGBE_PFVFSPOOF(vf_target_reg), pfvfspoof); } -/** ixgbe_set_source_address_pruning_X550 - Enable/Disbale src address pruning +/** ixgbe_set_source_address_pruning_x550 - Enable/Disable src address pruning * @hw: pointer to hardware structure * @enable: enable or disable source address pruning * @pool: Rx pool to set source address pruning for **/ -static void ixgbe_set_source_address_pruning_X550(struct ixgbe_hw *hw, +static void ixgbe_set_source_address_pruning_x550(struct ixgbe_hw *hw, bool enable, unsigned int pool) { @@ -3831,9 +3831,9 @@ static int ixgbe_write_phy_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr, .set_mac_anti_spoofing = &ixgbe_set_mac_anti_spoofing, \ .set_vlan_anti_spoofing = &ixgbe_set_vlan_anti_spoofing, \ .set_source_address_pruning = \ - &ixgbe_set_source_address_pruning_X550, \ + &ixgbe_set_source_address_pruning_x550, \ .set_ethertype_anti_spoofing = \ - &ixgbe_set_ethertype_anti_spoofing_X550, \ + &ixgbe_set_ethertype_anti_spoofing_x550, \ .disable_rx_buff = &ixgbe_disable_rx_buff_generic, \ .enable_rx_buff = &ixgbe_enable_rx_buff_generic, \ .get_thermal_sensor_data = NULL, \ -- 2.43.0