[PATCH] RE: FCC Ethernet startup crash

Stefan Nickl Stefan.Nickl at kontron.com
Mon Apr 11 19:19:57 EST 2005


On Fri, 2005-04-08 at 09:39 -0500, Rune Torgersen wrote:
> I'm not sure what is going on, but that patch causes me to get "eth0: tx
> queue full!." messages as soon as I try to use the ethernet
> (Same thing happened if I just tried to remove the fcc_restart from
> init_fcc_startup)

Well ...

I don't like to make up theories I can't test but I guess what's going
on is this: fcc_restart() does two things, it sets up the transmit
machinery by calling fcc_stop() (fep->tx_free = TX_RING_SIZE;), and it
actually turns on the FCC.

I'm not a network driver guru but from what we've seen I'd say when the
driver calls netif_start_queue(), it
1) must already be prepared to xmit
2) must not call fcc_enet_rx() before

So fcc_restart() needed to be split up because calling it before
netif_start_queue() has the risk of rx'ing a packet too early, and
calling it afterwards is too late for the tx side.
Maybe it'd already help to add "fep->tx_free = TX_RING_SIZE;" to the
tx_bd init in init_fcc_param()...

But regarding my current indisposition with hardware, I'd suggest to
choose the smaller of the two evils, that is calling fcc_restart()
before starting the queue, leaving but a tiny race condition on rx side.

Signed-off-by: Stefan Nickl <Stefan.Nickl at kontron.com>

-- 
Stefan Nickl
Kontron Modular Computers

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fcc_enet_startup_crash_v3.patch
Type: text/x-patch
Size: 1828 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20050411/be622f17/attachment.bin 


More information about the Linuxppc-embedded mailing list