Subject: [PATCH][PPC32] Fix gianfar netdriver oops when using bootp...

From: Gerhard Jaeger <[email-masked]>
Date: Wed, 1 Dec 2004 17:07:14 +0100

Hi,

this patch fixes an issue, that occurs on my MPC8541CDS, when trying to
use bootp to get the IP parameters. It seems, that the patch only cures
the symptom but obviously not the cause ;)

Signed-off-by: Gerhard Jaeger <[email-masked]>

--- linux-2.6.10-rc2-mm4/drivers/net/gianfar.c.orig	2004-11-15 02:26:34.000000000 +0100
+++ linux-2.6.10-rc2-mm4/drivers/net/gianfar.c	2004-12-01 17:00:19.000000000 +0100
@@ -1477,6 +1477,9 @@ static void gfar_phy_change(void *data)
 	struct gfar_private *priv = netdev_priv(dev);
 	int result = 0;
 
+	if( !priv->mii_info->phyinfo )
+		return;
+
 	/* Delay to give the PHY a chance to change the
 	 * register state */
 	msleep(1);