From patchwork Sat Jul 22 22:09:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 108526 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp2387597qge; Sat, 22 Jul 2017 15:11:31 -0700 (PDT) X-Received: by 10.84.248.76 with SMTP id e12mr12889720pln.38.1500761491470; Sat, 22 Jul 2017 15:11:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500761491; cv=none; d=google.com; s=arc-20160816; b=Klijg7yaj3FjNDwgxDT399jYotbuThQwW2ChP6iXVSjiRw6RFg65x92x7GcOs03bE9 wsh4DsoP+s6RA4CvzVIlbi44z7uRD4qtLK56/oL/1HWH+c6eOk327nu0796n7MBghEpA PqGd3tyxhXo3enjkghj+pJPM5NBbWD9qj7jrZtIzGMGKHN4DscOeNIbsyY7ABDQ4JGqI C/pJfZdnAI0ADwXKRfx7dZzASdaqPaTgnHd8FIAHH0Dbr2cMKzugjSRoTXaz8fbFKO5g LwsI0VhagZR9KFGKYbmH5AUWZnjTgwI4vLROzHbYJ54TxfdfcFCIeLhQbFeUqM38xeU7 od+g== 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=wUb89oheJGXpw663P6rRFcz7MwGMOBh39/qET26D38U=; b=M0Um674Ruer7Z9J3HGJiU5+semFMqyHuL1odRq1mT9wIHQlN+39/4rQEQgzIV6iy0j Ur+5fJIa6UQlNPrzOdt2wZJ921RRfTlGbkZWk06YT+hJ4P5XcoxKEBsqMMwovz2T3oxO 2vhhbCuAZ4dGMM/+HTdUTdenHR6L4BucZDrWmmEt532NvfXySA25Tprcaa66b5ENNrnH w+VWFGUGQ8xC0vBlPfhI7TNuBdCBTewUPSxk4utdh2LopYWuhP+TU6QQPo9JqFzuV9J5 XAZ1sSvKjMUpA0bxLaFr9Mn2hrKNg6duN7Gkmq1GThRAOofB898rl0xMtF7fTIUGhAt7 UJfg== 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 o5si4705574pfj.483.2017.07.22.15.11.31; Sat, 22 Jul 2017 15:11:31 -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 S1755202AbdGVWL2 (ORCPT + 26 others); Sat, 22 Jul 2017 18:11:28 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:10333 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751602AbdGVWL0 (ORCPT ); Sat, 22 Jul 2017 18:11:26 -0400 Received: from 172.30.72.53 (EHLO DGGEML403-HUB.china.huawei.com) ([172.30.72.53]) by dggrg02-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id ARP67836; Sun, 23 Jul 2017 06:11:20 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.47.95.3) by DGGEML403-HUB.china.huawei.com (10.3.17.33) with Microsoft SMTP Server id 14.3.301.0; Sun, 23 Jul 2017 06:11:12 +0800 From: Salil Mehta To: CC: , , , , , , , , Subject: [PATCH V4 net-next 0/8] Hisilicon Network Subsystem 3 Ethernet Driver Date: Sat, 22 Jul 2017 23:09:34 +0100 Message-ID: <20170722220942.78852-1-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 MIME-Version: 1.0 X-Originating-IP: [10.47.95.3] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090201.5973CD89.000E, 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: ac3f5cf61cc9232cfe22198311acc363 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: 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 | 319 ++ drivers/net/ethernet/hisilicon/hns3/hnae3.h | 449 +++ .../net/ethernet/hisilicon/hns3/hns3pf/Makefile | 11 + .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 347 ++ .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 742 ++++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4240 ++++++++++++++++++++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 494 +++ .../ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c | 230 ++ .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 1018 +++++ .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h | 108 + .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 2894 +++++++++++++ .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.h | 598 +++ .../ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 543 +++ 17 files changed, 12036 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_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.11.0