Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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;
	}
	}