Skip to content

Commit a97d3c6

Browse files
vkochan-plvdavem330
authored andcommitted
net: marvell: prestera: Add ethtool interface support
The ethtool API provides support for the configuration of the following features: speed and duplex, auto-negotiation, MDI-x, forward error correction, port media type. The API also provides information about the port status, hardware and software statistic. The following limitation exists: - port media type should be configured before speed setting - ethtool -m option is not supported - ethtool -p option is not supported - ethtool -r option is supported for RJ45 port only - the following combination of parameters is not supported: ethtool -s sw1pX port XX autoneg on - forward error correction feature is supported only on SFP ports, 10G speed - auto-negotiation and MDI-x features are not supported on Copper-to-Fiber SFP module Co-developed-by: Andrii Savka <andrii.savka@plvision.eu> Signed-off-by: Andrii Savka <andrii.savka@plvision.eu> Co-developed-by: Serhiy Boiko <serhiy.boiko@plvision.eu> Signed-off-by: Serhiy Boiko <serhiy.boiko@plvision.eu> Signed-off-by: Vadym Kochan <vadym.kochan@plvision.eu> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 34dd171 commit a97d3c6

File tree

7 files changed

+1182
-6
lines changed

7 files changed

+1182
-6
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: GPL-2.0
22
obj-$(CONFIG_PRESTERA) += prestera.o
33
prestera-objs := prestera_main.o prestera_hw.o prestera_dsa.o \
4-
prestera_rxtx.o prestera_devlink.o
4+
prestera_rxtx.o prestera_devlink.o prestera_ethtool.o
55

66
obj-$(CONFIG_PRESTERA_PCI) += prestera_pci.o

drivers/net/ethernet/marvell/prestera/prestera.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,7 @@ void prestera_device_unregister(struct prestera_device *dev);
169169
struct prestera_port *prestera_port_find_by_hwid(struct prestera_switch *sw,
170170
u32 dev_id, u32 hw_id);
171171

172+
int prestera_port_autoneg_set(struct prestera_port *port, bool enable,
173+
u64 adver_link_modes, u8 adver_fec);
174+
172175
#endif /* _PRESTERA_H_ */

0 commit comments

Comments
 (0)