linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* ethernet works only the first time
@ 2002-05-23  1:00 NBLIST
  2002-05-23 13:46 ` John W. Linville
  0 siblings, 1 reply; 2+ messages in thread
From: NBLIST @ 2002-05-23  1:00 UTC (permalink / raw)
  To: linuxppc-embedded


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


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ethernet works only the first time
  2002-05-23  1:00 ethernet works only the first time NBLIST
@ 2002-05-23 13:46 ` John W. Linville
  0 siblings, 0 replies; 2+ messages in thread
From: John W. Linville @ 2002-05-23 13:46 UTC (permalink / raw)
  To: NBLIST; +Cc: linuxppc-embedded

[-- 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;
 	}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-05-23 13:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-23  1:00 ethernet works only the first time NBLIST
2002-05-23 13:46 ` John W. Linville

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).