lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <6c4f300b92cc863fe61b122d04944358d9018f65.camel@redhat.com> Date: Thu, 25 Aug 2022 12:47:28 +0200 From: Paolo Abeni <pabeni@...hat.com> To: Mengyuan Lou <mengyuanlou@...-swift.com>, netdev@...r.kernel.org Cc: jiawenwu@...stnetic.com Subject: Re: [PATCH net-next v2] net: ngbe: Add build support for ngbe Hello, On Tue, 2022-08-23 at 19:31 +0800, Mengyuan Lou wrote: > Add build options and guidance doc. > Initialize pci device access for Wangxun Gigabit Ethernet devices. > > Signed-off-by: Mengyuan Lou <mengyuanlou@...-swift.com> > Change log: > v2: address comments: > Jakub Kicinski: The length of the '=====' lines needs to be the same as the length of the text. Your SoB tag should be the last line in the commit message, please re- submit moving the changelog after the '---' marker. > --- > .../device_drivers/ethernet/index.rst | 1 + > .../device_drivers/ethernet/wangxun/ngbe.rst | 14 ++ > MAINTAINERS | 4 +- > drivers/net/ethernet/wangxun/Kconfig | 13 ++ > drivers/net/ethernet/wangxun/Makefile | 1 + > drivers/net/ethernet/wangxun/ngbe/Makefile | 9 + > drivers/net/ethernet/wangxun/ngbe/ngbe.h | 24 +++ > drivers/net/ethernet/wangxun/ngbe/ngbe_main.c | 173 ++++++++++++++++++ > drivers/net/ethernet/wangxun/ngbe/ngbe_type.h | 50 +++++ > 9 files changed, 288 insertions(+), 1 deletion(-) > create mode 100644 Documentation/networking/device_drivers/ethernet/wangxun/ngbe.rst > create mode 100644 drivers/net/ethernet/wangxun/ngbe/Makefile > create mode 100644 drivers/net/ethernet/wangxun/ngbe/ngbe.h > create mode 100644 drivers/net/ethernet/wangxun/ngbe/ngbe_main.c > create mode 100644 drivers/net/ethernet/wangxun/ngbe/ngbe_type.h > > diff --git a/Documentation/networking/device_drivers/ethernet/index.rst b/Documentation/networking/device_drivers/ethernet/index.rst > index 7f1777173abb..5196905582c5 100644 > --- a/Documentation/networking/device_drivers/ethernet/index.rst > +++ b/Documentation/networking/device_drivers/ethernet/index.rst > @@ -52,6 +52,7 @@ Contents: > ti/tlan > toshiba/spider_net > wangxun/txgbe > + wangxun/ngbe > > .. only:: subproject and html > > diff --git a/Documentation/networking/device_drivers/ethernet/wangxun/ngbe.rst b/Documentation/networking/device_drivers/ethernet/wangxun/ngbe.rst > new file mode 100644 > index 000000000000..43a02f9943e1 > --- /dev/null > +++ b/Documentation/networking/device_drivers/ethernet/wangxun/ngbe.rst > @@ -0,0 +1,14 @@ > +.. SPDX-License-Identifier: GPL-2.0 > + > +============================================================= > +Linux Base Driver for WangXun(R) Gigabit PCI Express Adapters > +============================================================= > + > +WangXun Gigabit Linux driver. > +Copyright (c) 2019 - 2022 Beijing WangXun Technology Co., Ltd. > + > +Support > +======= > + If you have problems with the software or hardware, please contact our > + customer support team via email at nic-support@...-swift.com or check our website > + at https://www.net-swift.com > diff --git a/MAINTAINERS b/MAINTAINERS > index f2d64020399b..4e7ced47a255 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -21834,9 +21834,11 @@ F: drivers/input/tablet/wacom_serial4.c > > WANGXUN ETHERNET DRIVER > M: Jiawen Wu <jiawenwu@...stnetic.com> > +M: Mengyuan Lou <mengyuanlou@...-swift.com> > +W: https://www.net-swift.com > L: netdev@...r.kernel.org > S: Maintained > -F: Documentation/networking/device_drivers/ethernet/wangxun/txgbe.rst > +F: Documentation/networking/device_drivers/ethernet/wangxun/* > F: drivers/net/ethernet/wangxun/ > > WATCHDOG DEVICE DRIVERS > diff --git a/drivers/net/ethernet/wangxun/Kconfig b/drivers/net/ethernet/wangxun/Kconfig > index b4a4fa0a58f8..f5d43d8c9629 100644 > --- a/drivers/net/ethernet/wangxun/Kconfig > +++ b/drivers/net/ethernet/wangxun/Kconfig > @@ -16,6 +16,19 @@ config NET_VENDOR_WANGXUN > > if NET_VENDOR_WANGXUN > > +config NGBE > + tristate "Wangxun(R) GbE PCI Express adapters support" > + depends on PCI > + help > + This driver supports Wangxun(R) GbE PCI Express family of > + adapters. > + > + More specific information on configuring the driver is in > + <file:Documentation/networking/device_drivers/ethernet/wangxun/ngbe.rst>. > + > + To compile this driver as a module, choose M here. The module > + will be called ngbe. > + > config TXGBE > tristate "Wangxun(R) 10GbE PCI Express adapters support" > depends on PCI > diff --git a/drivers/net/ethernet/wangxun/Makefile b/drivers/net/ethernet/wangxun/Makefile > index c34db1bead25..1193b4f738b8 100644 > --- a/drivers/net/ethernet/wangxun/Makefile > +++ b/drivers/net/ethernet/wangxun/Makefile > @@ -4,3 +4,4 @@ > # > > obj-$(CONFIG_TXGBE) += txgbe/ > +obj-$(CONFIG_TXGBE) += ngbe/ > diff --git a/drivers/net/ethernet/wangxun/ngbe/Makefile b/drivers/net/ethernet/wangxun/ngbe/Makefile > new file mode 100644 > index 000000000000..0baf75907496 > --- /dev/null > +++ b/drivers/net/ethernet/wangxun/ngbe/Makefile > @@ -0,0 +1,9 @@ > +# SPDX-License-Identifier: GPL-2.0 > +# Copyright (c) 2019 - 2022 Beijing WangXun Technology Co., Ltd. > +# > +# Makefile for the Wangxun(R) GbE PCI Express ethernet driver > +# > + > +obj-$(CONFIG_NGBE) += ngbe.o > + > +ngbe-objs := ngbe_main.o > diff --git a/drivers/net/ethernet/wangxun/ngbe/ngbe.h b/drivers/net/ethernet/wangxun/ngbe/ngbe.h > new file mode 100644 > index 000000000000..f5fa6e5238cc > --- /dev/null > +++ b/drivers/net/ethernet/wangxun/ngbe/ngbe.h > @@ -0,0 +1,24 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* Copyright (c) 2019 - 2022 Beijing WangXun Technology Co., Ltd. */ > + > +#ifndef _NGBE_H_ > +#define _NGBE_H_ > + > +#include "ngbe_type.h" > + > +#define NGBE_MAX_FDIR_INDICES 7 > + > +#define NGBE_MAX_RX_QUEUES (NGBE_MAX_FDIR_INDICES + 1) > +#define NGBE_MAX_TX_QUEUES (NGBE_MAX_FDIR_INDICES + 1) > + > +/* board specific private data structure */ > +struct ngbe_adapter { > + u8 __iomem *io_addr; /* Mainly for iounmap use */ > + /* OS defined structs */ > + struct net_device *netdev; > + struct pci_dev *pdev; > +}; > + > +extern char ngbe_driver_name[]; > + > +#endif /* _NGBE_H_ */ > diff --git a/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c b/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c > new file mode 100644 > index 000000000000..ba3a80e5c303 > --- /dev/null > +++ b/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c > @@ -0,0 +1,173 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* Copyright (c) 2019 - 2022 Beijing WangXun Technology Co., Ltd. */ > + > +#include <linux/types.h> > +#include <linux/module.h> > +#include <linux/pci.h> > +#include <linux/netdevice.h> > +#include <linux/string.h> > +#include <linux/aer.h> > +#include <linux/etherdevice.h> Note that this is triggering a large amount of sparse warning on PW, but that is likely caused by a sparse bug. Running locally with an up2date sparse version, such warnings go away Cheers, Paolo
Powered by blists - more mailing lists