From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 662EB9A9B for ; Thu, 12 Feb 2015 13:02:15 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 12 Feb 2015 03:54:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,565,1418112000"; d="scan'208";a="684723913" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 12 Feb 2015 04:01:54 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t1CC1pS5007829; Thu, 12 Feb 2015 20:01:51 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t1CC1l15030557; Thu, 12 Feb 2015 20:01:49 +0800 Received: (from couyang@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t1CC1lJA030553; Thu, 12 Feb 2015 20:01:47 +0800 From: Ouyang Changchun To: dev@dpdk.org Date: Thu, 12 Feb 2015 20:00:49 +0800 Message-Id: <1423742468-30404-18-git-send-email-changchun.ouyang@intel.com> X-Mailer: git-send-email 1.7.12.2 In-Reply-To: <1423742468-30404-1-git-send-email-changchun.ouyang@intel.com> References: <1423742468-30404-1-git-send-email-changchun.ouyang@intel.com> Subject: [dpdk-dev] [PATCH 17/36] ixgbe base codes: Get bus info X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 12:02:16 -0000 New function to get bus information for x550em; Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 1 + lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 23 +++++++++++++++++++++-- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.h | 1 + 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h index 459e0e3..6043eac 100644 --- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h +++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h @@ -3324,6 +3324,7 @@ enum ixgbe_bus_type { ixgbe_bus_type_pci, ixgbe_bus_type_pcix, ixgbe_bus_type_pci_express, + ixgbe_bus_type_internal, ixgbe_bus_type_reserved }; diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c index c07e4e9..e3d8fc1 100644 --- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c +++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c @@ -171,8 +171,9 @@ s32 ixgbe_init_ops_X550EM(struct ixgbe_hw *hw) mac->ops.disable_sec_rx_path = NULL; mac->ops.enable_sec_rx_path = NULL; - /* PCIe bus info not supported in X550EM */ - mac->ops.get_bus_info = NULL; + /* X550EM bus type is internal*/ + hw->bus.type = ixgbe_bus_type_internal; + mac->ops.get_bus_info = ixgbe_get_bus_info_X550em; mac->ops.read_iosf_sb_reg = ixgbe_read_iosf_sb_reg_x550; mac->ops.write_iosf_sb_reg = ixgbe_write_iosf_sb_reg_x550; @@ -1964,6 +1965,24 @@ u32 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw) } /** + * ixgbe_get_bus_info_x550em - Set PCI bus info + * @hw: pointer to hardware structure + * + * Sets bus link width and speed to unknown because X550em is + * not a PCI device. + **/ +s32 ixgbe_get_bus_info_X550em(struct ixgbe_hw *hw) +{ + + DEBUGFUNC("ixgbe_get_bus_info_x550em"); + + hw->bus.width = ixgbe_bus_width_unknown; + hw->bus.speed = ixgbe_bus_speed_unknown; + + return IXGBE_SUCCESS; +} + +/** * ixgbe_disable_rx_x550 - Disable RX unit * * Enables the Rx DMA unit for x550 diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.h b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.h index 8804777..8c78cb1 100644 --- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.h +++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.h @@ -40,6 +40,7 @@ s32 ixgbe_dmac_config_X550(struct ixgbe_hw *hw); s32 ixgbe_dmac_config_tcs_X550(struct ixgbe_hw *hw); s32 ixgbe_dmac_update_tcs_X550(struct ixgbe_hw *hw); +s32 ixgbe_get_bus_info_X550em(struct ixgbe_hw *hw); s32 ixgbe_init_eeprom_params_X550(struct ixgbe_hw *hw); s32 ixgbe_update_eeprom_checksum_X550(struct ixgbe_hw *hw); s32 ixgbe_calc_eeprom_checksum_X550(struct ixgbe_hw *hw); -- 1.8.4.2