diff options
author | Hegde, Vinay <vinay.hegde@ti.com> | 2011-02-24 23:56:28 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-28 13:16:14 -0800 |
commit | 0a5f38467765ee15478db90d81e40c269c8dda20 (patch) | |
tree | 457eb509ff4266d766cd8ec9de4a0b67d68d9f8f | |
parent | b746f7e52fe33ce66ea0cf6127838eff507839ff (diff) | |
download | linux-stable-0a5f38467765ee15478db90d81e40c269c8dda20.tar.gz linux-stable-0a5f38467765ee15478db90d81e40c269c8dda20.tar.bz2 linux-stable-0a5f38467765ee15478db90d81e40c269c8dda20.zip |
davinci_emac: Add Carrier Link OK check in Davinci RX Handler
This patch adds an additional check in the Davinci EMAC RX Handler,
which tests the __LINK_STATE_NOCARRIER flag along with the
__LINK_STATE_START flag as part EMAC shutting down procedure.
This avoids
WARNING: at drivers/net/davinci_emac.c:1040 emac_rx_handler+0xf8/0x120()
during rtcwake used to suspend the target for a specified duration.
Signed-off-by: Hegde, Vinay <vinay.hegde@ti.com>
Acked-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/davinci_emac.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index 2a628d17d178..7018bfe408a4 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -1008,7 +1008,7 @@ static void emac_rx_handler(void *token, int len, int status) int ret; /* free and bail if we are shutting down */ - if (unlikely(!netif_running(ndev))) { + if (unlikely(!netif_running(ndev) || !netif_carrier_ok(ndev))) { dev_kfree_skb_any(skb); return; } |