get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/73992/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 73992,
    "url": "http://patches.dpdk.org/api/patches/73992/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1594707369-36270-2-git-send-email-xavier.huwei@huawei.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1594707369-36270-2-git-send-email-xavier.huwei@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1594707369-36270-2-git-send-email-xavier.huwei@huawei.com",
    "date": "2020-07-14T06:16:06",
    "name": "[v3,1/4] net/hns3: support copper media type",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "3d88ca6416c993df2ce0de760cd00e9b767823e7",
    "submitter": {
        "id": 1405,
        "url": "http://patches.dpdk.org/api/people/1405/?format=api",
        "name": "Wei Hu (Xavier)",
        "email": "xavier.huwei@huawei.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1594707369-36270-2-git-send-email-xavier.huwei@huawei.com/mbox/",
    "series": [
        {
            "id": 11011,
            "url": "http://patches.dpdk.org/api/series/11011/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11011",
            "date": "2020-07-14T06:16:07",
            "name": "updates for hns3 PMD driver",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/11011/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/73992/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/73992/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 3B48BA0540;\n\tTue, 14 Jul 2020 08:18:36 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 34AF51D5AA;\n\tTue, 14 Jul 2020 08:18:17 +0200 (CEST)",
            "from huawei.com (szxga07-in.huawei.com [45.249.212.35])\n by dpdk.org (Postfix) with ESMTP id 48BBF1D569\n for <dev@dpdk.org>; Tue, 14 Jul 2020 08:18:10 +0200 (CEST)",
            "from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60])\n by Forcepoint Email with ESMTP id 6CF1E5C1869E93A3C59A\n for <dev@dpdk.org>; Tue, 14 Jul 2020 14:18:07 +0800 (CST)",
            "from localhost.localdomain (10.69.192.56) by\n DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id\n 14.3.487.0; Tue, 14 Jul 2020 14:17:56 +0800"
        ],
        "From": "\"Wei Hu (Xavier)\" <xavier.huwei@huawei.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<xavier.huwei@huawei.com>",
        "Date": "Tue, 14 Jul 2020 14:16:06 +0800",
        "Message-ID": "<1594707369-36270-2-git-send-email-xavier.huwei@huawei.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1594707369-36270-1-git-send-email-xavier.huwei@huawei.com>",
        "References": "<1594462703-21448-2-git-send-email-xavier.huwei@huawei.com>\n <1594707369-36270-1-git-send-email-xavier.huwei@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.69.192.56]",
        "X-CFilter-Loop": "Reflected",
        "Subject": "[dpdk-dev] [PATCH v3 1/4] net/hns3: support copper media type",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "The hns3 network engine is built-in multiple SoCs, such as kunpeng 920,\nkunpeng 930, etc. The PCI revision id is 0x21 in kunpeng 920, and the PCI\nrevision id is 0x30 in kunpeng 930.\n\nCopper media type is supported for hns3 PF device in kunpeng 930 and later\nSoCs. The configuration operation for PHY is implemented by firmware.\n\nSigned-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>\n---\n drivers/net/hns3/hns3_ethdev.c | 6 +++++-\n drivers/net/hns3/hns3_ethdev.h | 7 +++++++\n 2 files changed, 12 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c\nindex 9575a05..f218fb8 100644\n--- a/drivers/net/hns3/hns3_ethdev.c\n+++ b/drivers/net/hns3/hns3_ethdev.c\n@@ -2823,6 +2823,9 @@ hns3_get_capability(struct hns3_hw *hw)\n \t}\n \thw->revision = revision;\n \n+\tif (revision >= PCI_REVISION_ID_HIP09_A)\n+\t\thns3_set_bit(hw->capability, HNS3_DEV_SUPPORT_COPPER_B, 1);\n+\n \treturn 0;\n }\n \n@@ -2840,7 +2843,8 @@ hns3_get_board_configuration(struct hns3_hw *hw)\n \t\treturn ret;\n \t}\n \n-\tif (cfg.media_type == HNS3_MEDIA_TYPE_COPPER) {\n+\tif (cfg.media_type == HNS3_MEDIA_TYPE_COPPER &&\n+\t    !hns3_dev_copper_supported(hw)) {\n \t\tPMD_INIT_LOG(ERR, \"media type is copper, not supported.\");\n \t\treturn -EOPNOTSUPP;\n \t}\ndiff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h\nindex 3c991f4..31d34b0 100644\n--- a/drivers/net/hns3/hns3_ethdev.h\n+++ b/drivers/net/hns3/hns3_ethdev.h\n@@ -30,6 +30,9 @@\n #define HNS3_PCI_REVISION_ID\t\t\t0x08\n #define HNS3_PCI_REVISION_ID_LEN\t\t1\n \n+#define PCI_REVISION_ID_HIP08_B\t\t\t0x21\n+#define PCI_REVISION_ID_HIP09_A\t\t\t0x30\n+\n #define HNS3_PF_FUNC_ID\t\t\t0\n #define HNS3_1ST_VF_FUNC_ID\t\t1\n \n@@ -530,10 +533,14 @@ struct hns3_adapter {\n };\n \n #define HNS3_DEV_SUPPORT_DCB_B\t\t\t0x0\n+#define HNS3_DEV_SUPPORT_COPPER_B\t\t0x1\n \n #define hns3_dev_dcb_supported(hw) \\\n \thns3_get_bit((hw)->capability, HNS3_DEV_SUPPORT_DCB_B)\n \n+#define hns3_dev_copper_supported(hw) \\\n+\thns3_get_bit((hw)->capability, HNS3_DEV_SUPPORT_COPPER_B)\n+\n #define HNS3_DEV_PRIVATE_TO_HW(adapter) \\\n \t(&((struct hns3_adapter *)adapter)->hw)\n #define HNS3_DEV_PRIVATE_TO_ADAPTER(adapter) \\\n",
    "prefixes": [
        "v3",
        "1/4"
    ]
}