Skip to contentSkip to conversation

Freescale t104x: Do not exclude SGMII

PATCH New Joakim Tjernlund 2 participants 3 messages Oct 24, 2014 – Dec 5, 2014 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Freescale t104x: Do not exclude SGMII

fman_port_enet_if() tests if FM1_DTSEC2 or FM1_DTSEC4 uses RGMII or MII and if not returns PHY_INTERFACE_MODE_NONE. This excludes testing for SGMII further down.

Remove the unconditional "else return PHY_INTERFACE_MODE_NONE" so SGMII can be tested too.

---
 drivers/net/fm/t1040.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/net/fm/t1040.c +0 -4
index 4cce46d..d2a097e 100644
@@ -25,8 +25,6 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
 		else if ((rcwsr13 & FSL_CORENET_RCWSR13_EC1) ==
 				FSL_CORENET_RCWSR13_EC1_FM1_DTSEC4_MII)
 			return PHY_INTERFACE_MODE_MII;
-		else
-			return PHY_INTERFACE_MODE_NONE;
 	}
 
 	if ((port == FM1_DTSEC4) &&
@@ -38,8 +36,6 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
 		else if ((rcwsr13 & FSL_CORENET_RCWSR13_EC1) ==
 				FSL_CORENET_RCWSR13_EC1_FM1_DTSEC4_MII)
 			return PHY_INTERFACE_MODE_MII;
-		else
-			return PHY_INTERFACE_MODE_NONE;
 	}
 
 	if (port == FM1_DTSEC5) {
Signature · 1 line
1.8.5.5
#1 lore raw

PATCH 1/1 Freescale t104x: Do not exclude SGMII

Quoted 27 lines · Joakim Tjernlund

fman_port_enet_if() tests if FM1_DTSEC2 or FM1_DTSEC4 uses RGMII or MII and if not returns PHY_INTERFACE_MODE_NONE. This excludes testing for SGMII further down.

Remove the unconditional "else return PHY_INTERFACE_MODE_NONE" so SGMII can be tested too.

---
 drivers/net/fm/t1040.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/net/fm/t1040.c +0 -2
index 4cce46d..d2a097e 100644
@@ -25,8 +25,6 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
 		else if ((rcwsr13 & FSL_CORENET_RCWSR13_EC1) ==
 				FSL_CORENET_RCWSR13_EC1_FM1_DTSEC4_MII)
 			return PHY_INTERFACE_MODE_MII;
-		else
-			return PHY_INTERFACE_MODE_NONE;
 	}
 
 	if ((port == FM1_DTSEC4) &&

drivers/net/fm/t1040.c phy_interface_t fman_port_enet_if(enum fm_port port) · line 41

Quoted 8 lines
drivers/net/fm/t1040.c +0 -2
@@ -38,8 +36,6 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
 		else if ((rcwsr13 & FSL_CORENET_RCWSR13_EC1) ==
 				FSL_CORENET_RCWSR13_EC1_FM1_DTSEC4_MII)
 			return PHY_INTERFACE_MODE_MII;
-		else
-			return PHY_INTERFACE_MODE_NONE;
 	}
 
 	if (port == FM1_DTSEC5) {

Prabhakar,

Can you test/ack this patch?

York

#2 lore raw

PATCH 1/1 Freescale t104x: Do not exclude SGMII

In reply to Joakim Tjernlund
Quoted 9 lines · Joakim Tjernlund

fman_port_enet_if() tests if FM1_DTSEC2 or FM1_DTSEC4 uses RGMII or MII and if not returns PHY_INTERFACE_MODE_NONE. This excludes testing for SGMII further down.

Remove the unconditional "else return PHY_INTERFACE_MODE_NONE" so SGMII can be tested too.

---

Applied to u-boot-mpc85xx, awaiting upstream.

York