From: "Harald Küthe" <Harald.Kuethe@controlware.de>
To: <linuxppc-embedded@lists.linuxppc.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH][PPC32] 2.4.27: fixes for 8xx fec.c
Date: Tue, 10 Aug 2004 09:58:16 +0200 [thread overview]
Message-ID: <s1189c52.091@post2.controlware.de> (raw)
Hi
I found two problems concerning the fast ethernet driver
for ppc 8xx processors (fec.c) in linux kernel version 2.4.26/27
and I think in the 2.6 series as well (not confirmed).
First problem is only when CONFIG_USE_MDIO is __not__ set.
How to reproduce:
start the system with fec ethernet, everything works,
issue a ifconfig ethX down and ifconfig ethX up and ethernet is not working anymore.
Fix (or at least a workaround). In fec_enet_open() add a fec_restart() at the end
if CONFIG_USE_MDIO is not set.
2nd problem is with CONFIG_USE_MDIO set:
The promiscuous mode/multicast settings are getting lost if link status changes occurs
How to reproduce:
build a bridge with the fec device. Then simply unplug and replug the ethernet cable.
fec_restart() is called which idles all promiscuous mode/multicast settings.
The bridge will then only forward broadcast frames because the promiscuous setting is lost.
Fix: call set_multicast_list(dev) at the end of fec_restart() before ethernet is reenabled.
If there are more questions please write back.
Please CC me as I'm not subscribed to the lists
Regards
Harald
Here are the fixes:
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 09:16:00.000000000 +0200
@@ -1466,6 +1466,11 @@
return -ENODEV; /* No PHY we understand */
#else
fep->link = 1;
+
+#ifndef CONFIG_USE_MDIO
+ fec_restart (dev, 0);
+#endif
+
netif_start_queue(dev);
return 0; /* Success */
#endif /* CONFIG_USE_MDIO */
@@ -2049,6 +2054,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;
next reply other threads:[~2004-08-10 7:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-10 7:58 Harald Küthe [this message]
2004-08-10 8:42 ` [PATCH][PPC32] 2.4.27: fixes for 8xx fec.c Florian Schirmer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s1189c52.091@post2.controlware.de \
--to=harald.kuethe@controlware.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-embedded@lists.linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox