Skip to content

Commit 0a5f384

Browse files
Hegde, Vinaydavem330
authored andcommitted
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>
1 parent b746f7e commit 0a5f384

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/net/davinci_emac.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ static void emac_rx_handler(void *token, int len, int status)
10081008
int ret;
10091009

10101010
/* free and bail if we are shutting down */
1011-
if (unlikely(!netif_running(ndev))) {
1011+
if (unlikely(!netif_running(ndev) || !netif_carrier_ok(ndev))) {
10121012
dev_kfree_skb_any(skb);
10131013
return;
10141014
}

0 commit comments

Comments
 (0)