get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 73804,
    "url": "http://patchwork.dpdk.org/api/patches/73804/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1594462703-21448-2-git-send-email-xavier.huwei@huawei.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<1594462703-21448-2-git-send-email-xavier.huwei@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1594462703-21448-2-git-send-email-xavier.huwei@huawei.com",
    "date": "2020-07-11T10:18:20",
    "name": "[v2,1/4] net/hns3: support copper media type",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "3d88ca6416c993df2ce0de760cd00e9b767823e7",
    "submitter": {
        "id": 1405,
        "url": "http://patchwork.dpdk.org/api/people/1405/?format=api",
        "name": "Wei Hu (Xavier)",
        "email": "xavier.huwei@huawei.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1594462703-21448-2-git-send-email-xavier.huwei@huawei.com/mbox/",
    "series": [
        {
            "id": 10969,
            "url": "http://patchwork.dpdk.org/api/series/10969/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=10969",
            "date": "2020-07-11T10:18:20",
            "name": "updates for hns3 PMD driver",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/10969/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/73804/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/73804/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 C6998A0528;\n\tSat, 11 Jul 2020 12:20:23 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 26E421D962;\n\tSat, 11 Jul 2020 12:20:22 +0200 (CEST)",
            "from huawei.com (szxga06-in.huawei.com [45.249.212.32])\n by dpdk.org (Postfix) with ESMTP id E17F71D93C\n for <dev@dpdk.org>; Sat, 11 Jul 2020 12:20:19 +0200 (CEST)",
            "from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59])\n by Forcepoint Email with ESMTP id B7B99EAD6FAA2AB62CA9\n for <dev@dpdk.org>; Sat, 11 Jul 2020 18:20:17 +0800 (CST)",
            "from localhost.localdomain (10.69.192.56) by\n DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id\n 14.3.487.0; Sat, 11 Jul 2020 18:20:10 +0800"
        ],
        "From": "\"Wei Hu (Xavier)\" <xavier.huwei@huawei.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<xavier.huwei@huawei.com>",
        "Date": "Sat, 11 Jul 2020 18:18:20 +0800",
        "Message-ID": "<1594462703-21448-2-git-send-email-xavier.huwei@huawei.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1594462703-21448-1-git-send-email-xavier.huwei@huawei.com>",
        "References": "<1594462703-21448-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 v2 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": [
        "v2",
        "1/4"
    ]
}