Re: Re: [PATCH][PPC32] 2.4.27: fixes for 8xx fec.c

From: Harald Küthe
Date: Tue Aug 10 2004 - 07:00:44 EST


Hi Florian

well you are right thank you.
Now the patch looks like:

diff -urN linux-2.4.27.orig/arch/ppc/8xx_io/fec.c linux-2.4.27/arch/ppc/8xx_io/fec.c
--- linux-2.4.27.orig/arch/ppc/8xx_io/fec.c 2003-11-28 19:26:18.000000000 +0100
+++ linux-2.4.27/arch/ppc/8xx_io/fec.c 2004-08-10 13:54:06.000000000 +0200
@@ -1466,6 +1466,8 @@
return -ENODEV; /* No PHY we understand */
#else
fep->link = 1;
+ /* after ifconfig down and up fec will not start -> restart it */
+ fec_restart (dev, 0);
netif_start_queue(dev);
return 0; /* Success */
#endif /* CONFIG_USE_MDIO */
@@ -2049,6 +2051,9 @@
fecp->fec_imask = ( FEC_ENET_TXF | FEC_ENET_TXB |
FEC_ENET_RXF | FEC_ENET_RXB | FEC_ENET_MII );

+ /* set old promiscuous/multicast settings which are lost above */
+ set_multicast_list(dev);
+
/* And last, enable the transmit and receive processing.
*/
fecp->fec_ecntrl = FEC_ECNTRL_PINMUX | FEC_ECNTRL_ETHER_EN;


Reagrds
Harald

>>> Florian Schirmer <jolt@xxxxxxxxxx> 10.08.04 10:42:12 >>>
Hi,

>+
>+#ifndef CONFIG_USE_MDIO
>+ fec_restart (dev, 0);
>+#endif
>+
> netif_start_queue(dev);
> return 0; /* Success */
> #endif /* CONFIG_USE_MDIO */
>
>

Just a minor hint: you don't need the #ifndef CONFIG_USE_MDIO guard
since you're already in the non MDIO branch (see #endif comment).

Greetings,
Florian

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/