Skip to contentSkip to conversation

net: phy: dp83848: Support ethernet pause frames

PATCH Superseded Jesper Nilsson 3 participants 5 messages Dec 2, 2016 – Dec 5, 2016

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

PATCH 1/1 net: phy: dp83848: Support ethernet pause frames

According to the documentation, the PHYs supported by this driver can also support pause frames. Announce this to be so. Tested with a TI83822I.

---
 drivers/net/phy/dp83848.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/phy/dp83848.c +2 -1
index 800b39f..6e4117f 100644
@@ -88,7 +88,8 @@ MODULE_DEVICE_TABLE(mdio, dp83848_tbl);
 		.phy_id		= _id,				\
 		.phy_id_mask	= 0xfffffff0,			\
 		.name		= _name,			\
-		.features	= PHY_BASIC_FEATURES,		\
+		.features	= (PHY_BASIC_FEATURES |		\
+			SUPPORTED_Pause | SUPPORTED_Asym_Pause),\
 		.flags		= PHY_HAS_INTERRUPT,		\
 								\
 		.soft_reset	= genphy_soft_reset,		\
Signature · 6 lines
2.1.4


/^JN - Jesper Nilsson
-- 
               Jesper Nilsson -- [email protected]
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Jesper Nilsson

According to the documentation, the PHYs supported by this driver can also support pause frames. Announce this to be so. Tested with a TI83822I.

Looks like all PHYs supported by this driver do, so:

Quoted 10 lines
---
 drivers/net/phy/dp83848.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/phy/dp83848.c +0 -0
index 800b39f..6e4117f 100644

drivers/net/phy/dp83848.c MODULE_DEVICE_TABLE(mdio, dp83848_tbl); · line 92

Quoted 6 lines
drivers/net/phy/dp83848.c +2 -1
@@ -88,7 +88,8 @@ MODULE_DEVICE_TABLE(mdio, dp83848_tbl);
 		.phy_id		= _id,				\
 		.phy_id_mask	= 0xfffffff0,			\
 		.name		= _name,			\
-		.features	= PHY_BASIC_FEATURES,		\
+		.features	= (PHY_BASIC_FEATURES |		\
+			SUPPORTED_Pause | SUPPORTED_Asym_Pause),\

Aligning these may look nicer though.

Quoted 4 lines
drivers/net/phy/dp83848.c +0 -0
 		.flags		= PHY_HAS_INTERRUPT,		\
 								\
 		.soft_reset	= genphy_soft_reset,		\
#2 lore raw
Quoted 15 lines · Andrew F. Davis
Quoted 4 lines · Jesper Nilsson

According to the documentation, the PHYs supported by this driver can also support pause frames. Announce this to be so. Tested with a TI83822I.

Looks like all PHYs supported by this driver do, so:

Quoted 5 lines
---
 drivers/net/phy/dp83848.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 13 lines

drivers/net/phy/dp83848.c MODULE_DEVICE_TABLE(mdio, dp83848_tbl); · line 92

Quoted 11 lines
drivers/net/phy/dp83848.c +2 -1
index 800b39f..6e4117f 100644
@@ -88,7 +88,8 @@ MODULE_DEVICE_TABLE(mdio, dp83848_tbl);
 		.phy_id		= _id,				\
 		.phy_id_mask	= 0xfffffff0,			\
 		.name		= _name,			\
-		.features	= PHY_BASIC_FEATURES,		\
+		.features	= (PHY_BASIC_FEATURES |		\
+			SUPPORTED_Pause | SUPPORTED_Asym_Pause),\

Aligning these may look nicer though.

Agreed, will send a v2.

Quoted 4 lines

drivers/net/phy/dp83848.c MODULE_DEVICE_TABLE(mdio, dp83848_tbl); · line 95

Quoted 4 lines
drivers/net/phy/dp83848.c +0 -0
 		.flags		= PHY_HAS_INTERRUPT,		\
 								\
 		.soft_reset	= genphy_soft_reset,		\

/^JN - Jesper Nilsson

Signature · 1 line
               Jesper Nilsson -- [email protected]
#3 lore raw

PATCH v2 1/1 net: phy: dp83848: Support ethernet pause frames

In reply to Jesper Nilsson

According to the documentation, the PHYs supported by this driver can also support pause frames. Announce this to be so. Tested with a TI83822I.

---
 drivers/net/phy/dp83848.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/phy/dp83848.c +3 -1
index 800b39f..320d0dc 100644
@@ -88,7 +88,9 @@ MODULE_DEVICE_TABLE(mdio, dp83848_tbl);
 		.phy_id		= _id,				\
 		.phy_id_mask	= 0xfffffff0,			\
 		.name		= _name,			\
-		.features	= PHY_BASIC_FEATURES,		\
+		.features	= (PHY_BASIC_FEATURES |		\
+				   SUPPORTED_Pause |		\
+				   SUPPORTED_Asym_Pause),	\
 		.flags		= PHY_HAS_INTERRUPT,		\
 								\
 		.soft_reset	= genphy_soft_reset,		\
Signature · 6 lines
2.1.4


/^JN - Jesper Nilsson
-- 
               Jesper Nilsson -- [email protected]