This patch series adds initial support for Ethernet on SEL hardware,
including the SEL-3350, SEL-3390E4, and SEL-3390T. We've been
maintaining these drivers out of tree for years and this is our first
attempt at submitting such drivers to mainline. Because of that, I
expect there's room for improvement and have marked this as RFC.
This is implemented in an FPGA running multiple RTL blocks for various
functionality, such as Ethernet and serial ports, exposed over a single
PCIe BAR. The drivers are implemented as a top level MFD driver that
attaches to the PCIe device and enumerates the child drivers necessary
to provide the functionality of the device. Only Ethernet is part of
this patch set, but we intend to submit subsequent drivers for the
additional functionality within the FPGA.
Is MFD still the right framework to use or is Aux Bus a better fit? At
the time these drivers were first written Aux Bus didn't exist, but if
that's the preferred way to go it can be reworked.
PVMF contains an implementation of Configuration via Protocol (CvP),
a method of loading firmware into Altera FPGAs when the driver loads. An
implementation of this does exist in the FPGA manager code, but it's
doesn't appear to expose that functionality in a way we can use:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/fpga/altera-cvp.c?h=v6.12-rc5
Should we explore creating a common CvP driver that can be shared?
Presently the Ethernet driver does not use phylib, all phy handling is
done internal to the driver. Most of the phys we use already have
in-tree drivers, so assuming any quirks can be dealt with, it should be
possible for us to integrate with phylib. Is integration with phylib
required before the driver can be accepted? If so, what is a good driver
to use as a reference for us to follow?
I've sent this to both linux-kernel and netdev lists since this touches
MFD and net. Is that the best way to review patches across multiple
subsystems? This series is based on the v6.12-rc5 tag in Linus' tree to
provide consistency between the MFD and net subsystems. When submitting
for inclusion and not just RFC, should it be two separate requests, one
based on the MFD tree and one based on net-next? I'm not sure the best
way to coordinate between the two trees.
Suggestions on improvements to the code or how we're submitting this are
appreciated.
Robert Joslyn (2):
mfd: Add SEL PCI Virtual Multifunction (PVMF) support
net: selpcimac: Add driver for SEL PCIe network adapter
MAINTAINERS | 9 +
drivers/mfd/Kconfig | 16 +
drivers/mfd/Makefile | 3 +
drivers/mfd/selpvmf-core.c | 482 ++++++++++
drivers/mfd/selpvmf-cvp.c | 431 +++++++++
drivers/mfd/selpvmf-cvp.h | 18 +
drivers/net/ethernet/Kconfig | 1 +
drivers/net/ethernet/Makefile | 1 +
drivers/net/ethernet/sel/Kconfig | 31 +
drivers/net/ethernet/sel/Makefile | 22 +
drivers/net/ethernet/sel/ethtool.c | 404 ++++++++
drivers/net/ethernet/sel/ethtool.h | 17 +
drivers/net/ethernet/sel/hw_interface.c | 410 ++++++++
drivers/net/ethernet/sel/hw_interface.h | 46 +
drivers/net/ethernet/sel/mac_main.c | 155 +++
drivers/net/ethernet/sel/mdio.c | 166 ++++
drivers/net/ethernet/sel/mdio.h | 15 +
drivers/net/ethernet/sel/mii.c | 422 +++++++++
drivers/net/ethernet/sel/mii.h | 21 +
drivers/net/ethernet/sel/mii_interface.c | 133 +++
drivers/net/ethernet/sel/mii_interface.h | 23 +
drivers/net/ethernet/sel/netdev.c | 946 +++++++++++++++++++
drivers/net/ethernet/sel/netdev.h | 24 +
drivers/net/ethernet/sel/netdev_isr.c | 245 +++++
drivers/net/ethernet/sel/netdev_isr.h | 20 +
drivers/net/ethernet/sel/netdev_rx.c | 785 +++++++++++++++
drivers/net/ethernet/sel/netdev_rx.h | 17 +
drivers/net/ethernet/sel/netdev_tx.c | 647 +++++++++++++
drivers/net/ethernet/sel/netdev_tx.h | 22 +
drivers/net/ethernet/sel/pci_mac.h | 290 ++++++
drivers/net/ethernet/sel/pci_mac_hw_regs.h | 370 ++++++++
drivers/net/ethernet/sel/pci_mac_sysfs.c | 642 +++++++++++++
drivers/net/ethernet/sel/pci_mac_sysfs.h | 14 +
drivers/net/ethernet/sel/sel_pci_mac_ioctl.h | 25 +
drivers/net/ethernet/sel/sel_phy.h | 91 ++
drivers/net/ethernet/sel/sel_phy_broadcom.c | 316 +++++++
drivers/net/ethernet/sel/sel_phy_broadcom.h | 15 +
drivers/net/ethernet/sel/sel_phy_marvell.c | 458 +++++++++
drivers/net/ethernet/sel/sel_phy_marvell.h | 15 +
drivers/net/ethernet/sel/sel_phy_ti.c | 419 ++++++++
drivers/net/ethernet/sel/sel_phy_ti.h | 14 +
drivers/net/ethernet/sel/sel_soft_phy.c | 98 ++
drivers/net/ethernet/sel/sel_soft_phy.h | 15 +
drivers/net/ethernet/sel/semaphore.h | 85 ++
drivers/net/ethernet/sel/sfp.c | 615 ++++++++++++
drivers/net/ethernet/sel/sfp.h | 61 ++
46 files changed, 9075 insertions(+)
create mode 100644 drivers/mfd/selpvmf-core.c
create mode 100644 drivers/mfd/selpvmf-cvp.c
create mode 100644 drivers/mfd/selpvmf-cvp.h
create mode 100644 drivers/net/ethernet/sel/Kconfig
create mode 100644 drivers/net/ethernet/sel/Makefile
create mode 100644 drivers/net/ethernet/sel/ethtool.c
create mode 100644 drivers/net/ethernet/sel/ethtool.h
create mode 100644 drivers/net/ethernet/sel/hw_interface.c
create mode 100644 drivers/net/ethernet/sel/hw_interface.h
create mode 100644 drivers/net/ethernet/sel/mac_main.c
create mode 100644 drivers/net/ethernet/sel/mdio.c
create mode 100644 drivers/net/ethernet/sel/mdio.h
create mode 100644 drivers/net/ethernet/sel/mii.c
create mode 100644 drivers/net/ethernet/sel/mii.h
create mode 100644 drivers/net/ethernet/sel/mii_interface.c
create mode 100644 drivers/net/ethernet/sel/mii_interface.h
create mode 100644 drivers/net/ethernet/sel/netdev.c
create mode 100644 drivers/net/ethernet/sel/netdev.h
create mode 100644 drivers/net/ethernet/sel/netdev_isr.c
create mode 100644 drivers/net/ethernet/sel/netdev_isr.h
create mode 100644 drivers/net/ethernet/sel/netdev_rx.c
create mode 100644 drivers/net/ethernet/sel/netdev_rx.h
create mode 100644 drivers/net/ethernet/sel/netdev_tx.c
create mode 100644 drivers/net/ethernet/sel/netdev_tx.h
create mode 100644 drivers/net/ethernet/sel/pci_mac.h
create mode 100644 drivers/net/ethernet/sel/pci_mac_hw_regs.h
create mode 100644 drivers/net/ethernet/sel/pci_mac_sysfs.c
create mode 100644 drivers/net/ethernet/sel/pci_mac_sysfs.h
create mode 100644 drivers/net/ethernet/sel/sel_pci_mac_ioctl.h
create mode 100644 drivers/net/ethernet/sel/sel_phy.h
create mode 100644 drivers/net/ethernet/sel/sel_phy_broadcom.c
create mode 100644 drivers/net/ethernet/sel/sel_phy_broadcom.h
create mode 100644 drivers/net/ethernet/sel/sel_phy_marvell.c
create mode 100644 drivers/net/ethernet/sel/sel_phy_marvell.h
create mode 100644 drivers/net/ethernet/sel/sel_phy_ti.c
create mode 100644 drivers/net/ethernet/sel/sel_phy_ti.h
create mode 100644 drivers/net/ethernet/sel/sel_soft_phy.c
create mode 100644 drivers/net/ethernet/sel/sel_soft_phy.h
create mode 100644 drivers/net/ethernet/sel/semaphore.h
create mode 100644 drivers/net/ethernet/sel/sfp.c
create mode 100644 drivers/net/ethernet/sel/sfp.h
--
2.45.2