Hi Philippe,

If the link goes down, netif_tx_disable() should be called. Then you wouldn't have to worry about your hard_start_xmit function being called when the link is known to be down.

Mike



Philippe De Muyter wrote:
Hi Greg,

Currently, when the link is down, we make the kernel save the message to xmit
and try again later.  This is bad, because we eat up memory and, when
the link comes back, we send old messages.  Change that : when the link
is down, pretend the message is sent, but discard it.

Signed-off-by: Philippe De Muyter <[EMAIL PROTECTED]>

diff -r f8b279fd0eab drivers/net/fec.c
--- a/drivers/net/fec.c Mon Mar 19 20:20:56 2007 -0700
+++ b/drivers/net/fec.c Mon Mar 26 18:02:37 2007 +0200
@@ -316,7 +316,8 @@ fec_enet_start_xmit(struct sk_buff *skb,
if (!fep->link) {
                /* Link is down or autonegotiation is in progress. */
-               return 1;
+               dev_kfree_skb(skb);
+               return 0;
        }
/* Fill in a Tx ring entry */
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to