Skip to contentSkip to conversation

net: phy: breakdown PHY_*_FEATURES defines

PATCH New Alexey Brodkin 1 participant 2 messages Dec 23, 2015 – Jan 11, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: phy: breakdown PHY_*_FEATURES defines

From: Florian Fainelli <[email protected]>

Breakdown the PHY_*_FEATURES into per speed defines such that we can easily re-use them individually.

This is a copy of patch from Linux kernel, see
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e9fbdf176d2a7993b9d4c487b50c68d1c6019b2c

---
 include/phy.h | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)
include/phy.h +15 -7
index 66cf61b..b793e90 100644
@@ -17,18 +17,26 @@
 
 #define PHY_MAX_ADDR 32
 
-#define PHY_BASIC_FEATURES	(SUPPORTED_10baseT_Half | \
-				 SUPPORTED_10baseT_Full | \
-				 SUPPORTED_100baseT_Half | \
-				 SUPPORTED_100baseT_Full | \
-				 SUPPORTED_Autoneg | \
+#define PHY_DEFAULT_FEATURES	(SUPPORTED_Autoneg | \
 				 SUPPORTED_TP | \
 				 SUPPORTED_MII)
 
-#define PHY_GBIT_FEATURES	(PHY_BASIC_FEATURES | \
-				 SUPPORTED_1000baseT_Half | \
+#define PHY_10BT_FEATURES	(SUPPORTED_10baseT_Half | \
+				 SUPPORTED_10baseT_Full)
+
+#define PHY_100BT_FEATURES	(SUPPORTED_100baseT_Half | \
+				 SUPPORTED_100baseT_Full)
+
+#define PHY_1000BT_FEATURES	(SUPPORTED_1000baseT_Half | \
 				 SUPPORTED_1000baseT_Full)
 
+#define PHY_BASIC_FEATURES	(PHY_10BT_FEATURES | \
+				 PHY_100BT_FEATURES | \
+				 PHY_DEFAULT_FEATURES)
+
+#define PHY_GBIT_FEATURES	(PHY_BASIC_FEATURES | \
+				 PHY_1000BT_FEATURES)
+
 #define PHY_10G_FEATURES	(PHY_GBIT_FEATURES | \
 				SUPPORTED_10000baseT_Full)
 
Signature · 1 line
2.4.3
#1 lore raw

PATCH 1/1 net: phy: breakdown PHY_*_FEATURES defines

Hi Joe,

Quoted 43 lines · Alexey Brodkin

From: Florian Fainelli <[email protected]>

Breakdown the PHY_*_FEATURES into per speed defines such that we can easily re-use them individually.

This is a copy of patch from Linux kernel, see
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e9fbdf176d2a7993b9d4c487b50c68d1c6019b2c

---
 include/phy.h | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)
include/phy.h +8 -7
index 66cf61b..b793e90 100644
@@ -17,18 +17,26 @@
 
 #define PHY_MAX_ADDR 32
 
-#define PHY_BASIC_FEATURES	(SUPPORTED_10baseT_Half | \
-				 SUPPORTED_10baseT_Full | \
-				 SUPPORTED_100baseT_Half | \
-				 SUPPORTED_100baseT_Full | \
-				 SUPPORTED_Autoneg | \
+#define PHY_DEFAULT_FEATURES	(SUPPORTED_Autoneg | \
 				 SUPPORTED_TP | \
 				 SUPPORTED_MII)
 
-#define PHY_GBIT_FEATURES	(PHY_BASIC_FEATURES | \
-				 SUPPORTED_1000baseT_Half | \
+#define PHY_10BT_FEATURES	(SUPPORTED_10baseT_Half | \
+				 SUPPORTED_10baseT_Full)
+
+#define PHY_100BT_FEATURES	(SUPPORTED_100baseT_Half | \
+				 SUPPORTED_100baseT_Full)
+
+#define PHY_1000BT_FEATURES	(SUPPORTED_1000baseT_Half | \
 				 SUPPORTED_1000baseT_Full)
 

include/phy.h line 42

Quoted 10 lines
include/phy.h +7 -0
+#define PHY_BASIC_FEATURES	(PHY_10BT_FEATURES | \
+				 PHY_100BT_FEATURES | \
+				 PHY_DEFAULT_FEATURES)
+
+#define PHY_GBIT_FEATURES	(PHY_BASIC_FEATURES | \
+				 PHY_1000BT_FEATURES)
+
 #define PHY_10G_FEATURES	(PHY_GBIT_FEATURES | \
 				SUPPORTED_10000baseT_Full)
 

Any chance for this one to be applied?

-Alexey