Skip to content

Commit

Permalink
net: mucse: initial support for rnpgbe driver from Mucse Technology
Browse files Browse the repository at this point in the history
This driver is to support mucse n500/n210 ethernet card

Signed-off-by: Dong Yibo <[email protected]>
  • Loading branch information
xiaolong1305 committed Sep 10, 2024
1 parent cce573f commit b089fde
Show file tree
Hide file tree
Showing 34 changed files with 27,550 additions and 0 deletions.
5 changes: 5 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -23972,6 +23972,11 @@ L: [email protected]
S: Maintained
F: mm/zswap.c

MUCSE Ethernet Controller drivers
M: Yibo Dong <[email protected]>
S: Maintained
F: drivers/net/ethernet/mucse/

THE REST
M: Linus Torvalds <[email protected]>
L: [email protected]
Expand Down
4 changes: 4 additions & 0 deletions arch/arm64/configs/deepin_arm64_desktop_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1436,6 +1436,10 @@ CONFIG_MLX5_EN_TLS=y
CONFIG_MLX5_SF=y
CONFIG_MLXSW_CORE=m
CONFIG_MLXBF_GIGE=m
CONFIG_NET_VENDOR_MUCSE=y
CONFIG_MGBE=m
# CONFIG_MGBE_OPTM_WITH_LARGE is not set
CONFIG_MGBE_MSIX_COUNT=26
CONFIG_KS8842=m
CONFIG_KS8851=m
CONFIG_KS8851_MLL=m
Expand Down
3 changes: 3 additions & 0 deletions arch/loongarch/configs/deepin_loongarch_desktop_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1279,6 +1279,9 @@ CONFIG_PCMCIA_3C574=m
CONFIG_PCMCIA_3C589=m
CONFIG_VORTEX=m
CONFIG_TYPHOON=m
CONFIG_NET_VENDOR_MUCSE=y
CONFIG_MGBE=m
# CONFIG_MGBE_OPTM_WITH_LARGE is not set
CONFIG_NET_VENDOR_3SNIC=y
CONFIG_ADAPTEC_STARFIRE=m
CONFIG_ET131X=m
Expand Down
4 changes: 4 additions & 0 deletions arch/x86/configs/deepin_x86_desktop_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1236,6 +1236,10 @@ CONFIG_PCMCIA_3C574=m
CONFIG_PCMCIA_3C589=m
CONFIG_VORTEX=m
CONFIG_TYPHOON=m
CONFIG_NET_VENDOR_MUCSE=y
CONFIG_MGBE=m
# CONFIG_MGBE_OPTM_WITH_LARGE is not set
CONFIG_MGBE_MSIX_COUNT=26
CONFIG_NET_VENDOR_3SNIC=y
CONFIG_SSSNIC=m
CONFIG_ADAPTEC_STARFIRE=m
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ source "drivers/net/ethernet/i825xx/Kconfig"
source "drivers/net/ethernet/ibm/Kconfig"
source "drivers/net/ethernet/intel/Kconfig"
source "drivers/net/ethernet/xscale/Kconfig"
source "drivers/net/ethernet/mucse/Kconfig"

config JME
tristate "JMicron(R) PCI-Express Gigabit Ethernet support"
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ obj-$(CONFIG_NET_VENDOR_HISILICON) += hisilicon/
obj-$(CONFIG_NET_VENDOR_HUAWEI) += huawei/
obj-$(CONFIG_NET_VENDOR_IBM) += ibm/
obj-$(CONFIG_NET_VENDOR_INTEL) += intel/
obj-$(CONFIG_NET_VENDOR_MUCSE) += mucse/
obj-$(CONFIG_NET_VENDOR_I825XX) += i825xx/
obj-$(CONFIG_NET_VENDOR_MICROSOFT) += microsoft/
obj-$(CONFIG_NET_VENDOR_XSCALE) += xscale/
Expand Down
48 changes: 48 additions & 0 deletions drivers/net/ethernet/mucse/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# Mucse network device configuration
#

config NET_VENDOR_MUCSE
bool "Mucse devices"
default y
help
If you have a network (Ethernet) card belonging to this class, say Y.

Note that the answer to this question doesn't directly affect the
kernel: saying N will just cause the configurator to skip all
the questions about Mucse cards. If you say Y, you will be asked for
your specific card in the following questions.


if NET_VENDOR_MUCSE

config MGBE
tristate "Mucse(R) 1GbE PCI Express adapters support"
depends on PCI
imply PTP_1588_CLOCK
help
This driver supports Mucse(R) 1GbE PCI Express family of
adapters.

To compile this driver as a module, choose M here. The module
will be called rnp.

config MGBE_OPTM_WITH_LPAGE
bool "Reduce Memory Cost In Large PAGE_SIZE(>8192)"
default n
depends on MGBE
help
Say Y here if you want to reduce memory cost in large PAGE_SIZE.

If unsure, say N.

config MGBE_MSIX_COUNT
int "Number of msix count"
default "26"
depends on MGBE
help
MXGBE range [2,26].

endif # NET_VENDOR_MUCSE

6 changes: 6 additions & 0 deletions drivers/net/ethernet/mucse/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
#
# Makefile for the Mucse network device drivers.
#

obj-$(CONFIG_MGBE) += rnpgbe/
23 changes: 23 additions & 0 deletions drivers/net/ethernet/mucse/rnpgbe/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright(c) 2022 - 2024 Mucse Corporation
#
# Makefile for the Mucse(R) 1GbE PCI Express ethernet driver
#
#

obj-$(CONFIG_MGBE) += rnpgbe.o
rnpgbe-objs := \
rnpgbe_main.o \
rnpgbe_common.o \
rnpgbe_ethtool.o \
rnpgbe_lib.o \
rnpgbe_mbx.o \
rnpgbe_chip.o \
rnpgbe_mbx_fw.o\
rnpgbe_sriov.o \
rnpgbe_param.o \
rnpgbe_sysfs.o \
rnpgbe_sfc.o \
rnpgbe_ptp.o

rnpgbe-$(CONFIG_DEBUG_FS) += rnpgbe_debugfs.o
Loading

0 comments on commit b089fde

Please sign in to comment.