From: "John W. Linville" <linville@lvl7.com>
To: NBLIST@sbcglobal.net
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: ethernet works only the first time
Date: Thu, 23 May 2002 09:46:03 -0400 [thread overview]
Message-ID: <3CECF29B.FEA9EAAD@lvl7.com> (raw)
In-Reply-To: AA-0296B6B7975FF39FEDDBA26C4B9351E2-ZZ@homebase1.prodigy.net
[-- Attachment #1: Type: text/plain, Size: 1058 bytes --]
This sounds exactly like a problem we (and our customers) have seen
here. One of our guys coded-up a fix. I'm attaching it as a diff
against the fec.c that shipped with the 2.4.2_hhl20 kernel (i.e. HardHat
2.0 from MontaVista). I've included 10 lines of context in either
direction to help you place it in your own fec.c version.
I didn't code this myself, so don't blame me if it causes problems! :-)
John
NBLIST@sbcglobal.net wrote:
>
> Hello all,
>
> I am using the fec on the MPC855T on my custom board.
> I seem to be having some weird ethernet configuration
> problems. My eth0 interface comes up only the first
> time. If I "ifconfig down" the eth0 and bring it back
> up by doing "ifconfig up", the eth0 interface shows up
> fine. But ethernet doesnt work anymore. After a couple
> of minutes, I get "tx buffer full" error messages. But
> it always works the first time I boot the linux kernel
> and bring up etho using ifconfig.
>
> What's going on here? Any ideas, clues, tips????
>
> Thank you,
> NB
>
--
John W. Linville
LVL7 Systems, Inc.
[-- Attachment #2: fec.c.patch --]
[-- Type: text/plain, Size: 638 bytes --]
--- fec.c.old Thu May 23 09:34:27 2002
+++ fec.c Thu May 23 09:34:38 2002
@@ -1861,20 +1861,26 @@
bdp->cbd_sc = 0;
bdp->cbd_bufaddr = 0;
bdp++;
}
/* Set the last buffer to wrap.
*/
bdp--;
bdp->cbd_sc |= BD_SC_WRAP;
+ /* Since we have re-initialized the buffer pool, the ring is no longer
+ * full.
+ */
+ fep->tx_full = 0;
+ netif_wake_queue(dev);
+
/* Enable MII mode.
*/
if (duplex) {
fecp->fec_r_cntrl = FEC_RCNTRL_MII_MODE; /* MII enable */
fecp->fec_x_cntrl = FEC_TCNTRL_FDEN; /* FD enable */
}
else {
fecp->fec_r_cntrl = FEC_RCNTRL_MII_MODE | FEC_RCNTRL_DRT;
fecp->fec_x_cntrl = 0;
}
prev parent reply other threads:[~2002-05-23 13:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-23 1:00 ethernet works only the first time NBLIST
2002-05-23 13:46 ` John W. Linville [this message]
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=3CECF29B.FEA9EAAD@lvl7.com \
--to=linville@lvl7.com \
--cc=NBLIST@sbcglobal.net \
--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;
as well as URLs for NNTP newsgroup(s).