Commit a97d3c69 authored by Vadym Kochan's avatar Vadym Kochan Committed by David S. Miller
Browse files

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: default avatarAndrii Savka <andrii.savka@plvision.eu>
Signed-off-by: default avatarAndrii Savka <andrii.savka@plvision.eu>
Co-developed-by: default avatarSerhiy Boiko <serhiy.boiko@plvision.eu>
Signed-off-by: default avatarSerhiy Boiko <serhiy.boiko@plvision.eu>
Signed-off-by: default avatarVadym Kochan <vadym.kochan@plvision.eu>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 34dd1710
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_PRESTERA)	+= prestera.o
prestera-objs		:= prestera_main.o prestera_hw.o prestera_dsa.o \
			   prestera_rxtx.o prestera_devlink.o
			   prestera_rxtx.o prestera_devlink.o prestera_ethtool.o

obj-$(CONFIG_PRESTERA_PCI)	+= prestera_pci.o
+3 −0
Original line number Diff line number Diff line
@@ -169,4 +169,7 @@ void prestera_device_unregister(struct prestera_device *dev);
struct prestera_port *prestera_port_find_by_hwid(struct prestera_switch *sw,
						 u32 dev_id, u32 hw_id);

int prestera_port_autoneg_set(struct prestera_port *port, bool enable,
			      u64 adver_link_modes, u8 adver_fec);

#endif /* _PRESTERA_H_ */
+780 −0

File added.

Preview size limit exceeded, changes collapsed.

+11 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
/* Copyright (c) 2019-2020 Marvell International Ltd. All rights reserved. */

#ifndef __PRESTERA_ETHTOOL_H_
#define __PRESTERA_ETHTOOL_H_

#include <linux/ethtool.h>

extern const struct ethtool_ops prestera_ethtool_ops;

#endif /* _PRESTERA_ETHTOOL_H_ */
+299 −0

File changed.

Preview size limit exceeded, changes collapsed.

Loading