2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-20 19:23:57 +08:00

nfp: report RJ45 connector in ethtool

Add support for reporting twisted pair port type.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jakub Kicinski 2019-02-26 20:19:29 -08:00 committed by David S. Miller
parent 031b922bfd
commit 1e301a1407
2 changed files with 4 additions and 0 deletions

View File

@ -49,6 +49,7 @@ enum nfp_eth_interface {
NFP_INTERFACE_SFPP = 10, NFP_INTERFACE_SFPP = 10,
NFP_INTERFACE_SFP28 = 28, NFP_INTERFACE_SFP28 = 28,
NFP_INTERFACE_QSFP = 40, NFP_INTERFACE_QSFP = 40,
NFP_INTERFACE_RJ45 = 45,
NFP_INTERFACE_CXP = 100, NFP_INTERFACE_CXP = 100,
NFP_INTERFACE_QSFP28 = 112, NFP_INTERFACE_QSFP28 = 112,
}; };

View File

@ -206,6 +206,9 @@ nfp_eth_calc_port_type(struct nfp_cpp *cpp, struct nfp_eth_table_port *entry)
if (entry->interface == NFP_INTERFACE_NONE) { if (entry->interface == NFP_INTERFACE_NONE) {
entry->port_type = PORT_NONE; entry->port_type = PORT_NONE;
return; return;
} else if (entry->interface == NFP_INTERFACE_RJ45) {
entry->port_type = PORT_TP;
return;
} }
if (entry->media == NFP_MEDIA_FIBRE) if (entry->media == NFP_MEDIA_FIBRE)