Skip to contentSkip to conversation

ixgbe: Properly disable packet split per-ring when globally disabled

PATCH Applied Jeff Kirsher 2 participants 6 messages Sep 14, 2009 – Sep 15, 2009

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

PATCH 1/3 ixgbe: Properly disable packet split per-ring when globally disabled

From: Peter P Waskiewicz Jr <[email protected]>

The packet split feature was recently moved out of the adapter-wide flags feature field and into a per-Rx ring feature field. In the process, packet split isn't properly disabled in the Rx ring if the adapter has it globally disabled, followed by a device reset.

This won't impact the driver today, since it's always in packet split mode. However, this will prevent any pitfalls if someone disables packet split on the adapter in the future and doesn't disable it in each ring.

---

 drivers/net/ixgbe/ixgbe_main.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/net/ixgbe/ixgbe_main.c +2 -0
index 45bf8b9..b47aaa8 100644
@@ -2055,6 +2055,8 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)
 
 		if (adapter->flags & IXGBE_FLAG_RX_PS_ENABLED)
 			rx_ring->flags |= IXGBE_RING_RX_PS_ENABLED;
+		else
+			rx_ring->flags &= ~IXGBE_RING_RX_PS_ENABLED;
 
 #ifdef IXGBE_FCOE
 		if (netdev->features & NETIF_F_FCOE_MTU) {
#1 lore raw

PATCH 2/3 ixgbe: Add support for 82599-based CX4 adapters

From: Peter P Waskiewicz Jr <[email protected]>

This patch adds support for CX4 adapters based on 82599.

---

 drivers/net/ixgbe/ixgbe_82599.c |    3 +++
 drivers/net/ixgbe/ixgbe_main.c  |    2 ++
 drivers/net/ixgbe/ixgbe_type.h  |    1 +
 3 files changed, 6 insertions(+), 0 deletions(-)
drivers/net/ixgbe/ixgbe_82599.c +3 -0
index 61af47e..c9006bb 100644
@@ -337,6 +337,9 @@ static enum ixgbe_media_type ixgbe_get_media_type_82599(struct ixgbe_hw *hw)
 	case IXGBE_DEV_ID_82599_SFP:
 		media_type = ixgbe_media_type_fiber;
 		break;
+	case IXGBE_DEV_ID_82599_CX4:
+		media_type = ixgbe_media_type_fiber;
+		break;
 	default:
 		media_type = ixgbe_media_type_unknown;
 		break;
drivers/net/ixgbe/ixgbe_main.c +2 -0
index b47aaa8..59ad959 100644
@@ -97,6 +97,8 @@ static struct pci_device_id ixgbe_pci_tbl[] = {
 	 board_82599 },
 	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_SFP),
 	 board_82599 },
+	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_CX4),
+	 board_82599 },
 
 	/* required last entry */
 	{0, }
drivers/net/ixgbe/ixgbe_type.h +1 -0
index 8ba90ee..37303a1 100644
@@ -49,6 +49,7 @@
 #define IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM      0x10E1
 #define IXGBE_DEV_ID_82598EB_XF_LR       0x10F4
 #define IXGBE_DEV_ID_82599_KX4           0x10F7
+#define IXGBE_DEV_ID_82599_CX4           0x10F9
 #define IXGBE_DEV_ID_82599_SFP           0x10FB
 #define IXGBE_DEV_ID_82599_XAUI_LOM      0x10FC
 
#3 lore raw

PATCH 3/3 ixgbe: Create separate media type for CX4 adapters

In reply to Jeff Kirsher

From: Peter P Waskiewicz Jr <[email protected]>

Currently the media type detection for CX4 adapters lumps them into a type of fiber. This causes some strange fallout when firmware verification is done on the NIC, and certain fiber NIC rules get enforced incorrectly.

This patch introduces a new media type for CX4, and puts both 82598 and 82599 CX4 adapters into this bucket.

---

 drivers/net/ixgbe/ixgbe_82598.c |    6 ++++--
 drivers/net/ixgbe/ixgbe_82599.c |    2 +-
 drivers/net/ixgbe/ixgbe_type.h  |    1 +
 3 files changed, 6 insertions(+), 3 deletions(-)
drivers/net/ixgbe/ixgbe_82598.c +4 -2
index cb7f0c3..56b12f3 100644
@@ -322,14 +322,16 @@ static enum ixgbe_media_type ixgbe_get_media_type_82598(struct ixgbe_hw *hw)
 		break;
 	case IXGBE_DEV_ID_82598AF_DUAL_PORT:
 	case IXGBE_DEV_ID_82598AF_SINGLE_PORT:
-	case IXGBE_DEV_ID_82598EB_CX4:
-	case IXGBE_DEV_ID_82598_CX4_DUAL_PORT:
 	case IXGBE_DEV_ID_82598_DA_DUAL_PORT:
 	case IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM:
 	case IXGBE_DEV_ID_82598EB_XF_LR:
 	case IXGBE_DEV_ID_82598EB_SFP_LOM:
 		media_type = ixgbe_media_type_fiber;
 		break;
+	case IXGBE_DEV_ID_82598EB_CX4:
+	case IXGBE_DEV_ID_82598_CX4_DUAL_PORT:
+		media_type = ixgbe_media_type_cx4;
+		break;
 	case IXGBE_DEV_ID_82598AT:
 	case IXGBE_DEV_ID_82598AT2:
 		media_type = ixgbe_media_type_copper;
drivers/net/ixgbe/ixgbe_82599.c +1 -1
index c9006bb..2ec58dc 100644
@@ -338,7 +338,7 @@ static enum ixgbe_media_type ixgbe_get_media_type_82599(struct ixgbe_hw *hw)
 		media_type = ixgbe_media_type_fiber;
 		break;
 	case IXGBE_DEV_ID_82599_CX4:
-		media_type = ixgbe_media_type_fiber;
+		media_type = ixgbe_media_type_cx4;
 		break;
 	default:
 		media_type = ixgbe_media_type_unknown;
drivers/net/ixgbe/ixgbe_type.h +1 -0
index 37303a1..8761d78 100644
@@ -2144,6 +2144,7 @@ enum ixgbe_media_type {
 	ixgbe_media_type_fiber,
 	ixgbe_media_type_copper,
 	ixgbe_media_type_backplane,
+	ixgbe_media_type_cx4,
 	ixgbe_media_type_virtual
 };
 
maintainer Applied
#5 lore raw
In reply to Jeff Kirsher

From: Jeff Kirsher <[email protected]>
Date: Mon, 14 Sep 2009 10:47:27 -0700

Quoted 7 lines

From: Peter P Waskiewicz Jr <[email protected]>

The packet split feature was recently moved out of the adapter-wide flags feature field and into a per-Rx ring feature field. In the process, packet split isn't properly disabled in the Rx ring if the adapter has it globally disabled, followed by a device reset.

Quoted 7 lines

This won't impact the driver today, since it's always in packet split mode. However, this will prevent any pitfalls if someone disables packet split on the adapter in the future and doesn't disable it in each ring.

Applied.

maintainer Applied
#2 lore raw

Re: [net-next PATCH 2/3] ixgbe: Add support for 82599-based CX4 adapters

In reply to Jeff Kirsher

From: Jeff Kirsher <[email protected]>
Date: Mon, 14 Sep 2009 10:47:49 -0700

Quoted 7 lines

From: Peter P Waskiewicz Jr <[email protected]>

This patch adds support for CX4 adapters based on 82599.

Applied.

maintainer Applied
#4 lore raw

Re: [net-next PATCH 3/3] ixgbe: Create separate media type for CX4 adapters

In reply to Jeff Kirsher

From: Jeff Kirsher <[email protected]>
Date: Mon, 14 Sep 2009 10:48:10 -0700

Quoted 6 lines

From: Peter P Waskiewicz Jr <[email protected]>

Currently the media type detection for CX4 adapters lumps them into a type of fiber. This causes some strange fallout when firmware verification is done on the NIC, and certain fiber NIC rules get enforced incorrectly.

Quoted 6 lines

This patch introduces a new media type for CX4, and puts both 82598 and 82599 CX4 adapters into this bucket.

Applied.