mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 21:34:07 +08:00
drivers/net/{e1000|igc}: do not touch RX/TX rings when link status change
Do not reset RX/TX rings when link status change. This can break internal card state which is impossible to recovery. Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
This commit is contained in:
committed by
Xiang Xiao
parent
bccee707d6
commit
7a8ac49836
+1
-5
@@ -757,15 +757,11 @@ static void e1000_link_work(FAR void *arg)
|
||||
ninfo("Link up, status = 0x%x\n", tmp);
|
||||
|
||||
netdev_lower_carrier_on(&priv->dev);
|
||||
|
||||
/* Clear Tx and RX rings */
|
||||
|
||||
e1000_txclean(priv);
|
||||
e1000_rxclean(priv);
|
||||
}
|
||||
else
|
||||
{
|
||||
ninfo("Link down\n");
|
||||
|
||||
netdev_lower_carrier_off(&priv->dev);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-5
@@ -711,16 +711,13 @@ static void igc_link_work(FAR void *arg)
|
||||
if (tmp & IGC_STATUS_LU)
|
||||
{
|
||||
ninfo("Link up, status = 0x%x\n", tmp);
|
||||
|
||||
netdev_lower_carrier_on(&priv->dev);
|
||||
|
||||
/* Clear Tx and RX rings */
|
||||
|
||||
igc_txclean(priv);
|
||||
igc_rxclean(priv);
|
||||
}
|
||||
else
|
||||
{
|
||||
ninfo("Link down\n");
|
||||
|
||||
netdev_lower_carrier_off(&priv->dev);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user