From b8dc64ffed842b41246cd8a777a1e816570bb8ac Mon Sep 17 00:00:00 2001 From: Jukka Laitinen Date: Fri, 29 Jan 2021 13:28:12 +0200 Subject: [PATCH] drivers/net/encx24j600.c: Correct setting of ifstate The ifstate is already set in enc_ifup -> enc_reset -> enc_linkstatus The ifstate after this call is either ENCSTATE_RUNNING or ENCSTATE_UP If ifstate is ENCSTATE_RUNNING, it would be wrong to set it to ENCSTATE_UP; this would lead to enc_txavail never invoking the driver callback, causing very long latencies in sending. Signed-off-by: Jukka Laitinen --- drivers/net/encx24j600.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/encx24j600.c b/drivers/net/encx24j600.c index bafb8d82c89..7769cb0df41 100644 --- a/drivers/net/encx24j600.c +++ b/drivers/net/encx24j600.c @@ -2272,11 +2272,8 @@ static int enc_ifup(struct net_driver_s *dev) wd_start(&priv->txpoll, ENC_WDDELAY, enc_polltimer, (wdparm_t)priv); - /* Mark the interface up and enable the Ethernet interrupt at the - * controller - */ + /* Enable the Ethernet interrupt at the controller */ - priv->ifstate = ENCSTATE_UP; priv->lower->enable(priv->lower); }