Skip to contentSkip to conversation

net/4xx: Install interrupt handler after driver registration

PATCH New Stefan Roese 1 participant 2 messages Jul 12, 2011 – Jul 28, 2011 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/4xx: Install interrupt handler after driver registration

Only install der 4xx-EMAC interrupt handlers *after* the core network driver is registered.

This problem was noticed on the APM Taishan 440GX board, where the board hung upon bootup after displaying "Net:".

---
 drivers/net/4xx_enet.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
drivers/net/4xx_enet.c +7 -7
index b1763b1..f328574 100644
@@ -2035,6 +2035,13 @@ int ppc_4xx_eth_initialize (bd_t * bis)
 		dev->send = ppc_4xx_eth_send;
 		dev->recv = ppc_4xx_eth_rx;
 
+		eth_register(dev);
+
+#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
+		miiphy_register(dev->name,
+				emac4xx_miiphy_read, emac4xx_miiphy_write);
+#endif
+
 		if (0 == virgin) {
 			/* set the MAL IER ??? names may change with new spec ??? */
 #if defined(CONFIG_440SPE) || \
@@ -2072,13 +2079,6 @@ int ppc_4xx_eth_initialize (bd_t * bis)
 					     dev);
 			virgin = 1;
 		}
-
-		eth_register (dev);
-
-#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
-		miiphy_register (dev->name,
-				 emac4xx_miiphy_read, emac4xx_miiphy_write);
-#endif
 	}			/* end for each supported device */
 
 	return 0;
Signature · 1 line
1.7.6
#1 lore raw

PATCH 1/1 net/4xx: Install interrupt handler after driver registration

Quoted 5 lines · On Tuesday 12 July 2011 13:26:47 Stefan Roese wrote:

Only install der 4xx-EMAC interrupt handlers *after* the core network driver is registered.

This problem was noticed on the APM Taishan 440GX board, where the board hung upon bootup after displaying "Net:".

Applied to u-boot-ppc4xx.

Thanks,
Stefan

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de