Skip to content

Commit 5e34480

Browse files
Shenwei WangPaolo Abeni
authored andcommitted
net: fec: fix the unhandled context fault from smmu
When repeatedly changing the interface link speed using the command below: ethtool -s eth0 speed 100 duplex full ethtool -s eth0 speed 1000 duplex full The following errors may sometimes be reported by the ARM SMMU driver: [ 5395.035364] fec 5b040000.ethernet eth0: Link is Down [ 5395.039255] arm-smmu 51400000.iommu: Unhandled context fault: fsr=0x402, iova=0x00000000, fsynr=0x100001, cbfrsynra=0x852, cb=2 [ 5398.108460] fec 5b040000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off It is identified that the FEC driver does not properly stop the TX queue during the link speed transitions, and this results in the invalid virtual I/O address translations from the SMMU and causes the context faults. Fixes: dbc64a8 ("net: fec: move calls to quiesce/resume packet processing out of fec_restart()") Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com> Link: https://lore.kernel.org/r/20240123165141.2008104-1-shenwei.wang@nxp.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent a2933a8 commit 5e34480

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/ethernet/freescale/fec_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2036,6 +2036,7 @@ static void fec_enet_adjust_link(struct net_device *ndev)
20362036

20372037
/* if any of the above changed restart the FEC */
20382038
if (status_change) {
2039+
netif_stop_queue(ndev);
20392040
napi_disable(&fep->napi);
20402041
netif_tx_lock_bh(ndev);
20412042
fec_restart(ndev);
@@ -2045,6 +2046,7 @@ static void fec_enet_adjust_link(struct net_device *ndev)
20452046
}
20462047
} else {
20472048
if (fep->link) {
2049+
netif_stop_queue(ndev);
20482050
napi_disable(&fep->napi);
20492051
netif_tx_lock_bh(ndev);
20502052
fec_stop(ndev);

0 commit comments

Comments
 (0)