netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next PATCH 1/7] ixgbe: fix header len when unsplit packet overflows to data buffer
@ 2010-05-19  2:00 Jeff Kirsher
  2010-05-19  2:00 ` [net-next PATCH 2/7] ixgbe: fix wrong offset to fc_frame_header in ixgbe_fcoe_ddp Jeff Kirsher
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Jeff Kirsher @ 2010-05-19  2:00 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, Shannon Nelson, Jeff Kirsher

From: Shannon Nelson <shannon.nelson@intel.com>

When in packet split mode, packet type is not recognized, and the packet is
larger than the header size, the 82599 overflows the packet into the data
area, but doesn't set the HDR_LEN field.  We can safely assume the length
is the current header size.  This fixes an obscure corner case that can be
triggered by non-ip packet headers or (more likely) by disabling the L2
packet recognition.

Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_main.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 926ad8c..a9e091c 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -1201,9 +1201,10 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
 			hdr_info = le16_to_cpu(ixgbe_get_hdr_info(rx_desc));
 			len = (hdr_info & IXGBE_RXDADV_HDRBUFLEN_MASK) >>
 			       IXGBE_RXDADV_HDRBUFLEN_SHIFT;
-			if (len > IXGBE_RX_HDR_SIZE)
-				len = IXGBE_RX_HDR_SIZE;
 			upper_len = le16_to_cpu(rx_desc->wb.upper.length);
+			if ((len > IXGBE_RX_HDR_SIZE) ||
+			    (upper_len && !(hdr_info & IXGBE_RXDADV_SPH)))
+				len = IXGBE_RX_HDR_SIZE;
 		} else {
 			len = le16_to_cpu(rx_desc->wb.upper.length);
 		}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [net-next PATCH 2/7] ixgbe: fix wrong offset to fc_frame_header in ixgbe_fcoe_ddp
  2010-05-19  2:00 [net-next PATCH 1/7] ixgbe: fix header len when unsplit packet overflows to data buffer Jeff Kirsher
@ 2010-05-19  2:00 ` Jeff Kirsher
  2010-05-19  2:44   ` David Miller
  2010-05-19  2:00 ` [net-next PATCH 3/7] ixgbe: remove some redundant code in setting FCoE FIP filter Jeff Kirsher
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Jeff Kirsher @ 2010-05-19  2:00 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, Yi Zou, Jeff Kirsher

From: Yi Zou <yi.zou@intel.com>

Make sure we point to the right offset of the fc_frame_header when
VLAN header exists and HW has VLAN stripping disabled.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_fcoe.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_fcoe.c b/drivers/net/ixgbe/ixgbe_fcoe.c
index 6493049..a82d2fc 100644
--- a/drivers/net/ixgbe/ixgbe_fcoe.c
+++ b/drivers/net/ixgbe/ixgbe_fcoe.c
@@ -32,6 +32,7 @@
 #endif /* CONFIG_IXGBE_DCB */
 #include <linux/if_ether.h>
 #include <linux/gfp.h>
+#include <linux/if_vlan.h>
 #include <scsi/scsi_cmnd.h>
 #include <scsi/scsi_device.h>
 #include <scsi/fc/fc_fs.h>
@@ -312,10 +313,12 @@ int ixgbe_fcoe_ddp(struct ixgbe_adapter *adapter,
 	if (fcerr == IXGBE_FCERR_BADCRC)
 		skb->ip_summed = CHECKSUM_NONE;
 
-	skb_reset_network_header(skb);
-	skb_set_transport_header(skb, skb_network_offset(skb) +
-				 sizeof(struct fcoe_hdr));
-	fh = (struct fc_frame_header *)skb_transport_header(skb);
+	if (eth_hdr(skb)->h_proto == htons(ETH_P_8021Q))
+		fh = (struct fc_frame_header *)(skb->data +
+			sizeof(struct vlan_hdr) + sizeof(struct fcoe_hdr));
+	else
+		fh = (struct fc_frame_header *)(skb->data +
+			sizeof(struct fcoe_hdr));
 	fctl = ntoh24(fh->fh_f_ctl);
 	if (fctl & FC_FC_EX_CTX)
 		xid =  be16_to_cpu(fh->fh_ox_id);


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [net-next PATCH 3/7] ixgbe: remove some redundant code in setting FCoE FIP filter
  2010-05-19  2:00 [net-next PATCH 1/7] ixgbe: fix header len when unsplit packet overflows to data buffer Jeff Kirsher
  2010-05-19  2:00 ` [net-next PATCH 2/7] ixgbe: fix wrong offset to fc_frame_header in ixgbe_fcoe_ddp Jeff Kirsher
@ 2010-05-19  2:00 ` Jeff Kirsher
  2010-05-19  2:44   ` David Miller
  2010-05-19  2:00 ` [net-next PATCH 4/7] ixgbe: always enable vlan strip/insert when DCB is enabled Jeff Kirsher
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Jeff Kirsher @ 2010-05-19  2:00 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, Yi Zou, Jeff Kirsher

From: Yi Zou <yi.zou@intel.com>

The ETQS setup for FIP out side the if..else is enough for the ETQS
setup for FIP, so remove redundant code.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_fcoe.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_fcoe.c b/drivers/net/ixgbe/ixgbe_fcoe.c
index a82d2fc..45182ab 100644
--- a/drivers/net/ixgbe/ixgbe_fcoe.c
+++ b/drivers/net/ixgbe/ixgbe_fcoe.c
@@ -539,12 +539,6 @@ void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter)
 		}
 		IXGBE_WRITE_REG(hw, IXGBE_FCRECTL, IXGBE_FCRECTL_ENA);
 		IXGBE_WRITE_REG(hw, IXGBE_ETQS(IXGBE_ETQF_FILTER_FCOE), 0);
-		fcoe_i = f->mask;
-		fcoe_i &= IXGBE_FCRETA_ENTRY_MASK;
-		fcoe_q = adapter->rx_ring[fcoe_i]->reg_idx;
-		IXGBE_WRITE_REG(hw, IXGBE_ETQS(IXGBE_ETQF_FILTER_FIP),
-				IXGBE_ETQS_QUEUE_EN |
-				(fcoe_q << IXGBE_ETQS_RX_QUEUE_SHIFT));
 	} else  {
 		/* Use single rx queue for FCoE */
 		fcoe_i = f->mask;


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [net-next PATCH 4/7] ixgbe: always enable vlan strip/insert when DCB is enabled
  2010-05-19  2:00 [net-next PATCH 1/7] ixgbe: fix header len when unsplit packet overflows to data buffer Jeff Kirsher
  2010-05-19  2:00 ` [net-next PATCH 2/7] ixgbe: fix wrong offset to fc_frame_header in ixgbe_fcoe_ddp Jeff Kirsher
  2010-05-19  2:00 ` [net-next PATCH 3/7] ixgbe: remove some redundant code in setting FCoE FIP filter Jeff Kirsher
@ 2010-05-19  2:00 ` Jeff Kirsher
  2010-05-19  2:44   ` David Miller
  2010-05-19  2:00 ` [net-next PATCH 5/7] ixgbe: fix ixgbe_tx_is_paused logic Jeff Kirsher
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Jeff Kirsher @ 2010-05-19  2:00 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, Yi Zou, Jeff Kirsher

From: Yi Zou <yi.zou@intel.com>

when DCB mode is on, we want the HW VLAN stripping to be always enabled.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_main.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index a9e091c..f0f7329 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -2845,7 +2845,11 @@ static void ixgbe_vlan_filter_disable(struct ixgbe_adapter *adapter)
 
 	switch (hw->mac.type) {
 	case ixgbe_mac_82598EB:
-		vlnctrl &= ~(IXGBE_VLNCTRL_VME | IXGBE_VLNCTRL_VFE);
+		vlnctrl &= ~IXGBE_VLNCTRL_VFE;
+#ifdef CONFIG_IXGBE_DCB
+		if (!(adapter->flags & IXGBE_FLAG_DCB_ENABLED))
+			vlnctrl &= ~IXGBE_VLNCTRL_VME;
+#endif
 		vlnctrl &= ~IXGBE_VLNCTRL_CFIEN;
 		IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl);
 		break;
@@ -2853,6 +2857,10 @@ static void ixgbe_vlan_filter_disable(struct ixgbe_adapter *adapter)
 		vlnctrl &= ~IXGBE_VLNCTRL_VFE;
 		vlnctrl &= ~IXGBE_VLNCTRL_CFIEN;
 		IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl);
+#ifdef CONFIG_IXGBE_DCB
+		if (adapter->flags & IXGBE_FLAG_DCB_ENABLED)
+			break;
+#endif
 		for (i = 0; i < adapter->num_rx_queues; i++) {
 			j = adapter->rx_ring[i]->reg_idx;
 			vlnctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(j));


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [net-next PATCH 5/7] ixgbe: fix ixgbe_tx_is_paused logic
  2010-05-19  2:00 [net-next PATCH 1/7] ixgbe: fix header len when unsplit packet overflows to data buffer Jeff Kirsher
                   ` (2 preceding siblings ...)
  2010-05-19  2:00 ` [net-next PATCH 4/7] ixgbe: always enable vlan strip/insert when DCB is enabled Jeff Kirsher
@ 2010-05-19  2:00 ` Jeff Kirsher
  2010-05-19  2:44   ` David Miller
  2010-05-19  2:00 ` [net-next PATCH 6/7] ixgbe: dcb, do not tag tc_prio_control frames Jeff Kirsher
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Jeff Kirsher @ 2010-05-19  2:00 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, John Fastabend, Jeff Kirsher

From: John Fastabend <john.r.fastabend@intel.com>

The TFCS bits show the current XON state.  Meaning that the
device is paused if these bits are 0.  This fixes the logic
to work as it was intended.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_main.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index f0f7329..d80bb1a 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -625,16 +625,16 @@ static void ixgbe_unmap_and_free_tx_resource(struct ixgbe_adapter *adapter,
 }
 
 /**
- * ixgbe_tx_is_paused - check if the tx ring is paused
+ * ixgbe_tx_xon_state - check the tx ring xon state
  * @adapter: the ixgbe adapter
  * @tx_ring: the corresponding tx_ring
  *
  * If not in DCB mode, checks TFCS.TXOFF, otherwise, find out the
  * corresponding TC of this tx_ring when checking TFCS.
  *
- * Returns : true if paused
+ * Returns : true if in xon state (currently not paused)
  */
-static inline bool ixgbe_tx_is_paused(struct ixgbe_adapter *adapter,
+static inline bool ixgbe_tx_xon_state(struct ixgbe_adapter *adapter,
                                       struct ixgbe_ring *tx_ring)
 {
 	u32 txoff = IXGBE_TFCS_TXOFF;
@@ -690,7 +690,7 @@ static inline bool ixgbe_check_tx_hang(struct ixgbe_adapter *adapter,
 	adapter->detect_tx_hung = false;
 	if (tx_ring->tx_buffer_info[eop].time_stamp &&
 	    time_after(jiffies, tx_ring->tx_buffer_info[eop].time_stamp + HZ) &&
-	    !ixgbe_tx_is_paused(adapter, tx_ring)) {
+	    ixgbe_tx_xon_state(adapter, tx_ring)) {
 		/* detected Tx unit hang */
 		union ixgbe_adv_tx_desc *tx_desc;
 		tx_desc = IXGBE_TX_DESC_ADV(*tx_ring, eop);


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [net-next PATCH 6/7] ixgbe: dcb, do not tag tc_prio_control frames
  2010-05-19  2:00 [net-next PATCH 1/7] ixgbe: fix header len when unsplit packet overflows to data buffer Jeff Kirsher
                   ` (3 preceding siblings ...)
  2010-05-19  2:00 ` [net-next PATCH 5/7] ixgbe: fix ixgbe_tx_is_paused logic Jeff Kirsher
@ 2010-05-19  2:00 ` Jeff Kirsher
  2010-05-19  2:44   ` David Miller
  2010-05-19  2:00 ` [net-next PATCH 7/7] ixgbe: add support for active DA cables Jeff Kirsher
  2010-05-19  2:44 ` [net-next PATCH 1/7] ixgbe: fix header len when unsplit packet overflows to data buffer David Miller
  6 siblings, 1 reply; 14+ messages in thread
From: Jeff Kirsher @ 2010-05-19  2:00 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, John Fastabend, Jeff Kirsher

From: John Fastabend <john.r.fastabend@intel.com>

The network stack indicate packets should not be DCB
tagged by setting the priority to TC_PRIO_CONTROL. One
usage for this is lldp frames which are not suppossed
to be tagged.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_main.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index d80bb1a..caf1114 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -6075,7 +6075,8 @@ static netdev_tx_t ixgbe_xmit_frame(struct sk_buff *skb,
 		}
 		tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT;
 		tx_flags |= IXGBE_TX_FLAGS_VLAN;
-	} else if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
+	} else if (adapter->flags & IXGBE_FLAG_DCB_ENABLED &&
+		   skb->priority != TC_PRIO_CONTROL) {
 		tx_flags |= ((skb->queue_mapping & 0x7) << 13);
 		tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT;
 		tx_flags |= IXGBE_TX_FLAGS_VLAN;


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [net-next PATCH 7/7] ixgbe: add support for active DA cables
  2010-05-19  2:00 [net-next PATCH 1/7] ixgbe: fix header len when unsplit packet overflows to data buffer Jeff Kirsher
                   ` (4 preceding siblings ...)
  2010-05-19  2:00 ` [net-next PATCH 6/7] ixgbe: dcb, do not tag tc_prio_control frames Jeff Kirsher
@ 2010-05-19  2:00 ` Jeff Kirsher
  2010-05-19  2:45   ` David Miller
  2010-05-19  2:44 ` [net-next PATCH 1/7] ixgbe: fix header len when unsplit packet overflows to data buffer David Miller
  6 siblings, 1 reply; 14+ messages in thread
From: Jeff Kirsher @ 2010-05-19  2:00 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, Don Skidmore, Jeff Kirsher

From: Don Skidmore <donald.c.skidmore@intel.com>

This patch adds support of active DA cables.  This is
renaming and adding some PHY type enumerations.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_82599.c   |    8 ++++++--
 drivers/net/ixgbe/ixgbe_ethtool.c |    4 ++--
 drivers/net/ixgbe/ixgbe_main.c    |    6 ++++--
 drivers/net/ixgbe/ixgbe_phy.c     |   38 +++++++++++++++++++++++++++++++------
 drivers/net/ixgbe/ixgbe_phy.h     |    3 +++
 drivers/net/ixgbe/ixgbe_type.h    |    9 +++++++--
 6 files changed, 54 insertions(+), 14 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_82599.c b/drivers/net/ixgbe/ixgbe_82599.c
index dc197a4..e9706eb 100644
--- a/drivers/net/ixgbe/ixgbe_82599.c
+++ b/drivers/net/ixgbe/ixgbe_82599.c
@@ -2155,10 +2155,14 @@ sfp_check:
 		goto out;
 
 	switch (hw->phy.type) {
-	case ixgbe_phy_tw_tyco:
-	case ixgbe_phy_tw_unknown:
+	case ixgbe_phy_sfp_passive_tyco:
+	case ixgbe_phy_sfp_passive_unknown:
 		physical_layer = IXGBE_PHYSICAL_LAYER_SFP_PLUS_CU;
 		break;
+	case ixgbe_phy_sfp_ftl_active:
+	case ixgbe_phy_sfp_active_unknown:
+		physical_layer = IXGBE_PHYSICAL_LAYER_SFP_ACTIVE_DA;
+		break;
 	case ixgbe_phy_sfp_avago:
 	case ixgbe_phy_sfp_ftl:
 	case ixgbe_phy_sfp_intel:
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index 251767d..c50a754 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -212,8 +212,8 @@ static int ixgbe_get_settings(struct net_device *netdev,
 		ecmd->port = PORT_FIBRE;
 		break;
 	case ixgbe_phy_nl:
-	case ixgbe_phy_tw_tyco:
-	case ixgbe_phy_tw_unknown:
+	case ixgbe_phy_sfp_passive_tyco:
+	case ixgbe_phy_sfp_passive_unknown:
 	case ixgbe_phy_sfp_ftl:
 	case ixgbe_phy_sfp_avago:
 	case ixgbe_phy_sfp_intel:
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index caf1114..9551cbb 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -3118,8 +3118,10 @@ static inline bool ixgbe_is_sfp(struct ixgbe_hw *hw)
 	case ixgbe_phy_sfp_ftl:
 	case ixgbe_phy_sfp_intel:
 	case ixgbe_phy_sfp_unknown:
-	case ixgbe_phy_tw_tyco:
-	case ixgbe_phy_tw_unknown:
+	case ixgbe_phy_sfp_passive_tyco:
+	case ixgbe_phy_sfp_passive_unknown:
+	case ixgbe_phy_sfp_active_unknown:
+	case ixgbe_phy_sfp_ftl_active:
 		return true;
 	default:
 		return false;
diff --git a/drivers/net/ixgbe/ixgbe_phy.c b/drivers/net/ixgbe/ixgbe_phy.c
index d6d5b84..22d21af 100644
--- a/drivers/net/ixgbe/ixgbe_phy.c
+++ b/drivers/net/ixgbe/ixgbe_phy.c
@@ -531,6 +531,7 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
 	u8 comp_codes_10g = 0;
 	u8 oui_bytes[3] = {0, 0, 0};
 	u8 cable_tech = 0;
+	u8 cable_spec = 0;
 	u16 enforce_sfp = 0;
 
 	if (hw->mac.ops.get_media_type(hw) != ixgbe_media_type_fiber) {
@@ -580,14 +581,30 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
 			else
 				hw->phy.sfp_type = ixgbe_sfp_type_unknown;
 		} else if (hw->mac.type == ixgbe_mac_82599EB) {
-			if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)
+			if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) {
 				if (hw->bus.lan_id == 0)
 					hw->phy.sfp_type =
 					             ixgbe_sfp_type_da_cu_core0;
 				else
 					hw->phy.sfp_type =
 					             ixgbe_sfp_type_da_cu_core1;
-			else if (comp_codes_10g & IXGBE_SFF_10GBASESR_CAPABLE)
+			} else if (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE) {
+				hw->phy.ops.read_i2c_eeprom(
+						hw, IXGBE_SFF_CABLE_SPEC_COMP,
+						&cable_spec);
+				if (cable_spec &
+				    IXGBE_SFF_DA_SPEC_ACTIVE_LIMITING) {
+					if (hw->bus.lan_id == 0)
+						hw->phy.sfp_type =
+						ixgbe_sfp_type_da_act_lmt_core0;
+					else
+						hw->phy.sfp_type =
+						ixgbe_sfp_type_da_act_lmt_core1;
+				} else {
+					hw->phy.sfp_type =
+						ixgbe_sfp_type_unknown;
+				}
+			} else if (comp_codes_10g & IXGBE_SFF_10GBASESR_CAPABLE)
 				if (hw->bus.lan_id == 0)
 					hw->phy.sfp_type =
 					              ixgbe_sfp_type_srlr_core0;
@@ -637,10 +654,14 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
 			switch (vendor_oui) {
 			case IXGBE_SFF_VENDOR_OUI_TYCO:
 				if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)
-					hw->phy.type = ixgbe_phy_tw_tyco;
+					hw->phy.type =
+						ixgbe_phy_sfp_passive_tyco;
 				break;
 			case IXGBE_SFF_VENDOR_OUI_FTL:
-				hw->phy.type = ixgbe_phy_sfp_ftl;
+				if (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE)
+					hw->phy.type = ixgbe_phy_sfp_ftl_active;
+				else
+					hw->phy.type = ixgbe_phy_sfp_ftl;
 				break;
 			case IXGBE_SFF_VENDOR_OUI_AVAGO:
 				hw->phy.type = ixgbe_phy_sfp_avago;
@@ -650,7 +671,11 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
 				break;
 			default:
 				if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)
-					hw->phy.type = ixgbe_phy_tw_unknown;
+					hw->phy.type =
+						ixgbe_phy_sfp_passive_unknown;
+				else if (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE)
+					hw->phy.type =
+						ixgbe_phy_sfp_active_unknown;
 				else
 					hw->phy.type = ixgbe_phy_sfp_unknown;
 				break;
@@ -658,7 +683,8 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
 		}
 
 		/* All passive DA cables are supported */
-		if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) {
+		if (cable_tech & (IXGBE_SFF_DA_PASSIVE_CABLE |
+		    IXGBE_SFF_DA_ACTIVE_CABLE)) {
 			status = 0;
 			goto out;
 		}
diff --git a/drivers/net/ixgbe/ixgbe_phy.h b/drivers/net/ixgbe/ixgbe_phy.h
index 9cf5f3b..c9c5459 100644
--- a/drivers/net/ixgbe/ixgbe_phy.h
+++ b/drivers/net/ixgbe/ixgbe_phy.h
@@ -40,9 +40,12 @@
 #define IXGBE_SFF_1GBE_COMP_CODES    0x6
 #define IXGBE_SFF_10GBE_COMP_CODES   0x3
 #define IXGBE_SFF_CABLE_TECHNOLOGY   0x8
+#define IXGBE_SFF_CABLE_SPEC_COMP    0x3C
 
 /* Bitmasks */
 #define IXGBE_SFF_DA_PASSIVE_CABLE           0x4
+#define IXGBE_SFF_DA_ACTIVE_CABLE            0x8
+#define IXGBE_SFF_DA_SPEC_ACTIVE_LIMITING    0x4
 #define IXGBE_SFF_1GBASESX_CAPABLE           0x1
 #define IXGBE_SFF_1GBASELX_CAPABLE           0x2
 #define IXGBE_SFF_10GBASESR_CAPABLE          0x10
diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h
index bd69196..39b9be8 100644
--- a/drivers/net/ixgbe/ixgbe_type.h
+++ b/drivers/net/ixgbe/ixgbe_type.h
@@ -2108,6 +2108,7 @@ typedef u32 ixgbe_physical_layer;
 #define IXGBE_PHYSICAL_LAYER_1000BASE_BX  0x0400
 #define IXGBE_PHYSICAL_LAYER_10GBASE_KR   0x0800
 #define IXGBE_PHYSICAL_LAYER_10GBASE_XAUI 0x1000
+#define IXGBE_PHYSICAL_LAYER_SFP_ACTIVE_DA 0x2000
 
 /* Software ATR hash keys */
 #define IXGBE_ATR_BUCKET_HASH_KEY    0xE214AD3D
@@ -2177,10 +2178,12 @@ enum ixgbe_phy_type {
 	ixgbe_phy_qt,
 	ixgbe_phy_xaui,
 	ixgbe_phy_nl,
-	ixgbe_phy_tw_tyco,
-	ixgbe_phy_tw_unknown,
+	ixgbe_phy_sfp_passive_tyco,
+	ixgbe_phy_sfp_passive_unknown,
+	ixgbe_phy_sfp_active_unknown,
 	ixgbe_phy_sfp_avago,
 	ixgbe_phy_sfp_ftl,
+	ixgbe_phy_sfp_ftl_active,
 	ixgbe_phy_sfp_unknown,
 	ixgbe_phy_sfp_intel,
 	ixgbe_phy_sfp_unsupported,
@@ -2208,6 +2211,8 @@ enum ixgbe_sfp_type {
 	ixgbe_sfp_type_da_cu_core1 = 4,
 	ixgbe_sfp_type_srlr_core0 = 5,
 	ixgbe_sfp_type_srlr_core1 = 6,
+	ixgbe_sfp_type_da_act_lmt_core0 = 7,
+	ixgbe_sfp_type_da_act_lmt_core1 = 8,
 	ixgbe_sfp_type_not_present = 0xFFFE,
 	ixgbe_sfp_type_unknown = 0xFFFF
 };


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [net-next PATCH 1/7] ixgbe: fix header len when unsplit packet overflows to data buffer
  2010-05-19  2:00 [net-next PATCH 1/7] ixgbe: fix header len when unsplit packet overflows to data buffer Jeff Kirsher
                   ` (5 preceding siblings ...)
  2010-05-19  2:00 ` [net-next PATCH 7/7] ixgbe: add support for active DA cables Jeff Kirsher
@ 2010-05-19  2:44 ` David Miller
  6 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2010-05-19  2:44 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, shannon.nelson

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 18 May 2010 19:00:03 -0700

> From: Shannon Nelson <shannon.nelson@intel.com>
> 
> When in packet split mode, packet type is not recognized, and the packet is
> larger than the header size, the 82599 overflows the packet into the data
> area, but doesn't set the HDR_LEN field.  We can safely assume the length
> is the current header size.  This fixes an obscure corner case that can be
> triggered by non-ip packet headers or (more likely) by disabling the L2
> packet recognition.
> 
> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [net-next PATCH 2/7] ixgbe: fix wrong offset to fc_frame_header in ixgbe_fcoe_ddp
  2010-05-19  2:00 ` [net-next PATCH 2/7] ixgbe: fix wrong offset to fc_frame_header in ixgbe_fcoe_ddp Jeff Kirsher
@ 2010-05-19  2:44   ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2010-05-19  2:44 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, yi.zou

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 18 May 2010 19:00:05 -0700

> From: Yi Zou <yi.zou@intel.com>
> 
> Make sure we point to the right offset of the fc_frame_header when
> VLAN header exists and HW has VLAN stripping disabled.
> 
> Signed-off-by: Yi Zou <yi.zou@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [net-next PATCH 3/7] ixgbe: remove some redundant code in setting FCoE FIP filter
  2010-05-19  2:00 ` [net-next PATCH 3/7] ixgbe: remove some redundant code in setting FCoE FIP filter Jeff Kirsher
@ 2010-05-19  2:44   ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2010-05-19  2:44 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, yi.zou

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 18 May 2010 19:00:07 -0700

> From: Yi Zou <yi.zou@intel.com>
> 
> The ETQS setup for FIP out side the if..else is enough for the ETQS
> setup for FIP, so remove redundant code.
> 
> Signed-off-by: Yi Zou <yi.zou@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [net-next PATCH 4/7] ixgbe: always enable vlan strip/insert when DCB is enabled
  2010-05-19  2:00 ` [net-next PATCH 4/7] ixgbe: always enable vlan strip/insert when DCB is enabled Jeff Kirsher
@ 2010-05-19  2:44   ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2010-05-19  2:44 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, yi.zou

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 18 May 2010 19:00:08 -0700

> From: Yi Zou <yi.zou@intel.com>
> 
> when DCB mode is on, we want the HW VLAN stripping to be always enabled.
> 
> Signed-off-by: Yi Zou <yi.zou@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [net-next PATCH 5/7] ixgbe: fix ixgbe_tx_is_paused logic
  2010-05-19  2:00 ` [net-next PATCH 5/7] ixgbe: fix ixgbe_tx_is_paused logic Jeff Kirsher
@ 2010-05-19  2:44   ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2010-05-19  2:44 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, john.r.fastabend

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 18 May 2010 19:00:10 -0700

> From: John Fastabend <john.r.fastabend@intel.com>
> 
> The TFCS bits show the current XON state.  Meaning that the
> device is paused if these bits are 0.  This fixes the logic
> to work as it was intended.
> 
> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [net-next PATCH 6/7] ixgbe: dcb, do not tag tc_prio_control frames
  2010-05-19  2:00 ` [net-next PATCH 6/7] ixgbe: dcb, do not tag tc_prio_control frames Jeff Kirsher
@ 2010-05-19  2:44   ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2010-05-19  2:44 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, john.r.fastabend

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 18 May 2010 19:00:11 -0700

> From: John Fastabend <john.r.fastabend@intel.com>
> 
> The network stack indicate packets should not be DCB
> tagged by setting the priority to TC_PRIO_CONTROL. One
> usage for this is lldp frames which are not suppossed
> to be tagged.
> 
> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [net-next PATCH 7/7] ixgbe: add support for active DA cables
  2010-05-19  2:00 ` [net-next PATCH 7/7] ixgbe: add support for active DA cables Jeff Kirsher
@ 2010-05-19  2:45   ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2010-05-19  2:45 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, donald.c.skidmore

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 18 May 2010 19:00:13 -0700

> From: Don Skidmore <donald.c.skidmore@intel.com>
> 
> This patch adds support of active DA cables.  This is
> renaming and adding some PHY type enumerations.
> 
> Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-05-19  2:44 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-19  2:00 [net-next PATCH 1/7] ixgbe: fix header len when unsplit packet overflows to data buffer Jeff Kirsher
2010-05-19  2:00 ` [net-next PATCH 2/7] ixgbe: fix wrong offset to fc_frame_header in ixgbe_fcoe_ddp Jeff Kirsher
2010-05-19  2:44   ` David Miller
2010-05-19  2:00 ` [net-next PATCH 3/7] ixgbe: remove some redundant code in setting FCoE FIP filter Jeff Kirsher
2010-05-19  2:44   ` David Miller
2010-05-19  2:00 ` [net-next PATCH 4/7] ixgbe: always enable vlan strip/insert when DCB is enabled Jeff Kirsher
2010-05-19  2:44   ` David Miller
2010-05-19  2:00 ` [net-next PATCH 5/7] ixgbe: fix ixgbe_tx_is_paused logic Jeff Kirsher
2010-05-19  2:44   ` David Miller
2010-05-19  2:00 ` [net-next PATCH 6/7] ixgbe: dcb, do not tag tc_prio_control frames Jeff Kirsher
2010-05-19  2:44   ` David Miller
2010-05-19  2:00 ` [net-next PATCH 7/7] ixgbe: add support for active DA cables Jeff Kirsher
2010-05-19  2:45   ` David Miller
2010-05-19  2:44 ` [net-next PATCH 1/7] ixgbe: fix header len when unsplit packet overflows to data buffer David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).