diff mbox series

[V2,net-next,8/8] net: hns3: Add HNS3 driver to kernel build framework & MAINTAINERS

Message ID 20170613231035.494020-9-salil.mehta@huawei.com
State Superseded
Headers show
Series Hisilicon Network Subsystem 3 Ethernet Driver | expand

Commit Message

Salil Mehta June 13, 2017, 11:10 p.m. UTC
This patch updates the MAINTAINERS file with HNS3 Ethernet driver
maintainers names and other details. This also introduces the new
Makefiles required to build the HNS3 Ethernet driver and updates
the existing Kconfig file in the hisilicon folder.

Signed-off-by: Salil Mehta <salil.mehta@huawei.com>

---
Patch V2: Addresses below comments:
 1. Yuval Mintz: https://lkml.org/lkml/2017/6/10/82
 2. Andrew Lunn: https://lkml.org/lkml/2017/6/10/118
Patch V1: Initial Submit
---
 MAINTAINERS                                        |  8 ++++++++
 drivers/net/ethernet/hisilicon/Kconfig             | 24 ++++++++++++++++++++++
 drivers/net/ethernet/hisilicon/Makefile            |  1 +
 drivers/net/ethernet/hisilicon/hns3/Makefile       |  7 +++++++
 .../net/ethernet/hisilicon/hns3/hns3pf/Makefile    | 11 ++++++++++
 5 files changed, 51 insertions(+)
 create mode 100644 drivers/net/ethernet/hisilicon/hns3/Makefile
 create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3pf/Makefile

-- 
2.7.4

Comments

kernel test robot June 14, 2017, 10:52 a.m. UTC | #1
Hi Salil,

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Salil-Mehta/Hisilicon-Network-Subsystem-3-Ethernet-Driver/20170614-162343
config: m68k-allyesconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 4.9.0
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=m68k 

All errors (new ones prefixed by >>):

   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c: In function 'hclge_pci_init':
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:768:2: error: implicit declaration of function 'pci_clear_master' [-Werror=implicit-function-declaration]
     pci_clear_master(pdev);
     ^
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c: In function 'hclge_init_msix':
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:1862:15: error: invalid application of 'sizeof' to incomplete type 'struct msix_entry'
           sizeof(struct msix_entry),
                  ^
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:1873:3: error: invalid use of undefined type 'struct msix_entry'
      hdev->msix_entries[i].entry = i;
      ^
>> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:1873:21: error: dereferencing pointer to incomplete type

      hdev->msix_entries[i].entry = i;
                        ^
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:1882:2: error: implicit declaration of function 'pci_enable_msix_range' [-Werror=implicit-function-declaration]
     ret = pci_enable_msix_range(hdev->pdev, hdev->msix_entries,
     ^
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c: In function 'hclge_init_msi':
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:1907:2: error: implicit declaration of function 'pci_alloc_irq_vectors' [-Werror=implicit-function-declaration]
     vectors = pci_alloc_irq_vectors(pdev, 1, hdev->num_msi, PCI_IRQ_MSI);
     ^
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:1907:58: error: 'PCI_IRQ_MSI' undeclared (first use in this function)
     vectors = pci_alloc_irq_vectors(pdev, 1, hdev->num_msi, PCI_IRQ_MSI);
                                                             ^
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:1907:58: note: each undeclared identifier is reported only once for each function it appears in
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c: In function 'hclge_init_ae_dev':
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:2335:2: error: implicit declaration of function 'pci_match_id' [-Werror=implicit-function-declaration]
     id = pci_match_id(roce_pci_tbl, ae_dev->pdev);
     ^
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:2335:5: warning: assignment makes pointer from integer without a cast
     id = pci_match_id(roce_pci_tbl, ae_dev->pdev);
        ^
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c: In function 'hclge_pci_uninit':
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:2444:3: error: implicit declaration of function 'pci_disable_msix' [-Werror=implicit-function-declaration]
      pci_disable_msix(pdev);
      ^
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:2448:3: error: implicit declaration of function 'pci_disable_msi' [-Werror=implicit-function-declaration]
      pci_disable_msi(pdev);
      ^
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:2452:2: error: implicit declaration of function 'pci_release_mem_regions' [-Werror=implicit-function-declaration]
     pci_release_mem_regions(pdev);
     ^
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c: In function 'hclge_get_vector':
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:2518:5: error: implicit declaration of function 'pci_irq_vector' [-Werror=implicit-function-declaration]
        vector->vector = pci_irq_vector(hdev->pdev, i);
        ^
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c: In function 'hclge_get_vector_index':
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:2545:4: error: invalid use of undefined type 'struct msix_entry'
       if (vector == hdev->msix_entries[i].vector)
       ^
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:2545:36: error: dereferencing pointer to incomplete type
       if (vector == hdev->msix_entries[i].vector)
                                       ^
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c: At top level:
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:2456:13: warning: 'hclge_disable_sriov' defined but not used [-Wunused-function]
    static void hclge_disable_sriov(struct hclge_dev *hdev)
                ^
   cc1: some warnings being treated as errors

vim +1873 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c

05219959 Salil Mehta 2017-06-14  1856  static int hclge_init_msix(struct hclge_dev *hdev)
05219959 Salil Mehta 2017-06-14  1857  {
05219959 Salil Mehta 2017-06-14  1858  	struct pci_dev *pdev = hdev->pdev;
05219959 Salil Mehta 2017-06-14  1859  	int ret, i;
05219959 Salil Mehta 2017-06-14  1860  
05219959 Salil Mehta 2017-06-14  1861  	hdev->msix_entries = devm_kcalloc(&pdev->dev, hdev->num_msi,
05219959 Salil Mehta 2017-06-14 @1862  					  sizeof(struct msix_entry),
05219959 Salil Mehta 2017-06-14  1863  					  GFP_KERNEL);
05219959 Salil Mehta 2017-06-14  1864  	if (!hdev->msix_entries)
05219959 Salil Mehta 2017-06-14  1865  		return -ENOMEM;
05219959 Salil Mehta 2017-06-14  1866  
05219959 Salil Mehta 2017-06-14  1867  	hdev->vector_status = devm_kcalloc(&pdev->dev, hdev->num_msi,
05219959 Salil Mehta 2017-06-14  1868  					   sizeof(u16), GFP_KERNEL);
05219959 Salil Mehta 2017-06-14  1869  	if (!hdev->vector_status)
05219959 Salil Mehta 2017-06-14  1870  		return -ENOMEM;
05219959 Salil Mehta 2017-06-14  1871  
05219959 Salil Mehta 2017-06-14  1872  	for (i = 0; i < hdev->num_msi; i++) {
05219959 Salil Mehta 2017-06-14 @1873  		hdev->msix_entries[i].entry = i;
05219959 Salil Mehta 2017-06-14  1874  		hdev->vector_status[i] = HCLGE_INVALID_VPORT;
05219959 Salil Mehta 2017-06-14  1875  	}
05219959 Salil Mehta 2017-06-14  1876  

:::::: The code at line 1873 was first introduced by commit
:::::: 05219959390d67c9087522bdec6dea07927ebada net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support

:::::: TO: Salil Mehta <salil.mehta@huawei.com>
:::::: CC: 0day robot <fengguang.wu@intel.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
kernel test robot June 14, 2017, 3:37 p.m. UTC | #2
Hi Salil,

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Salil-Mehta/Hisilicon-Network-Subsystem-3-Ethernet-Driver/20170614-162343
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

>> ERROR: "__udivdi3" [drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3.ko] undefined!


---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox series

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index 8b8249b..cda0e80 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6070,6 +6070,14 @@  S:	Maintained
 F:	drivers/net/ethernet/hisilicon/
 F:	Documentation/devicetree/bindings/net/hisilicon*.txt
 
+HISILICON NETWORK SUBSYSTEM 3 DRIVER (HNS3)
+M:	Yisen Zhuang <yisen.zhuang@huawei.com>
+M:	Salil Mehta <salil.mehta@huawei.com>
+L:	netdev@vger.kernel.org
+W:	http://www.hisilicon.com
+S:	Maintained
+F:	drivers/net/ethernet/hisilicon/hns3/
+
 HISILICON ROCE DRIVER
 M:	Lijun Ou <oulijun@huawei.com>
 M:	Wei Hu(Xavier) <xavier.huwei@huawei.com>
diff --git a/drivers/net/ethernet/hisilicon/Kconfig b/drivers/net/ethernet/hisilicon/Kconfig
index d11287e..2c48fce 100644
--- a/drivers/net/ethernet/hisilicon/Kconfig
+++ b/drivers/net/ethernet/hisilicon/Kconfig
@@ -76,4 +76,28 @@  config HNS_ENET
 	  This selects the general ethernet driver for HNS.  This module make
 	  use of any HNS AE driver, such as HNS_DSAF
 
+config HNS3
+	tristate "Hisilicon Network Subsystem Support HNS3 (Framework)"
+	---help---
+	  This selects the framework support for Hisilicon Network Subsystem 3.
+	  This layer facilitates clients like ENET, RoCE and user-space ethernet
+	  drivers(like ODP)to register with HNAE devices and their associated
+	  operations.
+
+config HNS3_HCLGE
+	tristate "Hisilicon HNS3 HCLGE Acceleration Engine & Compatibility Layer Support"
+	select HNS3
+	---help---
+	  This selects the HNS3_HCLGE network acceleration engine & its hardware
+	  compatibility layer. The engine would be used in Hisilicon hip08 family of
+	  SoCs and further upcoming SoCs.
+
+config HNS3_ENET
+	tristate "Hisilicon HNS3 Ethernet Device Support"
+	select HNS3
+	---help---
+	  This selects the Ethernet Driver for Hisilicon Network Subsystem 3 for hip08
+	  family of SoCs. This module depends upon HNAE3 driver to access the HNAE3
+	  devices and their associated operations.
+
 endif # NET_VENDOR_HISILICON
diff --git a/drivers/net/ethernet/hisilicon/Makefile b/drivers/net/ethernet/hisilicon/Makefile
index 8661695..3828c43 100644
--- a/drivers/net/ethernet/hisilicon/Makefile
+++ b/drivers/net/ethernet/hisilicon/Makefile
@@ -6,4 +6,5 @@  obj-$(CONFIG_HIX5HD2_GMAC) += hix5hd2_gmac.o
 obj-$(CONFIG_HIP04_ETH) += hip04_eth.o
 obj-$(CONFIG_HNS_MDIO) += hns_mdio.o
 obj-$(CONFIG_HNS) += hns/
+obj-$(CONFIG_HNS3) += hns3/
 obj-$(CONFIG_HISI_FEMAC) += hisi_femac.o
diff --git a/drivers/net/ethernet/hisilicon/hns3/Makefile b/drivers/net/ethernet/hisilicon/hns3/Makefile
new file mode 100644
index 0000000..5e53735
--- /dev/null
+++ b/drivers/net/ethernet/hisilicon/hns3/Makefile
@@ -0,0 +1,7 @@ 
+#
+# Makefile for the HISILICON network device drivers.
+#
+
+obj-$(CONFIG_HNS3) += hns3pf/
+
+obj-$(CONFIG_HNS3) +=hnae3.o
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/Makefile b/drivers/net/ethernet/hisilicon/hns3/hns3pf/Makefile
new file mode 100644
index 0000000..c0a92b5
--- /dev/null
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/Makefile
@@ -0,0 +1,11 @@ 
+#
+# Makefile for the HISILICON network device drivers.
+#
+
+ccflags-y := -Idrivers/net/ethernet/hisilicon/hns3
+
+obj-$(CONFIG_HNS3_HCLGE) += hclge.o
+hclge-objs =hclge_main.o hclge_cmd.o hclge_mdio.o hclge_tm.o
+
+obj-$(CONFIG_HNS3_ENET) += hns3.o
+hns3-objs = hns3_enet.o hns3_ethtool.o