Commit 5556f23
net: spacemit: Check netif_running() in emac_set_pauseparam()
Currently, emac_set_pauseparam() will oops if userspace calls it while
the interface is not up, because phydev is NULL, but it is still
accessed in emac_set_fc() and emac_set_fc_autoneg().
Check for netif_running(dev) in emac_set_pauseparam() before proceeding.
Fixes: bfec6d7 ("net: spacemit: Add K1 Ethernet MAC")
Signed-off-by: Vivian Wang <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent 2e25935 commit 5556f23
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1441 | 1441 | | |
1442 | 1442 | | |
1443 | 1443 | | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
1444 | 1447 | | |
1445 | 1448 | | |
1446 | 1449 | | |
| |||
0 commit comments