[dpdk-dev] [PATCH 20/29] net/ixgbe/base: add physical layer options for FW PHY type

Wei Dai wei.dai at intel.com
Sun Dec 4 07:31:31 CET 2016


The "FW" PHY type now supports speeds 10M, 100M, and 1G. Previously,
only the 1G speed was reported in the
ixgbe_get_supported_physical_layer_X550em() function for this PHY type.
This patch is to add the 10M and 100M options.

Signed-off-by: Wei Dai <wei.dai at intel.com>
---
 drivers/net/ixgbe/base/ixgbe_type.h | 1 +
 drivers/net/ixgbe/base/ixgbe_x550.c | 8 +++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h
index 6ab466b..9851d84 100644
--- a/drivers/net/ixgbe/base/ixgbe_type.h
+++ b/drivers/net/ixgbe/base/ixgbe_type.h
@@ -3426,6 +3426,7 @@ typedef u32 ixgbe_physical_layer;
 #define IXGBE_PHYSICAL_LAYER_10GBASE_XAUI	0x1000
 #define IXGBE_PHYSICAL_LAYER_SFP_ACTIVE_DA	0x2000
 #define IXGBE_PHYSICAL_LAYER_1000BASE_SX	0x4000
+#define IXGBE_PHYSICAL_LAYER_10BASE_T		0x8000
 
 /* Flow Control Data Sheet defined values
  * Calculation and defines taken from 802.1bb Annex O
diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c
index 0011f21..f1f1fbe 100644
--- a/drivers/net/ixgbe/base/ixgbe_x550.c
+++ b/drivers/net/ixgbe/base/ixgbe_x550.c
@@ -3784,7 +3784,13 @@ u32 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw)
 			physical_layer |= IXGBE_PHYSICAL_LAYER_1000BASE_T;
 		break;
 	case ixgbe_phy_fw:
-		physical_layer = IXGBE_PHYSICAL_LAYER_1000BASE_T;
+		if (hw->phy.speeds_supported & IXGBE_LINK_SPEED_1GB_FULL)
+			physical_layer |= IXGBE_PHYSICAL_LAYER_1000BASE_T;
+		if (hw->phy.speeds_supported & IXGBE_LINK_SPEED_100_FULL)
+			physical_layer |= IXGBE_PHYSICAL_LAYER_100BASE_TX;
+		if (hw->phy.speeds_supported & IXGBE_LINK_SPEED_10_FULL)
+			physical_layer |= IXGBE_PHYSICAL_LAYER_10BASE_T;
+		break;
 	default:
 		break;
 	}
-- 
2.7.4



More information about the dev mailing list