Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp528585pxj; Thu, 10 Jun 2021 06:43:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5OsCv2o0nLAqLsMojegKnHmuj1zbykv1XNlnZdOsS6R2pqwu2E/0/Mo6jRnRXhwj6HIrU X-Received: by 2002:a05:6402:520c:: with SMTP id s12mr4897372edd.304.1623332609244; Thu, 10 Jun 2021 06:43:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623332609; cv=none; d=google.com; s=arc-20160816; b=ljzkBcUreHYmd7+bjmjNoa5pspWOTU8ajajwqohlA5wvbWaVv0900mx4smkuhJNomQ mBzxFTGpsXAfJuWUvOVwMYddjoVWSWOUFeAeAiqnVS1ZGJ+ZyeG0ouhT/jFasO+U3eGl vtbvWK/745WFFeDLSukbodNegjuwgPBTl1Znswd3OvhR9bfelVMNEOsmj1roBTIiUwBf Cw5DRIXF35yKHeFkiVkjptZP4Pt+14SsQa0CyEJl+tnG9eEpOkzVdS/evBKHhU4a156M +KDYormnSLfSfb587HcbwFobkpH5oSEERpd6IlWEzwyU5uxGqTYDLoYlubTCwS0zZ47S tNVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=sin/8BFcx9KAYsk9SvUDQR4YmJUwqHZrmNW09BaGNYk=; b=TfYbK3TUk7mEsl5E2vpHeLWr34WFDm9wDQzI7IJJ1GXOqkBJfRk9b6GyewnPvD9E50 o4ICQK3Dr6SaDcOHinemG3FhbmMj/T4tTeJ7AUTNpOPY3NjyyToBVQcjEro6MZkkoC0Q Fs/HcQ0MaAd9eliIOal3S17xaeok5VD/o0YStKsUHxwN0eICliHlm4bgugGPR9/fmhYL z21E3qLoV1kGWkPvrwqT6Bh1IZOxHtOE79ERR1lw8RTzop1G08dsxu3BEHrbuFnNcn0n 8zGR/8oBpzm/qBRofPHvJZtcIFkqcAbqK9RIT/Bnn8kCVolNIfxXMWvtrcUGKHI4fz/R Klvg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k24si2088227edq.487.2021.06.10.06.43.05; Thu, 10 Jun 2021 06:43:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230435AbhFJNoG (ORCPT + 99 others); Thu, 10 Jun 2021 09:44:06 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:5378 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230291AbhFJNoG (ORCPT ); Thu, 10 Jun 2021 09:44:06 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4G14mj3VHXz6wFf; Thu, 10 Jun 2021 21:38:13 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Thu, 10 Jun 2021 21:42:06 +0800 Received: from localhost.localdomain (10.67.165.24) by dggemi759-chm.china.huawei.com (10.1.198.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Thu, 10 Jun 2021 21:42:06 +0800 From: Guangbin Huang To: , , CC: , , , , , Subject: [PATCH V2 net-next 0/2] net: hns3: add support for PTP Date: Thu, 10 Jun 2021 21:38:55 +0800 Message-ID: <1623332337-54480-1-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggemi759-chm.china.huawei.com (10.1.198.145) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series adds PTP support for the HNS3 ethernet driver. change log: V1 -> V2: 1. use spinlock to prevent concurrency 2. add the handling when ptp_clock_register() returns NULL Huazhong Tan (2): net: hns3: add support for PTP net: hns3: add debugfs support for ptp info drivers/net/ethernet/hisilicon/Kconfig | 1 + drivers/net/ethernet/hisilicon/hns3/hnae3.h | 13 + drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 13 +- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 27 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 9 +- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 12 + .../net/ethernet/hisilicon/hns3/hns3pf/Makefile | 2 +- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 4 + .../ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c | 55 +++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 61 ++- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 6 + .../net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c | 544 +++++++++++++++++++++ .../net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.h | 134 +++++ 13 files changed, 873 insertions(+), 8 deletions(-) create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.h -- 2.8.1