Skip to contentSkip to conversation

Introduce the Intel 82599 10 Gigabit Network Adapter family

PATCH In review Jeff Kirsher 4 participants 9 messages Feb 28, 2009 – Mar 1, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Introduce the Intel 82599 10 Gigabit Network Adapter family

The following series implements basic support for the new Intel 82599 10 Gigabit Network adapter. Contained in this patchset is:

1) Hardware specific code to initialize the 82599 device
2) Include Data Center Bridging support for 82599
3) Add the current device ID's for 82599, including a fully pluggable 1G/10G SFP+ NIC, and a KX/KX4 mezzanine card

---

PJ Waskiewicz (3):
ixgbe: Add 82599 device id's, hook it up into the main driver.
ixgbe: Add DCB for 82599, remove BCN support
ixgbe: Add hardware specific initialization code for 82599 devices

 drivers/net/ixgbe/Makefile          |    5 
 drivers/net/ixgbe/ixgbe.h           |   29 +
 drivers/net/ixgbe/ixgbe_82598.c     |    7 
 drivers/net/ixgbe/ixgbe_82599.c     | 1277 +++++++++++++++++++++++++++++++++++
 drivers/net/ixgbe/ixgbe_common.c    |  319 +++++++++
 drivers/net/ixgbe/ixgbe_common.h    |   10 
 drivers/net/ixgbe/ixgbe_dcb.c       |   17 
 drivers/net/ixgbe/ixgbe_dcb.h       |   54 +
 drivers/net/ixgbe/ixgbe_dcb_82599.c |  472 +++++++++++++
 drivers/net/ixgbe/ixgbe_dcb_82599.h |  127 +++
 drivers/net/ixgbe/ixgbe_dcb_nl.c    |  193 -----
 drivers/net/ixgbe/ixgbe_ethtool.c   |    3 
 drivers/net/ixgbe/ixgbe_main.c      |  659 +++++++++++++++---
 drivers/net/ixgbe/ixgbe_phy.c       |  590 ++++++++++++++++
 drivers/net/ixgbe/ixgbe_phy.h       |   16 
 drivers/net/ixgbe/ixgbe_type.h      |  766 ++++++++++++++++++++-
 16 files changed, 4131 insertions(+), 413 deletions(-)
 create mode 100644 drivers/net/ixgbe/ixgbe_82599.c
 create mode 100644 drivers/net/ixgbe/ixgbe_dcb_82599.c
 create mode 100644 drivers/net/ixgbe/ixgbe_dcb_82599.h
Signature · 2 lines
Cheers,
Jeff
#1 lore raw

PATCH 1/3 ixgbe: Add hardware specific initialization code for 82599 devices

From: PJ Waskiewicz <[email protected]>

This patch adds the hardware initialization code specific to 82599. This is similar to the 82598 hardware initialization code. It also includes all changes to the existing hardware init code to support 82599.

---

 drivers/net/ixgbe/ixgbe_82598.c   |    7 
 drivers/net/ixgbe/ixgbe_82599.c   | 1277 +++++++++++++++++++++++++++++++++++++
 drivers/net/ixgbe/ixgbe_common.c  |  319 +++++++++
 drivers/net/ixgbe/ixgbe_common.h  |   10 
 drivers/net/ixgbe/ixgbe_ethtool.c |    2 
 drivers/net/ixgbe/ixgbe_phy.c     |  590 +++++++++++++++++
 drivers/net/ixgbe/ixgbe_phy.h     |   16 
 drivers/net/ixgbe/ixgbe_type.h    |  766 +++++++++++++++++++++-
 8 files changed, 2928 insertions(+), 59 deletions(-)
 create mode 100644 drivers/net/ixgbe/ixgbe_82599.c
drivers/net/ixgbe/ixgbe_82598.c +5 -2
index 51dba1c..623737f 100644
@@ -1046,9 +1046,9 @@ out:
  *
  *  Determines physical layer capabilities of the current configuration.
  **/
-static s32 ixgbe_get_supported_physical_layer_82598(struct ixgbe_hw *hw)
+static u32 ixgbe_get_supported_physical_layer_82598(struct ixgbe_hw *hw)
 {
-	s32 physical_layer = IXGBE_PHYSICAL_LAYER_UNKNOWN;
+	u32 physical_layer = IXGBE_PHYSICAL_LAYER_UNKNOWN;
 
 	switch (hw->device_id) {
 	case IXGBE_DEV_ID_82598:
@@ -1111,8 +1111,11 @@ static struct ixgbe_mac_operations mac_ops_82598 = {
 	.clear_hw_cntrs		= &ixgbe_clear_hw_cntrs_generic,
 	.get_media_type		= &ixgbe_get_media_type_82598,
 	.get_supported_physical_layer = &ixgbe_get_supported_physical_layer_82598,
+	.enable_rx_dma          = &ixgbe_enable_rx_dma_generic,
 	.get_mac_addr		= &ixgbe_get_mac_addr_generic,
 	.stop_adapter		= &ixgbe_stop_adapter_generic,
+	.get_bus_info           = &ixgbe_get_bus_info_generic,
+	.set_lan_id             = &ixgbe_set_lan_id_multi_port_pcie,
 	.read_analog_reg8	= &ixgbe_read_analog_reg8_82598,
 	.write_analog_reg8	= &ixgbe_write_analog_reg8_82598,
 	.setup_link		= &ixgbe_setup_mac_link_82598,
drivers/net/ixgbe/ixgbe_82599.c new file +1277 -0

1,277 lines not on this page · raw message

drivers/net/ixgbe/ixgbe_common.c +319 -0

352 lines not on this page · raw message

drivers/net/ixgbe/ixgbe_common.h +10 -0
index c630212..7e94d6d 100644
@@ -37,12 +37,14 @@ s32 ixgbe_clear_hw_cntrs_generic(struct ixgbe_hw *hw);
 s32 ixgbe_read_pba_num_generic(struct ixgbe_hw *hw, u32 *pba_num);
 s32 ixgbe_get_mac_addr_generic(struct ixgbe_hw *hw, u8 *mac_addr);
 s32 ixgbe_get_bus_info_generic(struct ixgbe_hw *hw);
+void ixgbe_set_lan_id_multi_port_pcie(struct ixgbe_hw *hw);
 s32 ixgbe_stop_adapter_generic(struct ixgbe_hw *hw);
 
 s32 ixgbe_led_on_generic(struct ixgbe_hw *hw, u32 index);
 s32 ixgbe_led_off_generic(struct ixgbe_hw *hw, u32 index);
 
 s32 ixgbe_init_eeprom_params_generic(struct ixgbe_hw *hw);
+s32 ixgbe_write_eeprom_generic(struct ixgbe_hw *hw, u16 offset, u16 data);
 s32 ixgbe_read_eeprom_generic(struct ixgbe_hw *hw, u16 offset, u16 *data);
 s32 ixgbe_read_eeprom_bit_bang_generic(struct ixgbe_hw *hw, u16 offset,
                                        u16 *data);
@@ -61,6 +63,7 @@ s32 ixgbe_update_uc_addr_list_generic(struct ixgbe_hw *hw, u8 *addr_list,
                                       u32 addr_count, ixgbe_mc_addr_itr func);
 s32 ixgbe_enable_mc_generic(struct ixgbe_hw *hw);
 s32 ixgbe_disable_mc_generic(struct ixgbe_hw *hw);
+s32 ixgbe_enable_rx_dma_generic(struct ixgbe_hw *hw, u32 regval);
 s32 ixgbe_setup_fc_generic(struct ixgbe_hw *hw, s32 packetbuf_num);
 s32 ixgbe_fc_enable(struct ixgbe_hw *hw, s32 packtetbuf_num);
 s32 ixgbe_fc_autoneg(struct ixgbe_hw *hw);
@@ -75,6 +78,13 @@ s32 ixgbe_write_analog_reg8_generic(struct ixgbe_hw *hw, u32 reg, u8 val);
 
 #define IXGBE_WRITE_REG(a, reg, value) writel((value), ((a)->hw_addr + (reg)))
 
+#ifndef writeq
+#define writeq(val, addr) writel((u32) (val), addr); \
+    writel((u32) (val >> 32), (addr + 4));
+#endif
+
+#define IXGBE_WRITE_REG64(a, reg, value) writeq((value), ((a)->hw_addr + (reg)))
+
 #define IXGBE_READ_REG(a, reg) readl((a)->hw_addr + (reg))
 
 #define IXGBE_WRITE_REG_ARRAY(a, reg, offset, value) (\
drivers/net/ixgbe/ixgbe_ethtool.c +1 -1
index cec2f4e..35d820e 100644
@@ -469,7 +469,7 @@ static void ixgbe_get_regs(struct net_device *netdev,
 	regs_buff[825] = IXGBE_READ_REG(hw, IXGBE_IP6AT);
 	regs_buff[826] = IXGBE_READ_REG(hw, IXGBE_WUPL);
 	regs_buff[827] = IXGBE_READ_REG(hw, IXGBE_WUPM);
-	regs_buff[828] = IXGBE_READ_REG(hw, IXGBE_FHFT);
+	regs_buff[828] = IXGBE_READ_REG(hw, IXGBE_FHFT(0));
 
 	regs_buff[829] = IXGBE_READ_REG(hw, IXGBE_RMCS);
 	regs_buff[830] = IXGBE_READ_REG(hw, IXGBE_DPMCS);
drivers/net/ixgbe/ixgbe_phy.c +576 -14

634 lines not on this page · raw message

drivers/net/ixgbe/ixgbe_phy.h +12 -4
index 539a306..cc5f1b3 100644
@@ -54,14 +54,15 @@
 #define IXGBE_I2C_EEPROM_STATUS_IN_PROGRESS  0x3
 
 /* Bit-shift macros */
-#define IXGBE_SFF_VENDOR_OUI_BYTE0_SHIFT    12
-#define IXGBE_SFF_VENDOR_OUI_BYTE1_SHIFT    8
-#define IXGBE_SFF_VENDOR_OUI_BYTE2_SHIFT    4
+#define IXGBE_SFF_VENDOR_OUI_BYTE0_SHIFT    24
+#define IXGBE_SFF_VENDOR_OUI_BYTE1_SHIFT    16
+#define IXGBE_SFF_VENDOR_OUI_BYTE2_SHIFT    8
 
 /* Vendor OUIs: format of OUI is 0x[byte0][byte1][byte2][00] */
 #define IXGBE_SFF_VENDOR_OUI_TYCO     0x00407600
 #define IXGBE_SFF_VENDOR_OUI_FTL      0x00906500
 #define IXGBE_SFF_VENDOR_OUI_AVAGO    0x00176A00
+#define IXGBE_SFF_VENDOR_OUI_INTEL    0x001B2100
 
 /* I2C SDA and SCL timing parameters for standard mode */
 #define IXGBE_I2C_T_HD_STA  4
@@ -101,5 +102,12 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw);
 s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw,
                                         u16 *list_offset,
                                         u16 *data_offset);
-
+s32 ixgbe_read_i2c_byte_generic(struct ixgbe_hw *hw, u8 byte_offset,
+                                u8 dev_addr, u8 *data);
+s32 ixgbe_write_i2c_byte_generic(struct ixgbe_hw *hw, u8 byte_offset,
+                                 u8 dev_addr, u8 data);
+s32 ixgbe_read_i2c_eeprom_generic(struct ixgbe_hw *hw, u8 byte_offset,
+                                  u8 *eeprom_data);
+s32 ixgbe_write_i2c_eeprom_generic(struct ixgbe_hw *hw, u8 byte_offset,
+                                   u8 eeprom_data);
 #endif /* _IXGBE_PHY_H_ */
drivers/net/ixgbe/ixgbe_type.h +728 -38

642 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

#2 lore raw

Re: [net-next PATCH 1/3] ixgbe: Add hardware specific initialization code for 82599 devices

On Fri, 2009-02-27 at 17:44 -0800, Jeff Kirsher wrote:
[...]

Quoted 4 lines
drivers/net/ixgbe/ixgbe_phy.c +0 -0
index 77ec26f..14e9606 100644

[...]

Quoted 34 lines
drivers/net/ixgbe/ixgbe_phy.c +30 -0
@@ -688,6 +755,501 @@ s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw,
 }
 
 /**
+ *  ixgbe_read_i2c_eeprom_generic - Reads 8 bit EEPROM word over I2C interface
+ *  @hw: pointer to hardware structure
+ *  @byte_offset: EEPROM byte offset to read
+ *  @eeprom_data: value read
+ *
+ *  Performs byte read operation to SFP module's EEPROM over I2C interface.
+ **/
+s32 ixgbe_read_i2c_eeprom_generic(struct ixgbe_hw *hw, u8 byte_offset,
+                                  u8 *eeprom_data)
+{
+	return hw->phy.ops.read_i2c_byte(hw, byte_offset,
+	                                 IXGBE_I2C_EEPROM_DEV_ADDR,
+	                                 eeprom_data);
+}
+
+/**
+ *  ixgbe_write_i2c_eeprom_generic - Writes 8 bit EEPROM word over I2C interface
+ *  @hw: pointer to hardware structure
+ *  @byte_offset: EEPROM byte offset to write
+ *  @eeprom_data: value to write
+ *
+ *  Performs byte write operation to SFP module's EEPROM over I2C interface.
+ **/
+s32 ixgbe_write_i2c_eeprom_generic(struct ixgbe_hw *hw, u8 byte_offset,
+                                   u8 eeprom_data)
+{
+	return hw->phy.ops.write_i2c_byte(hw, byte_offset,
+	                                  IXGBE_I2C_EEPROM_DEV_ADDR,
+	                                  eeprom_data);
+}

drivers/net/ixgbe/ixgbe_phy.c s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw, · line 797

Quoted 10 lines
drivers/net/ixgbe/ixgbe_phy.c +10 -0
+
+/**
+ *  ixgbe_read_i2c_byte_generic - Reads 8 bit word over I2C
+ *  @hw: pointer to hardware structure
+ *  @byte_offset: byte offset to read
+ *  @data: value read
+ *
+ *  Performs byte read operation to SFP module's EEPROM over I2C interface at
+ *  a specified deivce address.
+ **/

[...]

You should be registering an I2C adapter and using the I2C bit-bang algorithm for this.

Ben.

Signature · 3 lines
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
#3 lore raw

Re: [net-next PATCH 1/3] ixgbe: Add hardware specific initialization code for 82599 devices

Quoted 53 lines · Ben Hutchings

On Fri, 2009-02-27 at 17:44 -0800, Jeff Kirsher wrote:
[...]

Quoted 4 lines
drivers/net/ixgbe/ixgbe_phy.c +0 -0
index 77ec26f..14e9606 100644

[...]

Quoted 44 lines
drivers/net/ixgbe/ixgbe_phy.c +40 -0
@@ -688,6 +755,501 @@ s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw,
 }
 
 /**
+ *  ixgbe_read_i2c_eeprom_generic - Reads 8 bit EEPROM word over I2C interface
+ *  @hw: pointer to hardware structure
+ *  @byte_offset: EEPROM byte offset to read
+ *  @eeprom_data: value read
+ *
+ *  Performs byte read operation to SFP module's EEPROM over I2C interface.
+ **/
+s32 ixgbe_read_i2c_eeprom_generic(struct ixgbe_hw *hw, u8 byte_offset,
+                                  u8 *eeprom_data)
+{
+	return hw->phy.ops.read_i2c_byte(hw, byte_offset,
+	                                 IXGBE_I2C_EEPROM_DEV_ADDR,
+	                                 eeprom_data);
+}
+
+/**
+ *  ixgbe_write_i2c_eeprom_generic - Writes 8 bit EEPROM word over I2C interface
+ *  @hw: pointer to hardware structure
+ *  @byte_offset: EEPROM byte offset to write
+ *  @eeprom_data: value to write
+ *
+ *  Performs byte write operation to SFP module's EEPROM over I2C interface.
+ **/
+s32 ixgbe_write_i2c_eeprom_generic(struct ixgbe_hw *hw, u8 byte_offset,
+                                   u8 eeprom_data)
+{
+	return hw->phy.ops.write_i2c_byte(hw, byte_offset,
+	                                  IXGBE_I2C_EEPROM_DEV_ADDR,
+	                                  eeprom_data);
+}
+
+/**
+ *  ixgbe_read_i2c_byte_generic - Reads 8 bit word over I2C
+ *  @hw: pointer to hardware structure
+ *  @byte_offset: byte offset to read
+ *  @data: value read
+ *
+ *  Performs byte read operation to SFP module's EEPROM over I2C interface at
+ *  a specified deivce address.
+ **/

[...]

Quoted 2 lines

You should be registering an I2C adapter and using the I2C bit-bang algorithm for this.

Thanks for the comments Ben. Early on, we looked at doing this. The reality though for us is this code (the PHY code, among others) is shared between our drivers across different platforms. So the reason we didn't use the in-kernel I2C library is nobody else would have been able to use the code. But that doesn't really apply to this driver; just wanted to give background why this is the way it is in the post.

That being said, I will look at the I2C kernel interfaces this weekend and see how I can fit it in here.

Cheers,
-PJ Waskiewicz

#4 lore raw

PATCH 2/3 ixgbe: Add DCB for 82599, remove BCN support

In reply to Jeff Kirsher

From: PJ Waskiewicz <[email protected]>

This patch adds the DCB (Data Center Bridging) support for 82599 hardware. This is similar to how the 82598 DCB code works.

This patch also removes the BCN (Backwards Congestion Notification) netlink configuration code from the driver. BCN was a pre-standard congestion notification framework, and was not what the IEEE body decided upon for standard congestion management. QCN (802.1Qau), Quantized Congestion Notification is the accepted standard, which is not supported by 82599, hence we remove the support altogether.

---

 drivers/net/ixgbe/ixgbe_dcb.c       |   17 +
 drivers/net/ixgbe/ixgbe_dcb.h       |   54 ++--
 drivers/net/ixgbe/ixgbe_dcb_82599.c |  472 +++++++++++++++++++++++++++++++++++
 drivers/net/ixgbe/ixgbe_dcb_82599.h |  127 +++++++++
 drivers/net/ixgbe/ixgbe_dcb_nl.c    |  193 --------------
 5 files changed, 644 insertions(+), 219 deletions(-)
 create mode 100644 drivers/net/ixgbe/ixgbe_dcb_82599.c
 create mode 100644 drivers/net/ixgbe/ixgbe_dcb_82599.h
drivers/net/ixgbe/ixgbe_dcb.c +17 -0
index 2a60c89..a156228 100644
@@ -31,6 +31,7 @@
 #include "ixgbe_type.h"
 #include "ixgbe_dcb.h"
 #include "ixgbe_dcb_82598.h"
+#include "ixgbe_dcb_82599.h"
 
 /**
  * ixgbe_dcb_config - Struct containing DCB settings.
@@ -215,6 +216,8 @@ s32 ixgbe_dcb_get_tc_stats(struct ixgbe_hw *hw, struct ixgbe_hw_stats *stats,
 	s32 ret = 0;
 	if (hw->mac.type == ixgbe_mac_82598EB)
 		ret = ixgbe_dcb_get_tc_stats_82598(hw, stats, tc_count);
+	else if (hw->mac.type == ixgbe_mac_82599EB)
+		ret = ixgbe_dcb_get_tc_stats_82599(hw, stats, tc_count);
 	return ret;
 }
 
@@ -232,6 +235,8 @@ s32 ixgbe_dcb_get_pfc_stats(struct ixgbe_hw *hw, struct ixgbe_hw_stats *stats,
 	s32 ret = 0;
 	if (hw->mac.type == ixgbe_mac_82598EB)
 		ret = ixgbe_dcb_get_pfc_stats_82598(hw, stats, tc_count);
+	else if (hw->mac.type == ixgbe_mac_82599EB)
+		ret = ixgbe_dcb_get_pfc_stats_82599(hw, stats, tc_count);
 	return ret;
 }
 
@@ -248,6 +253,8 @@ s32 ixgbe_dcb_config_rx_arbiter(struct ixgbe_hw *hw,
 	s32 ret = 0;
 	if (hw->mac.type == ixgbe_mac_82598EB)
 		ret = ixgbe_dcb_config_rx_arbiter_82598(hw, dcb_config);
+	else if (hw->mac.type == ixgbe_mac_82599EB)
+		ret = ixgbe_dcb_config_rx_arbiter_82599(hw, dcb_config);
 	return ret;
 }
 
@@ -264,6 +271,8 @@ s32 ixgbe_dcb_config_tx_desc_arbiter(struct ixgbe_hw *hw,
 	s32 ret = 0;
 	if (hw->mac.type == ixgbe_mac_82598EB)
 		ret = ixgbe_dcb_config_tx_desc_arbiter_82598(hw, dcb_config);
+	else if (hw->mac.type == ixgbe_mac_82599EB)
+		ret = ixgbe_dcb_config_tx_desc_arbiter_82599(hw, dcb_config);
 	return ret;
 }
 
@@ -280,6 +289,8 @@ s32 ixgbe_dcb_config_tx_data_arbiter(struct ixgbe_hw *hw,
 	s32 ret = 0;
 	if (hw->mac.type == ixgbe_mac_82598EB)
 		ret = ixgbe_dcb_config_tx_data_arbiter_82598(hw, dcb_config);
+	else if (hw->mac.type == ixgbe_mac_82599EB)
+		ret = ixgbe_dcb_config_tx_data_arbiter_82599(hw, dcb_config);
 	return ret;
 }
 
@@ -296,6 +307,8 @@ s32 ixgbe_dcb_config_pfc(struct ixgbe_hw *hw,
 	s32 ret = 0;
 	if (hw->mac.type == ixgbe_mac_82598EB)
 		ret = ixgbe_dcb_config_pfc_82598(hw, dcb_config);
+	else if (hw->mac.type == ixgbe_mac_82599EB)
+		ret = ixgbe_dcb_config_pfc_82599(hw, dcb_config);
 	return ret;
 }
 
@@ -311,6 +324,8 @@ s32 ixgbe_dcb_config_tc_stats(struct ixgbe_hw *hw)
 	s32 ret = 0;
 	if (hw->mac.type == ixgbe_mac_82598EB)
 		ret = ixgbe_dcb_config_tc_stats_82598(hw);
+	else if (hw->mac.type == ixgbe_mac_82599EB)
+		ret = ixgbe_dcb_config_tc_stats_82599(hw);
 	return ret;
 }
 
@@ -327,6 +342,8 @@ s32 ixgbe_dcb_hw_config(struct ixgbe_hw *hw,
 	s32 ret = 0;
 	if (hw->mac.type == ixgbe_mac_82598EB)
 		ret = ixgbe_dcb_hw_config_82598(hw, dcb_config);
+	else if (hw->mac.type == ixgbe_mac_82599EB)
+		ret = ixgbe_dcb_hw_config_82599(hw, dcb_config);
 	return ret;
 }
 
drivers/net/ixgbe/ixgbe_dcb.h +27 -27

71 lines not on this page · raw message

drivers/net/ixgbe/ixgbe_dcb_82599.c new file +472 -0

472 lines not on this page · raw message

drivers/net/ixgbe/ixgbe_dcb_82599.h new file +127 -0

127 lines not on this page · raw message

drivers/net/ixgbe/ixgbe_dcb_nl.c +1 -192

216 lines not on this page · raw message

#5 lore raw

PATCH 3/3 ixgbe: Add 82599 device id's, hook it up into the main driver.

In reply to Jeff Kirsher

From: PJ Waskiewicz <[email protected]>

With the hardware-specific code in place, add all supported device id's, along with base driver changes to enable 82599 devices. The devices being enabled are:

8086:10f7: 82599EB 10 Gigabit KX4 Network Connection 8086:10fb: 82599EB 10 Gigabit Network Connection

The device 8086:10fb is a fully-pluggable SFP+ NIC.

---

 drivers/net/ixgbe/Makefile        |    5 
 drivers/net/ixgbe/ixgbe.h         |   29 +-
 drivers/net/ixgbe/ixgbe_ethtool.c |    1 
 drivers/net/ixgbe/ixgbe_main.c    |  659 ++++++++++++++++++++++++++++++-------
 4 files changed, 559 insertions(+), 135 deletions(-)
drivers/net/ixgbe/Makefile +3 -2
index f606195..b3f8208 100644
@@ -33,6 +33,7 @@
 obj-$(CONFIG_IXGBE) += ixgbe.o
 
 ixgbe-objs := ixgbe_main.o ixgbe_common.o ixgbe_ethtool.o \
-              ixgbe_82598.o ixgbe_phy.o
+              ixgbe_82599.o ixgbe_82598.o ixgbe_phy.o
 
-ixgbe-$(CONFIG_IXGBE_DCB) +=  ixgbe_dcb.o ixgbe_dcb_82598.o ixgbe_dcb_nl.o
+ixgbe-$(CONFIG_IXGBE_DCB) +=  ixgbe_dcb.o ixgbe_dcb_82598.o \
+                              ixgbe_dcb_82599.o ixgbe_dcb_nl.o
drivers/net/ixgbe/ixgbe.h +19 -10
index 2d877da..0b54717 100644
@@ -140,9 +140,9 @@ struct ixgbe_ring {
 	int cpu;
 #endif
 	struct ixgbe_queue_stats stats;
-	u16 v_idx; /* maps directly to the index for this ring in the hardware
-	           * vector array, can also be used for finding the bit in EICR
-	           * and friends that represents the vector for this ring */
+	u64 v_idx; /* maps directly to the index for this ring in the hardware
+	            * vector array, can also be used for finding the bit in EICR
+	            * and friends that represents the vector for this ring */
 
 
 	u16 work_limit;                /* max work per interrupt */
@@ -166,8 +166,8 @@ struct ixgbe_ring_feature {
 	int mask;
 };
 
-#define MAX_RX_QUEUES 64
-#define MAX_TX_QUEUES 32
+#define MAX_RX_QUEUES 128
+#define MAX_TX_QUEUES 128
 
 #define MAX_RX_PACKET_BUFFERS ((adapter->flags & IXGBE_FLAG_DCB_ENABLED) \
                               ? 8 : 1)
@@ -211,11 +211,13 @@ struct ixgbe_q_vector {
 #define OTHER_VECTOR 1
 #define NON_Q_VECTORS (OTHER_VECTOR)
 
+#define MAX_MSIX_VECTORS_82599 64
+#define MAX_MSIX_Q_VECTORS_82599 64
 #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 MAX_MSIX_Q_VECTORS MAX_MSIX_Q_VECTORS_82599
+#define MAX_MSIX_COUNT MAX_MSIX_VECTORS_82599
 
 #define MIN_MSIX_Q_VECTORS 2
 #define MIN_MSIX_COUNT (MIN_MSIX_Q_VECTORS + NON_Q_VECTORS)
@@ -227,7 +229,7 @@ struct ixgbe_adapter {
 	u16 bd_number;
 	struct work_struct reset_task;
 	struct ixgbe_q_vector q_vector[MAX_MSIX_Q_VECTORS];
-	char name[MAX_MSIX_COUNT][IFNAMSIZ + 5];
+	char name[MAX_MSIX_COUNT][IFNAMSIZ + 9];
 	struct ixgbe_dcb_config dcb_cfg;
 	struct ixgbe_dcb_config temp_dcb_cfg;
 	u8 dcb_set_bitmap;
@@ -252,6 +254,7 @@ struct ixgbe_adapter {
 	struct ixgbe_ring *rx_ring;	/* One per active queue */
 	int num_rx_queues;
 	u64 hw_csum_rx_error;
+	u64 hw_rx_no_dma_resources;
 	u64 hw_csum_rx_good;
 	u64 non_eop_descs;
 	int num_msix_vectors;
@@ -280,6 +283,7 @@ struct ixgbe_adapter {
 #define IXGBE_FLAG_DCA_CAPABLE                  (u32)(1 << 11)
 #define IXGBE_FLAG_IMIR_ENABLED                 (u32)(1 << 12)
 #define IXGBE_FLAG_MQ_CAPABLE                   (u32)(1 << 13)
+#define IXGBE_FLAG_DCB_ENABLED                  (u32)(1 << 14)
 #define IXGBE_FLAG_RSS_ENABLED                  (u32)(1 << 16)
 #define IXGBE_FLAG_RSS_CAPABLE                  (u32)(1 << 17)
 #define IXGBE_FLAG_VMDQ_CAPABLE                 (u32)(1 << 18)
@@ -287,7 +291,8 @@ struct ixgbe_adapter {
 #define IXGBE_FLAG_FAN_FAIL_CAPABLE             (u32)(1 << 20)
 #define IXGBE_FLAG_NEED_LINK_UPDATE             (u32)(1 << 22)
 #define IXGBE_FLAG_IN_WATCHDOG_TASK             (u32)(1 << 23)
-#define IXGBE_FLAG_DCB_ENABLED                  (u32)(1 << 24)
+#define IXGBE_FLAG_IN_SFP_LINK_TASK             (u32)(1 << 24)
+#define IXGBE_FLAG_IN_SFP_MOD_TASK              (u32)(1 << 25)
 
 /* default to trying for four seconds */
 #define IXGBE_TRY_LINK_TIMEOUT (4 * HZ)
@@ -317,7 +322,9 @@ struct ixgbe_adapter {
 	struct work_struct watchdog_task;
 	struct work_struct sfp_task;
 	struct timer_list sfp_timer;
-
+	struct work_struct multispeed_fiber_task;
+	struct work_struct sfp_config_module_task;
+	u32 wol;
 	u16 eeprom_version;
 };
 
@@ -330,9 +337,11 @@ enum ixbge_state_t {
 
 enum ixgbe_boards {
 	board_82598,
+	board_82599,
 };
 
 extern struct ixgbe_info ixgbe_82598_info;
+extern struct ixgbe_info ixgbe_82599_info;
 #ifdef CONFIG_IXGBE_DCB
 extern struct dcbnl_rtnl_ops dcbnl_ops;
 extern int ixgbe_copy_dcb_cfg(struct ixgbe_dcb_config *src_dcb_cfg,
drivers/net/ixgbe/ixgbe_ethtool.c +1 -0
index 35d820e..ae38bca 100644
@@ -89,6 +89,7 @@ static struct ixgbe_stats ixgbe_gstrings_stats[] = {
 	{"rx_header_split", IXGBE_STAT(rx_hdr_split)},
 	{"alloc_rx_page_failed", IXGBE_STAT(alloc_rx_page_failed)},
 	{"alloc_rx_buff_failed", IXGBE_STAT(alloc_rx_buff_failed)},
+	{"rx_no_dma_resources", IXGBE_STAT(hw_rx_no_dma_resources)},
 };
 
 #define IXGBE_QUEUE_STATS_LEN \
drivers/net/ixgbe/ixgbe_main.c +536 -123

1,049 lines not on this page · raw message

maintainer
#6 lore raw
In reply to Jeff Kirsher

From: Jeff Kirsher <[email protected]>
Date: Fri, 27 Feb 2009 17:44:16 -0800

Quoted 5 lines

The following series implements basic support for the new Intel 82599 10 Gigabit Network adapter. Contained in this patchset is:

1) Hardware specific code to initialize the 82599 device
2) Include Data Center Bridging support for 82599
3) Add the current device ID's for 82599, including a fully pluggable 1G/10G SFP+ NIC, and a KX/KX4 mezzanine card

All applied.

I look forward to seeing you guys followup on the I2C usage stuff Ben pointed out :-)

#7 lore raw
Quoted 9 lines · David Miller

From: Jeff Kirsher <[email protected]>
Date: Fri, 27 Feb 2009 17:44:16 -0800

Quoted 5 lines

The following series implements basic support for the new Intel 82599 10 Gigabit Network adapter.  Contained in this patchset is:

      1) Hardware specific code to initialize the 82599 device
      2) Include Data Center Bridging support for 82599
      3) Add the current device ID's for 82599, including a fully pluggable 1G/10G SFP+ NIC, and a KX/KX4 mezzanine card

Quoted 5 lines

All applied.

I look forward to seeing you guys followup on the I2C usage stuff Ben pointed out :-)
--

Thanks Dave.

I know that PJ is actively working with Ben to see how we can implement the in kernel I2C interface into the driver.

Signature · 2 lines
Cheers,
Jeff
#8 lore raw
Quoted 12 lines · Jeff Kirsher
Quoted 11 lines · David Miller

From: Jeff Kirsher <[email protected]>
Date: Fri, 27 Feb 2009 17:44:16 -0800

Quoted 5 lines

The following series implements basic support for the new Intel 82599 10 Gigabit Network adapter. Contained in this patchset is:

1) Hardware specific code to initialize the 82599 device
2) Include Data Center Bridging support for 82599
3) Add the current device ID's for 82599, including a fully pluggable 1G/10G SFP+ NIC, and a KX/KX4 mezzanine card

All applied.

Quoted 8 lines
Quoted 3 lines

I look forward to seeing you guys followup on the I2C usage stuff Ben pointed out :-)
--

Thanks Dave.

I know that PJ is actively working with Ben to see how we can implement the in kernel I2C interface into the driver.

Yes, Ben has helped quite a bit pointing me in the right direction. I'll be cleaning up both the 82599 I2C usage, and I'll try and clean up the existing 82598 I2C usage at the same time.

Cheers,
-PJ