All of lore.kernel.org
 help / color / mirror / Atom feed
* [net-next-2.6 PATCH] ixgbe: Disallow SFP 1G modules in the SFP+ cages for 82598 and 82599
@ 2009-04-23 21:31 Jeff Kirsher
  2009-04-27 10:16 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Kirsher @ 2009-04-23 21:31 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, Peter P Waskiewicz Jr, Jeff Kirsher

From: Waskiewicz Jr, Peter P <peter.p.waskiewicz.jr@intel.com>

82598 and 82599 do not support SFP 1G modules.  Instead of allowing the
driver to load, but never get link, rejecting the module and displaying
a useful message is more preferrable.  The framework for displaying the
failure message already exists, now we just need to detect and reject the
SFP modules.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_phy.c  |   22 +++++++++++++++++-----
 drivers/net/ixgbe/ixgbe_type.h |    1 +
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_phy.c b/drivers/net/ixgbe/ixgbe_phy.c
index f3258ec..2543c32 100644
--- a/drivers/net/ixgbe/ixgbe_phy.c
+++ b/drivers/net/ixgbe/ixgbe_phy.c
@@ -673,11 +673,22 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
 				break;
 			}
 		}
-		if (hw->mac.type == ixgbe_mac_82598EB ||
-		    (hw->phy.sfp_type != ixgbe_sfp_type_sr &&
-		     hw->phy.sfp_type != ixgbe_sfp_type_lr &&
-		     hw->phy.sfp_type != ixgbe_sfp_type_srlr_core0 &&
-		     hw->phy.sfp_type != ixgbe_sfp_type_srlr_core1)) {
+
+		/* All DA cables are supported */
+		if (transmission_media & IXGBE_SFF_TWIN_AX_CAPABLE) {
+			status = 0;
+			goto out;
+		}
+
+		/* 1G SFP modules are not supported */
+		if (comp_codes_10g == 0) {
+			hw->phy.type = ixgbe_phy_sfp_unsupported;
+			status = IXGBE_ERR_SFP_NOT_SUPPORTED;
+			goto out;
+		}
+
+		/* Anything else 82598-based is supported */
+		if (hw->mac.type == ixgbe_mac_82598EB) {
 			status = 0;
 			goto out;
 		}
@@ -690,6 +701,7 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
 				status = 0;
 			} else {
 				hw_dbg(hw, "SFP+ module not supported\n");
+				hw->phy.type = ixgbe_phy_sfp_unsupported;
 				status = IXGBE_ERR_SFP_NOT_SUPPORTED;
 			}
 		} else {
diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h
index a3317d8..375f0d4 100644
--- a/drivers/net/ixgbe/ixgbe_type.h
+++ b/drivers/net/ixgbe/ixgbe_type.h
@@ -1904,6 +1904,7 @@ enum ixgbe_phy_type {
 	ixgbe_phy_sfp_ftl,
 	ixgbe_phy_sfp_unknown,
 	ixgbe_phy_sfp_intel,
+	ixgbe_phy_sfp_unsupported,
 	ixgbe_phy_generic
 };
 


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

* Re: [net-next-2.6 PATCH] ixgbe: Disallow SFP 1G modules in the SFP+ cages for 82598 and 82599
  2009-04-23 21:31 [net-next-2.6 PATCH] ixgbe: Disallow SFP 1G modules in the SFP+ cages for 82598 and 82599 Jeff Kirsher
@ 2009-04-27 10:16 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-04-27 10:16 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, peter.p.waskiewicz.jr

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 23 Apr 2009 14:31:37 -0700

> 82598 and 82599 do not support SFP 1G modules.  Instead of allowing the
> driver to load, but never get link, rejecting the module and displaying
> a useful message is more preferrable.  The framework for displaying the
> failure message already exists, now we just need to detect and reject the
> SFP modules.
> 
> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied.

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

end of thread, other threads:[~2009-04-27 10:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-23 21:31 [net-next-2.6 PATCH] ixgbe: Disallow SFP 1G modules in the SFP+ cages for 82598 and 82599 Jeff Kirsher
2009-04-27 10:16 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.