net: ti cpsw ethernet: set IFCTL_A bit in MACCONTROL
Subsystems (3)
PATCH v2 1/1 net: ti cpsw ethernet: set IFCTL_A bit in MACCONTROL
For RMII/RGMII mode operation in 100Mbps, the CPSW needs to set the IFCTL_A bits in the MACCONTROL register. For all other PHY modes, this bit is unused, so setting it unconditionally shouldn't cause any trouble.
--- drivers/net/ethernet/ti/cpsw.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/ethernet/ti/cpsw.c +5 -0
@@ -386,6 +386,11 @@ static void _cpsw_adjust_link(struct cpsw_slave *slave, mac_control |=BIT (7 );/* GIGABITEN */ if (phy->duplex) mac_control |=BIT (0 );/* FULLDUPLEXEN */ + +/* set speed_in input in case RMII mode is used in 100Mbps */ +if (phy->speed ==100 ) + mac_control |=BIT (15 ); + *link = true; }else { mac_control =0 ;
Signature · 1 line
1.7.11.4
Quoted 9 lines · Daniel Mack
For RMII/RGMII mode operation in 100Mbps, the CPSW needs to set the
IFCTL_Abits in the MACCONTROL register. For all other PHY modes, this bit is unused, so setting it unconditionally shouldn't cause any trouble.Signed-off-by Daniel Mack <[email protected]>Cc Mugunthan V N <[email protected]>Cc Vaibhav Hiremath <[email protected]>Cc David S. Miller <[email protected]>
Mugunthan, are you ok with this version? Don't know if it's too late for the 3.7 spin though, given that the merge window just opened.
Daniel
Quoted 21 lines
--- drivers/net/ethernet/ti/cpsw.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/net/ethernet/ti/cpsw.c +5
-0@@ -386,6 +386,11 @@ static void _cpsw_adjust_link(struct cpsw_slave *slave, mac_control |=BIT (7 );/* GIGABITEN */ if (phy->duplex) mac_control |=BIT (0 );/* FULLDUPLEXEN */ + +/* set speed_in input in case RMII mode is used in 100Mbps */ +if (phy->speed ==100 ) + mac_control |=BIT (15 ); + *link = true; }else { mac_control =0 ;
Quoted 21 lines
-----Original Message-----
From: Daniel Mack [mailto:[email protected]]
Sent: Monday, October 01, 2012 2:55 PM
To: Daniel Mack
Cc: [email protected]; N, Mugunthan V; Hiremath, Vaibhav; David S. Miller
Subject: Re: [PATCH v2] net: ti cpsw ethernet: setIFCTL_Abit in MACCONTROLQuoted 2 lines · Daniel Mack
For RMII/RGMII mode operation in 100Mbps, the CPSW needs to set the
IFCTL_Abits in the MACCONTROL register. For all other PHY modes,this
Quoted 7 lines
bit is unused, so setting it unconditionally shouldn't cause any trouble.
Signed-off-by Daniel Mack <[email protected]>Cc Mugunthan V N <[email protected]>Cc Vaibhav Hiremath <[email protected]>Cc David S. Miller <[email protected]>
Quoted 6 lines
Mugunthan, are you ok with this version? Don't know if it's too late for
the 3.7 spin though, given that the merge window just opened.Daniel
I am ok with the patch
Regards
Mugunthan V N
Quoted 26 lines
Review
Quoted 7 lines
--- drivers/net/ethernet/ti/cpsw.c | 5 +++++ 1 file changed, 5 insertions(+)(quoted diff) +0
-0
b/drivers/net/ethernet/ti/cpsw.cdrivers/net/ethernet/ti/cpsw.c static void _cpsw_adjust_link(struct cpsw_slave
Quoted 4 lines
index aa78168..fb1a692 100644
drivers/net/ethernet/ti/cpsw.c +0
-0@@ -386,6 +386,11 @@ static void _cpsw_adjust_link(struct cpsw_slave*slave,
drivers/net/ethernet/ti/cpsw.c static void _cpsw_adjust_link(struct cpsw_slave *slave,
Quoted 5 lines
drivers/net/ethernet/ti/cpsw.c +2
-0mac_control |=BIT (7 );/* GIGABITEN */ if (phy->duplex) mac_control |=BIT (0 );/* FULLDUPLEXEN */ + +/* set speed_in input in case RMII mode is used in 100Mbps */
Quoted 7 lines
drivers/net/ethernet/ti/cpsw.c +3
-0+if (phy->speed ==100 ) + mac_control |=BIT (15 ); + *link = true; }else { mac_control =0 ;
From: Daniel Mack <[email protected]>
Date: Thu, 27 Sep 2012 21:19:34 +0200
Quoted 6 lines
For RMII/RGMII mode operation in 100Mbps, the CPSW needs to set the
IFCTL_Abits in the MACCONTROL register. For all other PHY modes, this bit is unused, so setting it unconditionally shouldn't cause any trouble.Signed-off-by Daniel Mack <[email protected]>
Applied.