diff options
| author | Vidya Sagar Ravipati <vidya@cumulusnetworks.com> | 2016-08-26 04:25:50 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2016-08-29 00:27:34 -0400 |
| commit | 5711a98221443aec54c4c81ee98c6ae46acccb65 (patch) | |
| tree | 28fa87589ad1d61983c15360900aa7388fc27198 /include/uapi/linux | |
| parent | a039b638592c8b967797d96f50bebfaa64964c3f (diff) | |
net: ethtool: add support for 1000BaseX and missing 10G link modes
This patch enhances ethtool link mode bitmap to include
missing interface modes for 1G/10G speeds
Changes:
1000baseX is the mode introduced to cover all 1G Fiber cases.
All modes under 1000BaseX i.e. 1000BASE-SX, 1000BASE-LX, 1000BASE-LX10
and 1000BASE-BX10 are not explicitly defined at this moment.
10G CR,SR,LR and ER link modes are included for 10G speed..
Issue:
ethtool on 1G/10G SFP port reports Base-T
as this port supports 1000baseX,10G CR, SR and LR modes.
root@tor-02$ ethtool swp1
Settings for swp1:
Supported ports: [ FIBRE ]
Supported link modes: 1000baseT/Full
10000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Advertised link modes: 1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: No
Speed: 10000Mb/s
Duplex: Full
Port: FIBRE
PHYAD: 0
Transceiver: external
Auto-negotiation: off
Current message level: 0x00000000 (0)
Link detected: yes
After fix:
root@tor-02$ ethtool swp1
Settings for swp1:
Supported ports: [ FIBRE ]
Supported link modes: 1000baseX/Full
10000baseCR/Full
10000baseSR/Full
10000baseLR/Full
10000baseER/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Advertised link modes: 1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: No
Speed: 10000Mb/s
Duplex: Full
Port: FIBRE
PHYAD: 0
Transceiver: external
Auto-negotiation: off
Current message level: 0x00000000 (0)
Link detected: yes
Signed-off-by: Vidya Sagar Ravipati <vidya@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/ethtool.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h index b8f38e84d93a..099a4200732c 100644 --- a/include/uapi/linux/ethtool.h +++ b/include/uapi/linux/ethtool.h | |||
| @@ -1362,7 +1362,14 @@ enum ethtool_link_mode_bit_indices { | |||
| 1362 | ETHTOOL_LINK_MODE_100000baseSR4_Full_BIT = 37, | 1362 | ETHTOOL_LINK_MODE_100000baseSR4_Full_BIT = 37, |
| 1363 | ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT = 38, | 1363 | ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT = 38, |
| 1364 | ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT = 39, | 1364 | ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT = 39, |
| 1365 | ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT = 40, | 1365 | ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT = 40, |
| 1366 | ETHTOOL_LINK_MODE_1000baseX_Full_BIT = 41, | ||
| 1367 | ETHTOOL_LINK_MODE_10000baseCR_Full_BIT = 42, | ||
| 1368 | ETHTOOL_LINK_MODE_10000baseSR_Full_BIT = 43, | ||
| 1369 | ETHTOOL_LINK_MODE_10000baseLR_Full_BIT = 44, | ||
| 1370 | ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT = 45, | ||
| 1371 | ETHTOOL_LINK_MODE_10000baseER_Full_BIT = 46, | ||
| 1372 | |||
| 1366 | 1373 | ||
| 1367 | /* Last allowed bit for __ETHTOOL_LINK_MODE_LEGACY_MASK is bit | 1374 | /* Last allowed bit for __ETHTOOL_LINK_MODE_LEGACY_MASK is bit |
| 1368 | * 31. Please do NOT define any SUPPORTED_* or ADVERTISED_* | 1375 | * 31. Please do NOT define any SUPPORTED_* or ADVERTISED_* |
| @@ -1371,7 +1378,7 @@ enum ethtool_link_mode_bit_indices { | |||
| 1371 | */ | 1378 | */ |
| 1372 | 1379 | ||
| 1373 | __ETHTOOL_LINK_MODE_LAST | 1380 | __ETHTOOL_LINK_MODE_LAST |
| 1374 | = ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT, | 1381 | = ETHTOOL_LINK_MODE_10000baseER_Full_BIT, |
| 1375 | }; | 1382 | }; |
| 1376 | 1383 | ||
| 1377 | #define __ETHTOOL_LINK_MODE_LEGACY_MASK(base_name) \ | 1384 | #define __ETHTOOL_LINK_MODE_LEGACY_MASK(base_name) \ |
