mirror of
https://github.com/torvalds/linux.git
synced 2026-09-12 12:34:02 +02:00
net: ethernet: oa_tc6: Disable tx queues on fatal error
Previously, TX queue interface was stopped when
disable_traffic flag was set, which would indicate fatal
error. It is more appropriate to disable the queue as,
unless driver is unloaded and reloaded, there is no recovery
after disable_traffic is set.
Queues may be re-enabled inadvertently by other layers.
Intention of disable_traffic is only to stop the traffic
from flowing on fatal error.
Fixes: b542d13fab ("net: ethernet: oa_tc6: Interrupt is active low, level triggered.")
Signed-off-by: Selvamani Rajagopal <Selvamani.Rajagopal@onsemi.com>
Link: https://patch.msgid.link/20260824-fix-race-condition-and-crash-v7-3-4323279b18f2@onsemi.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
172c974113
commit
349c366365
|
|
@ -771,6 +771,10 @@ static void oa_tc6_disable_traffic(struct oa_tc6 *tc6)
|
|||
skb = oa_tc6_detach_waiting_tx_skb(tc6);
|
||||
spin_unlock_bh(&tc6->tx_skb_lock);
|
||||
|
||||
/* disable_traffic, when set, is a point of no return to
|
||||
* working state. Keeping the TX queues disabled.
|
||||
*/
|
||||
netif_tx_disable(tc6->netdev);
|
||||
oa_tc6_drop_tx_skb(tc6, skb);
|
||||
oa_tc6_free_ongoing_skbs(tc6);
|
||||
oa_tc6_write_register(tc6, OA_TC6_REG_INT_MASK0, regval);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user