ixgbe: Add 82598 support for BX mezzanine devices
Subsystems (2)
PATCH 1/3 ixgbe: Add 82598 support for BX mezzanine devices
From: Don Skidmore <[email protected]>
Add the device ID for BX devices using the 82598 MAC.
---
drivers/net/ixgbe/ixgbe_82598.c | 4 +++- drivers/net/ixgbe/ixgbe_ethtool.c | 8 ++++++++ drivers/net/ixgbe/ixgbe_main.c | 2 ++ drivers/net/ixgbe/ixgbe_type.h | 1 + 4 files changed, 14 insertions(+), 1 deletions(-)
drivers/net/ixgbe/ixgbe_82598.c +3 -1
@@ -214,7 +214,7 @@ static enum ixgbe_media_type ixgbe_get_media_type_82598(struct ixgbe_hw *hw)/* Media type for I82598 is based on device ID */ switch (hw->device_id) {case IXGBE_DEV_ID_82598 : -/* Default device ID is mezzanine card KX/KX4 */ +case IXGBE_DEV_ID_82598_BX : media_type = ixgbe_media_type_backplane;break ;case IXGBE_DEV_ID_82598AF_DUAL_PORT :
@@ -1011,6 +1011,8 @@ static s32 ixgbe_get_supported_physical_layer_82598(struct ixgbe_hw *hw) physical_layer = (IXGBE_PHYSICAL_LAYER_10GBASE_KX4 |IXGBE_PHYSICAL_LAYER_1000BASE_KX );break ; +case IXGBE_DEV_ID_82598_BX : + physical_layer =IXGBE_PHYSICAL_LAYER_1000BASE_BX ;case IXGBE_DEV_ID_82598EB_CX4 :case IXGBE_DEV_ID_82598_CX4_DUAL_PORT : physical_layer =IXGBE_PHYSICAL_LAYER_10GBASE_CX4 ;
drivers/net/ixgbe/ixgbe_ethtool.c +8 -0
@@ -141,6 +141,14 @@ static int ixgbe_get_settings(struct net_device *netdev, ADVERTISED_FIBRE); ecmd->port =PORT_FIBRE ;break ; +case IXGBE_DEV_ID_82598_BX : + ecmd->supported = (SUPPORTED_1000baseT_Full | +SUPPORTED_FIBRE ); + ecmd->advertising = (ADVERTISED_1000baseT_Full | +ADVERTISED_FIBRE ); + ecmd->port =PORT_FIBRE ; + ecmd->autoneg =AUTONEG_DISABLE ; +break ; } }else { ecmd->supported |=SUPPORTED_FIBRE ;
drivers/net/ixgbe/ixgbe_main.c +2 -0
@@ -84,6 +84,8 @@ static struct pci_device_id ixgbe_pci_tbl[] = { board_82598 }, {PCI_VDEVICE (INTEL ,IXGBE_DEV_ID_82598EB_SFP_LOM ), board_82598 }, + {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598_BX), + board_82598 },/* required last entry */ {0, }
drivers/net/ixgbe/ixgbe_type.h +1 -0
@@ -35,6 +35,7 @@/* Device IDs */ #define IXGBE_DEV_ID_82598 0x10B6 +#define IXGBE_DEV_ID_82598_BX 0x1508#define IXGBE_DEV_ID_82598AF_DUAL_PORT 0x10C6#define IXGBE_DEV_ID_82598AF_SINGLE_PORT 0x10C7#define IXGBE_DEV_ID_82598EB_SFP_LOM 0x10DB
PATCH 2/3 ixgbe: Refactor MSI-X allocation mechanism
From: PJ Waskiewicz <[email protected]>
Our current MSI-X allocation mechanism does not support new hardware at all. It also isn't getting the actual number of supported MSI-X vectors from the device.
This patch allows the number of MSI-X vectors to be specific to a device, plus it gets the number of MSI-X vectors available from PCIe configuration space.
---
drivers/net/ixgbe/ixgbe.h | 9 +++++++-- drivers/net/ixgbe/ixgbe_82598.c | 22 ++++++++++++++++++++++ drivers/net/ixgbe/ixgbe_main.c | 9 ++++++++- drivers/net/ixgbe/ixgbe_type.h | 5 +++++ 4 files changed, 42 insertions(+), 3 deletions(-)
drivers/net/ixgbe/ixgbe.h +7 -2
@@ -204,9 +204,13 @@ struct ixgbe_q_vector {#define OTHER_VECTOR 1#define NON_Q_VECTORS (OTHER_VECTOR) -#define MAX_MSIX_Q_VECTORS 16 +#define MAX_MSIX_VECTORS_82598 18 +#define MAX_MSIX_Q_VECTORS_82598 16 + +#define MAX_MSIX_Q_VECTORS MAX_MSIX_Q_VECTORS_82598 +#define MAX_MSIX_COUNT MAX_MSIX_VECTORS_82598 +#define MIN_MSIX_Q_VECTORS 2 -#define MAX_MSIX_COUNT (MAX_MSIX_Q_VECTORS + NON_Q_VECTORS)#define MIN_MSIX_COUNT (MIN_MSIX_Q_VECTORS + NON_Q_VECTORS)/* board specific private data structure */
@@ -244,6 +248,7 @@ struct ixgbe_adapter {u64 hw_csum_rx_good;u64 non_eop_descs;int num_msix_vectors; +int max_msix_q_vectors;/* true count of q_vectors for device */ struct ixgbe_ring_feature ring_feature[3 ];struct msix_entry *msix_entries;
drivers/net/ixgbe/ixgbe_82598.c +22 -0
@@ -50,6 +50,27 @@ static s32 ixgbe_read_i2c_eeprom_82598(struct ixgbe_hw *hw, u8 byte_offset, u8 *eeprom_data);/** +* ixgbe_get_pcie_msix_count_82598 - Gets MSI-X vector count +* @hw: pointer to hardware structure +* +* Read PCIe configuration space, and get the MSI-X vector count from +* the capabilities table. +**/ +u16 ixgbe_get_pcie_msix_count_82598 (struct ixgbe_hw *hw) +{ +struct ixgbe_adapter *adapter = hw->back; +u16 msix_count; +pci_read_config_word (adapter->pdev,IXGBE_PCIE_MSIX_82598_CAPS , + &msix_count); + msix_count &=IXGBE_PCIE_MSIX_TBL_SZ_MASK ; + +/* MSI-X count is zero-based in HW, so increment to give proper value */ + msix_count++; + +return msix_count; +} + +/** */ static s32 ixgbe_get_invariants_82598 (struct ixgbe_hw *hw) {
@@ -106,6 +127,7 @@ static s32 ixgbe_get_invariants_82598(struct ixgbe_hw *hw) mac->num_rar_entries =IXGBE_82598_RAR_ENTRIES ; mac->max_rx_queues =IXGBE_82598_MAX_RX_QUEUES ; mac->max_tx_queues =IXGBE_82598_MAX_TX_QUEUES ; + mac->max_msix_vectors =ixgbe_get_pcie_msix_count_82598 (hw); out:return ret_val;
drivers/net/ixgbe/ixgbe_main.c +8 -1
@@ -2421,7 +2421,13 @@ static void ixgbe_acquire_msix_vectors(struct ixgbe_adapter *adapter,ixgbe_set_num_queues (adapter); }else { adapter->flags |=IXGBE_FLAG_MSIX_ENABLED ;/* Woot! */ - adapter->num_msix_vectors = vectors; +/* +* Adjust for only the vectors we'll use, which is minimum +* of max_msix_q_vectors + NON_Q_VECTORS, or the number of +* vectors we were allocated. +*/ + adapter->num_msix_vectors =min (vectors, + adapter->max_msix_q_vectors +NON_Q_VECTORS ); } }
@@ -2746,6 +2752,7 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter) adapter->ring_feature[RING_F_RSS ].indices = rss; adapter->flags |=IXGBE_FLAG_RSS_ENABLED ; adapter->ring_feature[RING_F_DCB ].indices =IXGBE_MAX_DCB_INDICES ; + adapter->max_msix_q_vectors =MAX_MSIX_Q_VECTORS_82598 ;#ifdef CONFIG_IXGBE_DCB /* Configure DCB traffic classes */
drivers/net/ixgbe/ixgbe_type.h +5 -0
@@ -821,6 +821,10 @@#define IXGBE_FW_PTR 0x0F#define IXGBE_PBANUM0_PTR 0x15#define IXGBE_PBANUM1_PTR 0x16 +#define IXGBE_PCIE_MSIX_82598_CAPS 0x62 + +/* MSI-X capability fields masks */ +#define IXGBE_PCIE_MSIX_TBL_SZ_MASK 0x7FF/* Legacy EEPROM word offsets */ #define IXGBE_ISCSI_BOOT_CAPS 0x0033
@@ -1451,6 +1455,7 @@ struct ixgbe_mac_info {u32 num_rar_entries;u32 max_tx_queues;u32 max_rx_queues; +u32 max_msix_vectors;u32 link_attach_type;u32 link_mode_select;bool link_settings_loaded;
Re: [net-next PATCH 2/3] ixgbe: Refactor MSI-X allocation mechanism
From: Jeff Kirsher <[email protected]>
Date: Fri, 30 Jan 2009 17:05:56 -0800
Quoted 10 lines
Our current MSI-X allocation mechanism does not support new hardware at all. It also isn't getting the actual number of supported MSI-X vectors from the device.
This patch allows the number of MSI-X vectors to be specific to a device, plus it gets the number of MSI-X vectors available from PCIe configuration space.
Signed-off-by Peter P Waskiewicz Jr <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>
Applied.
PATCH 3/3 ixgbe: Update copyright dates, bump the driver version number
In reply to Jeff KirsherFrom: PJ Waskiewicz <[email protected]>
New year, new copyright date ranges. Also bump the driver version number to reflect many of the recent changes.
---
drivers/net/ixgbe/Makefile | 2 +- drivers/net/ixgbe/ixgbe.h | 2 +- drivers/net/ixgbe/ixgbe_82598.c | 2 +- drivers/net/ixgbe/ixgbe_common.c | 2 +- drivers/net/ixgbe/ixgbe_common.h | 2 +- drivers/net/ixgbe/ixgbe_dcb.c | 2 +- drivers/net/ixgbe/ixgbe_dcb.h | 2 +- drivers/net/ixgbe/ixgbe_dcb_82598.c | 2 +- drivers/net/ixgbe/ixgbe_dcb_82598.h | 2 +- drivers/net/ixgbe/ixgbe_dcb_nl.c | 2 +- drivers/net/ixgbe/ixgbe_ethtool.c | 2 +- drivers/net/ixgbe/ixgbe_main.c | 6 +++--- drivers/net/ixgbe/ixgbe_phy.c | 2 +- drivers/net/ixgbe/ixgbe_phy.h | 2 +- drivers/net/ixgbe/ixgbe_type.h | 2 +- 15 files changed, 17 insertions(+), 17 deletions(-)
drivers/net/ixgbe/Makefile +1 -1
@@ -1,7 +1,7 @@ ################################################################################ # # Intel 10 Gigabit PCI Express Linux driver -# Copyright(c) 1999 - 2007 Intel Corporation. +# Copyright(c) 1999 - 2009 Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License,
drivers/net/ixgbe/ixgbe.h +1 -1
@@ -1,7 +1,7 @@/******************************************************************************* Intel 10 Gigabit PCI Express Linux driver -Copyright(c) 1999 - 2008 Intel Corporation. +Copyright(c) 1999 - 2009 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
drivers/net/ixgbe/ixgbe_82598.c +1 -1
@@ -1,7 +1,7 @@/******************************************************************************* Intel 10 Gigabit PCI Express Linux driver -Copyright(c) 1999 - 2008 Intel Corporation. +Copyright(c) 1999 - 2009 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
drivers/net/ixgbe/ixgbe_common.c +1 -1
@@ -1,7 +1,7 @@/******************************************************************************* Intel 10 Gigabit PCI Express Linux driver -Copyright(c) 1999 - 2008 Intel Corporation. +Copyright(c) 1999 - 2009 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
drivers/net/ixgbe/ixgbe_common.h +1 -1
@@ -1,7 +1,7 @@/******************************************************************************* Intel 10 Gigabit PCI Express Linux driver -Copyright(c) 1999 - 2008 Intel Corporation. +Copyright(c) 1999 - 2009 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
drivers/net/ixgbe/ixgbe_dcb.c +1 -1
@@ -1,7 +1,7 @@/******************************************************************************* Intel 10 Gigabit PCI Express Linux driver -Copyright(c) 1999 - 2007 Intel Corporation. +Copyright(c) 1999 - 2009 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
drivers/net/ixgbe/ixgbe_dcb.h +1 -1
@@ -1,7 +1,7 @@/******************************************************************************* Intel 10 Gigabit PCI Express Linux driver -Copyright(c) 1999 - 2007 Intel Corporation. +Copyright(c) 1999 - 2009 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
drivers/net/ixgbe/ixgbe_dcb_82598.c +1 -1
@@ -1,7 +1,7 @@/******************************************************************************* Intel 10 Gigabit PCI Express Linux driver -Copyright(c) 1999 - 2007 Intel Corporation. +Copyright(c) 1999 - 2009 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
drivers/net/ixgbe/ixgbe_dcb_82598.h +1 -1
@@ -1,7 +1,7 @@/******************************************************************************* Intel 10 Gigabit PCI Express Linux driver -Copyright(c) 1999 - 2007 Intel Corporation. +Copyright(c) 1999 - 2009 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
drivers/net/ixgbe/ixgbe_dcb_nl.c +1 -1
@@ -1,7 +1,7 @@/******************************************************************************* Intel 10 Gigabit PCI Express Linux driver -Copyright(c) 1999 - 2008 Intel Corporation. +Copyright(c) 1999 - 2009 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
drivers/net/ixgbe/ixgbe_ethtool.c +1 -1
@@ -1,7 +1,7 @@/******************************************************************************* Intel 10 Gigabit PCI Express Linux driver -Copyright(c) 1999 - 2008 Intel Corporation. +Copyright(c) 1999 - 2009 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
drivers/net/ixgbe/ixgbe_main.c +3 -3
@@ -1,7 +1,7 @@/******************************************************************************* Intel 10 Gigabit PCI Express Linux driver -Copyright(c) 1999 - 2008 Intel Corporation. +Copyright(c) 1999 - 2009 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
@@ -47,9 +47,9 @@ char ixgbe_driver_name[] = "ixgbe";static const char ixgbe_driver_string[] ="Intel(R) 10 Gigabit PCI Express Network Driver" ; -#define DRV_VERSION "1.3.30-k2" +#define DRV_VERSION "1.3.56-k2"const char ixgbe_driver_version[] =DRV_VERSION ; -static char ixgbe_copyright[] ="Copyright (c) 1999-2007 Intel Corporation." ; +static char ixgbe_copyright[] ="Copyright (c) 1999-2009 Intel Corporation." ;static const struct ixgbe_info *ixgbe_info_tbl[] = { [board_82598] = &ixgbe_82598_info,
drivers/net/ixgbe/ixgbe_phy.c +1 -1
@@ -1,7 +1,7 @@/******************************************************************************* Intel 10 Gigabit PCI Express Linux driver -Copyright(c) 1999 - 2008 Intel Corporation. +Copyright(c) 1999 - 2009 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
drivers/net/ixgbe/ixgbe_phy.h +1 -1
@@ -1,7 +1,7 @@/******************************************************************************* Intel 10 Gigabit PCI Express Linux driver -Copyright(c) 1999 - 2008 Intel Corporation. +Copyright(c) 1999 - 2009 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
drivers/net/ixgbe/ixgbe_type.h +1 -1
@@ -1,7 +1,7 @@/******************************************************************************* Intel 10 Gigabit PCI Express Linux driver -Copyright(c) 1999 - 2008 Intel Corporation. +Copyright(c) 1999 - 2009 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
Re: [net-next PATCH 3/3] ixgbe: Update copyright dates, bump the driver version number
From: Jeff Kirsher <[email protected]>
Date: Fri, 30 Jan 2009 17:06:17 -0800
Quoted 5 lines
New year, new copyright date ranges. Also bump the driver version number to reflect many of the recent changes.
Signed-off-by Peter P Waskiewicz Jr <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>
Applied.
From: Jeff Kirsher <[email protected]>
Date: Fri, 30 Jan 2009 17:05:33 -0800
Quoted 5 lines
Add the device ID for BX devices using the 82598 MAC.
Signed-off-by Don Skidmore <[email protected]>Signed-off-by Peter P Waskiewicz Jr <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>
Applied.