Commit 0a5f3846 authored by Hegde, Vinay's avatar Hegde, Vinay Committed by David S. Miller

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: default avatarHegde, Vinay <vinay.hegde@ti.com>
Acked-by: default avatarCyril Chemparathy <cyril@ti.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b746f7e5
...@@ -1008,7 +1008,7 @@ static void emac_rx_handler(void *token, int len, int status) ...@@ -1008,7 +1008,7 @@ static void emac_rx_handler(void *token, int len, int status)
int ret; int ret;
/* free and bail if we are shutting down */ /* 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); dev_kfree_skb_any(skb);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment