Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/91251/?format=api
https://patches.dpdk.org/api/patches/91251/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1618321639-57642-2-git-send-email-humin29@huawei.com/", "project": { "id": 1, "url": "https://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": "<1618321639-57642-2-git-send-email-humin29@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1618321639-57642-2-git-send-email-humin29@huawei.com", "date": "2021-04-13T13:47:11", "name": "[1/9] net/hns3: fix supported speed of copper ports", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "15efdf73a2eded18226bf652a69c378eb9ef2df8", "submitter": { "id": 1944, "url": "https://patches.dpdk.org/api/people/1944/?format=api", "name": "humin (Q)", "email": "humin29@huawei.com" }, "delegate": { "id": 319, "url": "https://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1618321639-57642-2-git-send-email-humin29@huawei.com/mbox/", "series": [ { "id": 16336, "url": "https://patches.dpdk.org/api/series/16336/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=16336", "date": "2021-04-13T13:47:11", "name": "support speed capability and autoneg report", "version": 1, "mbox": "https://patches.dpdk.org/series/16336/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/91251/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/91251/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 62F4BA0524;\n\tTue, 13 Apr 2021 15:47:08 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3E7BF160FC8;\n\tTue, 13 Apr 2021 15:47:08 +0200 (CEST)", "from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32])\n by mails.dpdk.org (Postfix) with ESMTP id AFA86160FBC\n for <dev@dpdk.org>; Tue, 13 Apr 2021 15:47:06 +0200 (CEST)", "from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59])\n by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4FKRgY3hBZzlXpf\n for <dev@dpdk.org>; Tue, 13 Apr 2021 21:45:13 +0800 (CST)", "from localhost.localdomain (10.69.192.56) by\n DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id\n 14.3.498.0; Tue, 13 Apr 2021 21:47:00 +0800" ], "From": "\"Min Hu (Connor)\" <humin29@huawei.com>", "To": "<dev@dpdk.org>", "CC": "<ferruh.yigit@intel.com>", "Date": "Tue, 13 Apr 2021 21:47:11 +0800", "Message-ID": "<1618321639-57642-2-git-send-email-humin29@huawei.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1618321639-57642-1-git-send-email-humin29@huawei.com>", "References": "<1618321639-57642-1-git-send-email-humin29@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 1/9] net/hns3: fix supported speed of copper ports", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "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": "From: Huisong Li <lihuisong@huawei.com>\n\nThe \"supported\" obtaining from firmware on copper ports includes the\nspeed capability, auto-negotiation capability, and flow control\ncapability. Therefore, this patch changes \"supported_capa\" to\n\"supported_speed\" and parses the speed capability supported by the\ndriver from the \"supported\".\n\nFixes: 2e4859f3b362 (\"net/hns3: support PF device with copper PHYs\")\n\nSigned-off-by: Huisong Li <lihuisong@huawei.com>\nSigned-off-by: Min Hu (Connor) <humin29@huawei.com>\n---\n drivers/net/hns3/hns3_ethdev.c | 11 +++++++----\n drivers/net/hns3/hns3_ethdev.h | 2 +-\n 2 files changed, 8 insertions(+), 5 deletions(-)", "diff": "diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c\nindex 846e5a2..d7766e1 100644\n--- a/drivers/net/hns3/hns3_ethdev.c\n+++ b/drivers/net/hns3/hns3_ethdev.c\n@@ -4612,7 +4612,10 @@ hns3_update_fiber_link_info(struct hns3_hw *hw)\n static void\n hns3_parse_copper_phy_params(struct hns3_cmd_desc *desc, struct hns3_mac *mac)\n {\n+#define HNS3_PHY_SUPPORTED_SPEED_MASK 0x2f\n+\n \tstruct hns3_phy_params_bd0_cmd *req;\n+\tuint32_t supported;\n \n \treq = (struct hns3_phy_params_bd0_cmd *)desc[0].data;\n \tmac->link_speed = rte_le_to_cpu_32(req->speed);\n@@ -4620,11 +4623,11 @@ hns3_parse_copper_phy_params(struct hns3_cmd_desc *desc, struct hns3_mac *mac)\n \t\t\t\t\t HNS3_PHY_DUPLEX_CFG_B);\n \tmac->link_autoneg = hns3_get_bit(req->autoneg,\n \t\t\t\t\t HNS3_PHY_AUTONEG_CFG_B);\n-\tmac->supported_capa = rte_le_to_cpu_32(req->supported);\n \tmac->advertising = rte_le_to_cpu_32(req->advertising);\n \tmac->lp_advertising = rte_le_to_cpu_32(req->lp_advertising);\n-\tmac->support_autoneg = !!(mac->supported_capa &\n-\t\t\t\tHNS3_PHY_LINK_MODE_AUTONEG_BIT);\n+\tsupported = rte_le_to_cpu_32(req->supported);\n+\tmac->supported_speed = supported & HNS3_PHY_SUPPORTED_SPEED_MASK;\n+\tmac->support_autoneg = !!(supported & HNS3_PHY_LINK_MODE_AUTONEG_BIT);\n }\n \n static int\n@@ -4673,7 +4676,7 @@ hns3_update_copper_link_info(struct hns3_hw *hw)\n \tmac->link_speed = mac_info.link_speed;\n \tmac->link_duplex = mac_info.link_duplex;\n \tmac->link_autoneg = mac_info.link_autoneg;\n-\tmac->supported_capa = mac_info.supported_capa;\n+\tmac->supported_speed = mac_info.supported_speed;\n \tmac->advertising = mac_info.advertising;\n \tmac->lp_advertising = mac_info.lp_advertising;\n \tmac->support_autoneg = mac_info.support_autoneg;\ndiff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h\nindex 72d718c..cbeadc0 100644\n--- a/drivers/net/hns3/hns3_ethdev.h\n+++ b/drivers/net/hns3/hns3_ethdev.h\n@@ -183,7 +183,7 @@ struct hns3_mac {\n \tuint8_t link_autoneg : 1; /* ETH_LINK_[AUTONEG/FIXED] */\n \tuint8_t link_status : 1; /* ETH_LINK_[DOWN/UP] */\n \tuint32_t link_speed; /* ETH_SPEED_NUM_ */\n-\tuint32_t supported_capa; /* supported capability for current media */\n+\tuint32_t supported_speed; /* supported speed for current media type */\n \tuint32_t advertising; /* advertised capability in the local part */\n \t/* advertised capability in the link partner */\n \tuint32_t lp_advertising;\n", "prefixes": [ "1/9" ] }{ "id": 91251, "url": "