From patchwork Wed Aug 2 15:59:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 109235 Delivered-To: patch@linaro.org Received: by 10.140.101.6 with SMTP id t6csp2953970qge; Wed, 2 Aug 2017 09:00:50 -0700 (PDT) X-Received: by 10.99.143.67 with SMTP id r3mr22533909pgn.126.1501689650203; Wed, 02 Aug 2017 09:00:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501689650; cv=none; d=google.com; s=arc-20160816; b=JvUI42QUp0o2CIwJq9qNPO/NbkK3yuBOd7CfF35l32RiB163b/tlEG4XH6Xakyxnry OCQqVW9SYeTQsRPCgqmphr2nn+gtxJ9h2x0c5JxnCijW0VIwl7+PU928OloM0iWopoXc 920ra968W3OfTRIj5b66QDPBfWPsNN4xsFBZypFC+p4MQY4pOlHglGt3HJ4WQ502SSzp yv+x8VlQtz6zENV/ocHyTX+0I4jYosuSv2rszLcpJVDTaOt+BQjTAY79in+algjrfoDU YAMj8ZL5XYSe4xzO7714t91nw5G9QFA6kNnCEIxwrBLg2XR2YMuhECjNvxN69xcs0K+t 0cxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=44E4tIjwZapl/RNKpmgIFi6AF6sABSzIp1CAn4owFVU=; b=wZ2bY1qZp3jkI75CfNE1RQH8elwLykPElwG09Y7ejKD/02gvBRq0Z/uzUYAt6uUJiA 4IXrV/lm6f2HD8elIDXrwvofXKROZzYnJkjQ1aI5Ru0w9I85R1gGxyDtbzfRvEA5yC1k ecWu46mfAnahgucIREkQC1JnoARl4j3fUdShYNHnL93PY/bZEGyg6ZihFQTlA0UiKfFJ D+JiBJle45jPDSsDCnc1ronNUfQZVRJLSsX5dJPE2J+mxvA3PtQUb0mB4Dn7z6tN/KnP wQQZokRMJrGqs0RCQ9ZPRmXvgohzOpA4QymMi5hCGnUM+J8nMyODxt1HCJrifyVZ7qLG QLSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g62si5147371pgc.652.2017.08.02.09.00.49; Wed, 02 Aug 2017 09:00:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751966AbdHBQAs (ORCPT + 25 others); Wed, 2 Aug 2017 12:00:48 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:9897 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751067AbdHBQAq (ORCPT ); Wed, 2 Aug 2017 12:00:46 -0400 Received: from 172.30.72.54 (EHLO dggeml405-hub.china.huawei.com) ([172.30.72.54]) by dggrg03-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id ASR72033; Thu, 03 Aug 2017 00:00:40 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.203.181.161) by dggeml405-hub.china.huawei.com (10.3.17.49) with Microsoft SMTP Server id 14.3.301.0; Thu, 3 Aug 2017 00:00:32 +0800 From: Salil Mehta To: CC: , , , , , , , , Subject: [PATCH V6 net-next 0/8] Hisilicon Network Subsystem 3 Ethernet Driver Date: Wed, 2 Aug 2017 16:59:44 +0100 Message-ID: <20170802155952.185564-1-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 MIME-Version: 1.0 X-Originating-IP: [10.203.181.161] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090205.5981F729.0024, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 670fae40d12d69c624156235423edacf Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch-set contains the support of the HNS3 (Hisilicon Network Subsystem 3) Ethernet driver for hip08 family of SoCs and future upcoming SoCs. Hisilicon's new hip08 SoCs have integrated ethernet based on PCI Express and hence there was a need of new driver over the previous HNS driver which is already part of the Linux mainline. This new driver is NOT backward compatible with HNS. This current driver is meant to control the Physical Function and there would soon be a support of a separate driver for Virtual Function once this base PF driver has been accepted. Also, this driver is the ongoing development work and HNS3 Ethernet driver would be incrementally enhanced with more new features. High Level Architecture: [ Ethtool ] ^ | | | [Ethernet Client] [ODP/UIO Client] . . . [ RoCE Client ] | | [ HNAE Device ] | | | --------------------------------------------- | | | [ HNAE3 Framework (Register/unregister) ] | | | --------------------------------------------- | | | [ HCLGE Layer] | ________________|_________________ | | | | | [ MDIO ] [ Scheduler/Shaper ] [ Debugfs* ] | | | | | |________________|_________________| | | | [ IMP command Interface ] | --------------------------------------------- | HIP08 H A R D W A R E * Current patch-set broadly adds the support of the following PF functionality: 1. Basic Rx and Tx functionality 2. TSO support 3. Ethtool support 4. * Debugfs support -> this patch for now has been taken off. 5. HNAE framework and hardware compatability layer 6. Scheduler and Shaper support in transmit function 7. MDIO support Change Log: V5->V6: Addressed below comments: * Andrew Lunn: Comments on MDIO and ethtool link mode * Leon Romanvosky: Some comments on HNAE layer tidy-up * Internal comments on redundant code removal, fixing error types etc. V4->V5: Addressed below concerns: * Florian Fanelli: Miscellaneous comments on ethtool & enet layer * Stephen Hemminger: comment of Netdev stats in ethool layer * Leon Romanvosky: Comments on Driver Version String, naming & Kconfig * Rochard Cochran: Redundant function prototype V3->V4: Addressed below comments: * Andrew Lunn: Various comments on MDIO, ethtool, ENET driver etc, * Stephen Hemminger: change access and updation to 64 but statistics * Bo You: some spelling mistakes and checkpatch.pl errors. V2->V3: Addressed comments * Yuval Mintz: Removal of redundant userprio-to-tc code * Stephen Hemminger: Ethtool & interuupt enable * Andrew Lunn: On C45/C22 PHy support, HNAE, ethtool * Florian Fainelli: C45/C22 and phy_connect/attach * Intel kbuild errors V1->V2: Addressed some comments by kbuild, Yuval MIntz, Andrew Lunn & Florian Fainelli in the following patches: * Add support of HNS3 Ethernet Driver for hip08 SoC * Add MDIO support to HNS3 Ethernet driver for hip08 SoC * Add support of debugfs interface to HNS3 driver Salil Mehta (8): net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC net: hns3: Add support of the HNAE3 framework net: hns3: Add HNS3 IMP(Integrated Mgmt Proc) Cmd Interface Support net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver net: hns3: Add MDIO support to HNS3 Ethernet driver for hip08 SoC net: hns3: Add Ethtool support to HNS3 driver net: hns3: Add HNS3 driver to kernel build framework & MAINTAINERS MAINTAINERS | 8 + drivers/net/ethernet/hisilicon/Kconfig | 27 + drivers/net/ethernet/hisilicon/Makefile | 1 + drivers/net/ethernet/hisilicon/hns3/Makefile | 7 + drivers/net/ethernet/hisilicon/hns3/hnae3.c | 300 ++ drivers/net/ethernet/hisilicon/hns3/hnae3.h | 444 ++ .../net/ethernet/hisilicon/hns3/hns3pf/Makefile | 11 + .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 356 ++ .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 740 ++++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4267 ++++++++++++++++++++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 519 +++ .../ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c | 213 + .../ethernet/hisilicon/hns3/hns3pf/hclge_mdio.h | 17 + .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 1015 +++++ .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h | 106 + .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 2848 +++++++++++++ .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.h | 592 +++ .../ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 482 +++ 18 files changed, 11953 insertions(+) create mode 100644 drivers/net/ethernet/hisilicon/hns3/Makefile create mode 100644 drivers/net/ethernet/hisilicon/hns3/hnae3.c create mode 100644 drivers/net/ethernet/hisilicon/hns3/hnae3.h create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3pf/Makefile create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.h create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.h create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c -- 2.7.4