quoted hunk ↗ jump to hunk
@@ -27628,6 +27628,16 @@ F: Documentation/networking/device_drivers/ethernet/wangxun/*
F: drivers/net/ethernet/wangxun/
F: drivers/net/pcs/pcs-xpcs-wx.c
+NEBULA-MATRIX ETHERNET DRIVER (nebula-matrix)
+M: Illusion.Wang <illusion.wang@nebula-matrix.com>
+M: Dimon.Zhao <dimon.zhao@nebula-matrix.com>
+M: Alvin.Wang <alvin.wang@nebula-matrix.com>
+M: Sam Chen <sam.chen@nebula-matrix.com>
+L: netdev@vger.kernel.org
+S: Maintained
+F: Documentation/networking/device_drivers/ethernet/nebula-matrix/*
+F: drivers/net/ethernet/nebula-matrix/
This file is sorted, so please insert in the correct location.
quoted hunk ↗ jump to hunk
+
WATCHDOG DEVICE DRIVERS
M: Wim Van Sebroeck <wim@linux-watchdog.org>
M: Guenter Roeck <linux@roeck-us.net>
diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig
index 4a1b368ca7e6..3995f75f1016 100644
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
@@ -204,5 +204,6 @@ source "drivers/net/ethernet/wangxun/Kconfig"
source "drivers/net/ethernet/wiznet/Kconfig"
source "drivers/net/ethernet/xilinx/Kconfig"
source "drivers/net/ethernet/xircom/Kconfig"
+source "drivers/net/ethernet/nebula-matrix/Kconfig"
Also sorted.
quoted hunk ↗ jump to hunk
endif # ETHERNET
diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile
index 2e18df8ca8ec..632dac9c4b75 100644
--- a/drivers/net/ethernet/Makefile
+++ b/drivers/net/ethernet/Makefile
@@ -108,4 +108,5 @@ obj-$(CONFIG_NET_VENDOR_XILINX) += xilinx/
obj-$(CONFIG_NET_VENDOR_XIRCOM) += xircom/
obj-$(CONFIG_NET_VENDOR_SYNOPSYS) += synopsys/
obj-$(CONFIG_NET_VENDOR_PENSANDO) += pensando/
+obj-$(CONFIG_NET_VENDOR_NEBULA_MATRIX) += nebula-matrix/
This is not strictly sorted, but mostly sorted. Please insert in the
correct location.
Sorting avoids merge conflicts when everybody adds to the end of the
file.
quoted hunk ↗ jump to hunk
+if NET_VENDOR_NEBULA_MATRIX
+
+config NBL_CORE
Why core? Is it shared by multiple other drivers?
+#define NBL_CAP_SET_BIT(loc) (1 << (loc))
Please don't re-implement existing functionality. Why are you not using BIT()?
quoted hunk ↗ jump to hunk
+++ b/drivers/net/ethernet/nebula-matrix/nbl/nbl_include/nbl_include.h
Please include the needed headers in the .c file. A large proportion
of compile time is spent processing headers. So including headers you
don't actually need into every C file just slows down the build for
everybody.
+#define NBL_DRIVER_VERSION "25.11-1.16"
Driver versions are generally pointless, since they never change, but
the kernel around it is changing all the time.
quoted hunk ↗ jump to hunk
+
+#define NBL_FLOW_INDEX_BYTE_LEN 8
+
+#define NBL_RATE_MBPS_100G (100000)
+#define NBL_RATE_MBPS_25G (25000)
+#define NBL_RATE_MBPS_10G (10000)
Pointless ()
quoted hunk ↗ jump to hunk
+#define NBL_NEXT_ID(id, max) ({ typeof(id) _id = (id); ((_id) == (max) ? 0 : (_id) + 1); })
+#define NBL_IPV6_U32LEN 4
+
+#define NBL_MAX_FUNC (520)
+#define NBL_MAX_MTU 15
You can only send 15 byte packets? Very odd hardware.
quoted hunk ↗ jump to hunk
+static int nbl_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *id)
+{
+ struct device *dev = &pdev->dev;
+
+ dev_info(dev, "nbl probe finished\n");
Please don't spam the log in the 'happy case'. dev_dbg(), or nothing
at all.
quoted hunk ↗ jump to hunk
+static int __maybe_unused nbl_suspend(struct device *dev)
+{
+ return 0;
+}
+
+static int __maybe_unused nbl_resume(struct device *dev)
+{
+ return 0;
+}
You should be able to add these when you add suspend/resume support.
quoted hunk ↗ jump to hunk
+static int __init nbl_module_init(void)
+{
+ int status;
+
+ status = pci_register_driver(&nbl_driver);
There are helpers for PCI drivers which should mean you don't need
this or nbl_module_exit().
Andrew
---
pw-bot: cr