From patchwork Thu Jul 9 08:00:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinan Sun X-Patchwork-Id: 73614 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6CAE2A0526; Thu, 9 Jul 2020 10:17:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5C6791DEE0; Thu, 9 Jul 2020 10:14:44 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 68E4F1DA9C for ; Thu, 9 Jul 2020 10:14:31 +0200 (CEST) IronPort-SDR: Lp0gywseXaJkWLTbSpyEq2xqLW+kuayBOnLORpR96XsM+wBF8+3D0JJnwl0zlG+uqjmRf6rMMj YoxgwLgVCzcg== X-IronPort-AV: E=McAfee;i="6000,8403,9676"; a="145449388" X-IronPort-AV: E=Sophos;i="5.75,331,1589266800"; d="scan'208";a="145449388" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jul 2020 01:14:30 -0700 IronPort-SDR: P3kGLAptDY0tZ+6kq1D4weUP0E54Pta2ovuu9d3OfKVv6/s+MxeZpOIOaUmuqCUXKNwlLeceOR qP02YXAIwgGA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,331,1589266800"; d="scan'208";a="297989374" Received: from intel.sh.intel.com ([10.239.255.18]) by orsmga002.jf.intel.com with ESMTP; 09 Jul 2020 01:14:28 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Jeff Guo , Zhao1 Wei , Guinan Sun Date: Thu, 9 Jul 2020 08:00:45 +0000 Message-Id: <20200709080046.65879-19-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200709080046.65879-1-guinanx.sun@intel.com> References: <20200702031329.4495-1-guinanx.sun@intel.com> <20200709080046.65879-1-guinanx.sun@intel.com> Subject: [dpdk-dev] [PATCH v3 18/19] net/ixgbe/base: cleanup pre-processor tags X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The codes has been exposed correctly, so remove pre-processor tags. Signed-off-by: Guinan Sun Reviewed-by: Wei Zhao --- drivers/net/ixgbe/base/ixgbe_common.c | 8 -------- drivers/net/ixgbe/base/ixgbe_phy.h | 2 -- drivers/net/ixgbe/base/ixgbe_type.h | 10 ---------- drivers/net/ixgbe/base/ixgbe_vf.c | 4 ---- drivers/net/ixgbe/base/ixgbe_x550.c | 22 ---------------------- 5 files changed, 46 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c index ca8ec907e..14e54a8bc 100644 --- a/drivers/net/ixgbe/base/ixgbe_common.c +++ b/drivers/net/ixgbe/base/ixgbe_common.c @@ -4218,17 +4218,9 @@ s32 ixgbe_check_mac_link_generic(struct ixgbe_hw *hw, ixgbe_link_speed *speed, break; case IXGBE_LINKS_SPEED_10_X550EM_A: *speed = IXGBE_LINK_SPEED_UNKNOWN; -#ifdef PREBOOT_SUPPORT - if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T || - hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L || - hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII || - hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII_L) - *speed = IXGBE_LINK_SPEED_10_FULL; -#else if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T || hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L) *speed = IXGBE_LINK_SPEED_10_FULL; -#endif /* PREBOOT_SUPPORT */ break; default: *speed = IXGBE_LINK_SPEED_UNKNOWN; diff --git a/drivers/net/ixgbe/base/ixgbe_phy.h b/drivers/net/ixgbe/base/ixgbe_phy.h index e28c52a7b..ceefbb3e6 100644 --- a/drivers/net/ixgbe/base/ixgbe_phy.h +++ b/drivers/net/ixgbe/base/ixgbe_phy.h @@ -117,10 +117,8 @@ #define IXGBE_I2C_T_SU_STO 4 #define IXGBE_I2C_T_BUF 5 -#ifndef IXGBE_SFP_DETECT_RETRIES #define IXGBE_SFP_DETECT_RETRIES 10 -#endif /* IXGBE_SFP_DETECT_RETRIES */ #define IXGBE_TN_LASI_STATUS_REG 0x9005 #define IXGBE_TN_LASI_STATUS_TEMP_ALARM 0x0008 diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h index 51cdff39d..b7eec4563 100644 --- a/drivers/net/ixgbe/base/ixgbe_type.h +++ b/drivers/net/ixgbe/base/ixgbe_type.h @@ -2413,9 +2413,7 @@ enum { #define IXGBE_EEPROM_CTRL_2 1 /* EEPROM CTRL word 2 */ #define IXGBE_EEPROM_CCD_BIT 2 -#ifndef IXGBE_EEPROM_GRANT_ATTEMPTS #define IXGBE_EEPROM_GRANT_ATTEMPTS 1000 /* EEPROM attempts to gain grant */ -#endif /* Number of 5 microseconds we wait for EERD read and * EERW write to complete */ @@ -3145,11 +3143,7 @@ enum ixgbe_fdir_pballoc_type { /* Host Interface Command Structures */ -#ifdef C99 #pragma pack(push, 1) -#else -#pragma pack (1) -#endif /* C99 */ struct ixgbe_hic_hdr { u8 cmd; @@ -3262,11 +3256,7 @@ struct ixgbe_hic_phy_activity_resp { __be32 data[FW_PHY_ACT_DATA_COUNT]; }; -#ifdef C99 #pragma pack(pop) -#else -#pragma pack() -#endif /* C99 */ /* Transmit Descriptor - Legacy */ struct ixgbe_legacy_tx_desc { diff --git a/drivers/net/ixgbe/base/ixgbe_vf.c b/drivers/net/ixgbe/base/ixgbe_vf.c index 2a3e25834..91a5775eb 100644 --- a/drivers/net/ixgbe/base/ixgbe_vf.c +++ b/drivers/net/ixgbe/base/ixgbe_vf.c @@ -7,12 +7,8 @@ #include "ixgbe_type.h" #include "ixgbe_vf.h" -#ifndef IXGBE_VFWRITE_REG #define IXGBE_VFWRITE_REG IXGBE_WRITE_REG -#endif -#ifndef IXGBE_VFREAD_REG #define IXGBE_VFREAD_REG IXGBE_READ_REG -#endif /** * ixgbe_init_ops_vf - Initialize the pointers for vf diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c index 05199abb8..8810d1658 100644 --- a/drivers/net/ixgbe/base/ixgbe_x550.c +++ b/drivers/net/ixgbe/base/ixgbe_x550.c @@ -1642,7 +1642,6 @@ STATIC s32 ixgbe_restart_an_internal_phy_x550em(struct ixgbe_hw *hw) return status; } -#ifndef PREBOOT_SUPPORT /** * ixgbe_setup_sgmii - Set up link for sgmii * @hw: pointer to hardware structure @@ -1712,7 +1711,6 @@ STATIC s32 ixgbe_setup_sgmii(struct ixgbe_hw *hw, ixgbe_link_speed speed, return hw->phy.ops.setup_link_speed(hw, speed, autoneg_wait); } -#endif /* PREBOOT_SUPPORT */ /** * ixgbe_setup_sgmii_fw - Set up link for internal PHY SGMII auto-negotiation * @hw: pointer to hardware structure @@ -1837,11 +1835,7 @@ void ixgbe_init_mac_link_ops_X550em(struct ixgbe_hw *hw) case ixgbe_media_type_backplane: if (hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII || hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII_L) -#ifdef PREBOOT_SUPPORT - mac->ops.setup_link = ixgbe_setup_sgmii_fw; -#else mac->ops.setup_link = ixgbe_setup_sgmii; -#endif /* PREBOOT_SUPPORT */ break; default: break; @@ -1900,18 +1894,8 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw, *autoneg = false; break; case ixgbe_phy_ext_1g_t: -#ifdef PREBOOT_SUPPORT - *speed = IXGBE_LINK_SPEED_1GB_FULL; - break; -#endif /* PREBOOT_SUPPORT */ case ixgbe_phy_sgmii: -#ifdef PREBOOT_SUPPORT - *speed = IXGBE_LINK_SPEED_1GB_FULL | - IXGBE_LINK_SPEED_100_FULL | - IXGBE_LINK_SPEED_10_FULL; -#else *speed = IXGBE_LINK_SPEED_1GB_FULL; -#endif /* PREBOOT_SUPPORT */ break; case ixgbe_phy_x550em_kr: if (hw->mac.type == ixgbe_mac_X550EM_a) { @@ -3673,13 +3657,7 @@ u64 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw) physical_layer |= IXGBE_PHYSICAL_LAYER_10BASE_T; break; case ixgbe_phy_sgmii: -#ifdef PREBOOT_SUPPORT - physical_layer = IXGBE_PHYSICAL_LAYER_1000BASE_KX | - IXGBE_PHYSICAL_LAYER_100BASE_TX | - IXGBE_PHYSICAL_LAYER_10BASE_T; -#else physical_layer = IXGBE_PHYSICAL_LAYER_1000BASE_KX; -#endif /* PREBOOT_SUPPORT */ break; case ixgbe_phy_ext_1g_t: physical_layer |= IXGBE_PHYSICAL_LAYER_1000BASE_T;