Commit e80ed97
committed
Merge branch 'net-phylink-fix-pcs-without-autoneg'
Russell King says:
====================
net: phylink: fix PCS without autoneg
Eric Woudstra reported that a PCS attached using 2500base-X does not
see link when phylink is using in-band mode, but autoneg is disabled,
despite there being a valid 2500base-X signal being received. We have
these settings:
act_link_an_mode = MLO_AN_INBAND
pcs_neg_mode = PHYLINK_PCS_NEG_INBAND_DISABLED
Eric diagnosed it to phylink_decode_c37_word() setting state->link
false because the full-duplex bit isn't set in the non-existent link
partner advertisement word (which doesn't exist because in-band
autoneg is disabled!)
The test in phylink_mii_c22_pcs_decode_state() is supposed to catch
this state, but since we converted PCS to use neg_mode, testing the
Autoneg in the local advertisement is no longer sufficient - we need
to be looking at the neg_mode, which currently isn't provided.
We need to provide this via the .pcs_get_state() method, and this
will require modifying all PCS implementations to add the extra
argument to this method.
Patch 1 uses the PCS neg_mode in phylink_mac_pcs_get_state() to correct
the now obsolute usage of the Autoneg bit in the advertisement.
Patch 2 passes neg_mode into the .pcs_get_state() method, and updates
all users.
Patch 3 adds neg_mode as an argument to the various clause 22 state
decoder functions in phylink, modifying drivers to pass the neg_mode
through.
Patch 4 makes use of phylink_mii_c22_pcs_decode_state() rather than
using the Autoneg bit in the advertising field.
Patch 5 may be required for Eric's case - it ensures that we report
the correct state for interface types that we support only one set
of modes for when autoneg is disabled.
====================
Link: https://patch.msgid.link/Z4TbR93B-X8A8iHe@shell.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>File tree
22 files changed
+87
-42
lines changed- drivers/net
- dsa
- b53
- mv88e6xxx
- qca
- ethernet
- cadence
- freescale/fman
- marvell
- mvpp2
- prestera
- meta/fbnic
- microchip
- lan966x
- sparx5
- xilinx
- pcs
- phy
- include/linux
22 files changed
+87
-42
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
| 102 | + | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2994 | 2994 | | |
2995 | 2995 | | |
2996 | 2996 | | |
2997 | | - | |
| 2997 | + | |
2998 | 2998 | | |
2999 | 2999 | | |
3000 | 3000 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| 260 | + | |
260 | 261 | | |
261 | 262 | | |
262 | 263 | | |
| |||
395 | 396 | | |
396 | 397 | | |
397 | 398 | | |
| 399 | + | |
398 | 400 | | |
399 | 401 | | |
400 | 402 | | |
| |||
889 | 891 | | |
890 | 892 | | |
891 | 893 | | |
| 894 | + | |
892 | 895 | | |
893 | 896 | | |
894 | 897 | | |
895 | 898 | | |
896 | 899 | | |
897 | 900 | | |
898 | 901 | | |
899 | | - | |
| 902 | + | |
900 | 903 | | |
901 | 904 | | |
902 | 905 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1491 | 1491 | | |
1492 | 1492 | | |
1493 | 1493 | | |
1494 | | - | |
| 1494 | + | |
1495 | 1495 | | |
1496 | 1496 | | |
1497 | 1497 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
| 571 | + | |
571 | 572 | | |
572 | 573 | | |
573 | 574 | | |
| |||
598 | 599 | | |
599 | 600 | | |
600 | 601 | | |
601 | | - | |
| 602 | + | |
602 | 603 | | |
603 | 604 | | |
604 | 605 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
755 | 755 | | |
756 | 756 | | |
757 | 757 | | |
758 | | - | |
| 758 | + | |
759 | 759 | | |
760 | 760 | | |
761 | 761 | | |
762 | 762 | | |
763 | | - | |
| 763 | + | |
764 | 764 | | |
765 | 765 | | |
766 | 766 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3983 | 3983 | | |
3984 | 3984 | | |
3985 | 3985 | | |
3986 | | - | |
| 3986 | + | |
3987 | 3987 | | |
3988 | 3988 | | |
3989 | 3989 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6188 | 6188 | | |
6189 | 6189 | | |
6190 | 6190 | | |
| 6191 | + | |
6191 | 6192 | | |
6192 | 6193 | | |
6193 | 6194 | | |
| |||
6247 | 6248 | | |
6248 | 6249 | | |
6249 | 6250 | | |
| 6251 | + | |
6250 | 6252 | | |
6251 | 6253 | | |
6252 | 6254 | | |
| |||
0 commit comments