Skip to contentSkip to conversation

net: phy: mscc: the extended page access register is 16 bits

PATCH Applied Quentin Schulz 5 participants 6 messages Jul 30, 2018 – Jul 31, 2018

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

PATCH 1/1 net: phy: mscc: the extended page access register is 16 bits

The Extended Page Access is a 16-bit register, so change the page parameter of vsc85xx_phy_page_set to a u16.

---
 drivers/net/phy/mscc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/mscc.c +1 -1
index 650c2667d523..84ca9ff40ae0 100644
@@ -123,7 +123,7 @@ static const struct vsc8531_edge_rate_table edge_table[] = {
 };
 #endif /* CONFIG_OF_MDIO */
 
-static int vsc85xx_phy_page_set(struct phy_device *phydev, u8 page)
+static int vsc85xx_phy_page_set(struct phy_device *phydev, u16 page)
 {
 	int rc;
 
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#2 lore raw
In reply to Quentin Schulz
Quoted 4 lines · Quentin Schulz

The Extended Page Access is a 16-bit register, so change the page parameter of vsc85xx_phy_page_set to a u16.

Quoted 20 lines
---
 drivers/net/phy/mscc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/mscc.c +1 -1
index 650c2667d523..84ca9ff40ae0 100644
@@ -123,7 +123,7 @@ static const struct vsc8531_edge_rate_table edge_table[] = {
 };
 #endif /* CONFIG_OF_MDIO */
 
-static int vsc85xx_phy_page_set(struct phy_device *phydev, u8 page)
+static int vsc85xx_phy_page_set(struct phy_device *phydev, u16 page)
 {
 	int rc;
 
Signature · 1 line
2.17.1
Signature · 3 lines
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw
In reply to Quentin Schulz
Quoted 4 lines · Quentin Schulz

The Extended Page Access is a 16-bit register, so change the page parameter of vsc85xx_phy_page_set to a u16.

Since you targeted net-next for this patch, I am assuming this is not yet a problem, but would soon be one with the changes you plan on introducing?

Quoted 18 lines
---
 drivers/net/phy/mscc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/mscc.c +1 -1
index 650c2667d523..84ca9ff40ae0 100644
@@ -123,7 +123,7 @@ static const struct vsc8531_edge_rate_table edge_table[] = {
 };
 #endif /* CONFIG_OF_MDIO */
 
-static int vsc85xx_phy_page_set(struct phy_device *phydev, u8 page)
+static int vsc85xx_phy_page_set(struct phy_device *phydev, u16 page)
 {
 	int rc;
 
Signature · 1 line
Florian
#5 lore raw

Hi Florian,

Quoted 10 lines · Florian Fainelli
Quoted 4 lines · Quentin Schulz

The Extended Page Access is a 16-bit register, so change the page parameter of vsc85xx_phy_page_set to a u16.

Since you targeted net-next for this patch, I am assuming this is not yet a problem, but would soon be one with the changes you plan on introducing?

Yes indeed. When I get the quad-port PHY things to go as planned, then I'll need sometimes to change to a page that is above the size of a u16. For now, all the pages are accessed with a number that is lower than the size of a u16, so it isn't a problem.

Quentin