Commit ea8318c
net: phy: realtek: clear master_slave_state if link is down
rtlgen_decode_physr() which sets master_slave_state isn't called in case
the link is down and other than rtlgen_read_status(),
rtl822x_c45_read_status() doesn't implicitely clear master_slave_state.
Avoid stale master_slave_state by always setting it to
MASTER_SLAVE_STATE_UNKNOWN in rtl822x_c45_read_status() in case the link
is down.
Fixes: 081c9c0 ("net: phy: realtek: read duplex and gbit master from PHYSR register")
Signed-off-by: Daniel Golle <[email protected]>
Reviewed-by: Michal Swiatkowski <[email protected]>
Signed-off-by: David S. Miller <[email protected]>1 parent 34d5a86 commit ea8318c
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1038 | 1038 | | |
1039 | 1039 | | |
1040 | 1040 | | |
1041 | | - | |
| 1041 | + | |
| 1042 | + | |
1042 | 1043 | | |
| 1044 | + | |
1043 | 1045 | | |
1044 | 1046 | | |
1045 | 1047 | | |
| |||
0 commit comments