Skip to content

Commit

Permalink
davinci_emac: Add Carrier Link OK check in Davinci RX Handler
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hegde, Vinay authored and David S. Miller committed Feb 28, 2011
1 parent b746f7e commit 0a5f384
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/davinci_emac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0a5f384

Please sign in to comment.