Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/17695/?format=api
http://patches.dpdk.org/api/patches/17695/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1481008582-69416-3-git-send-email-qiming.yang@intel.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": "<1481008582-69416-3-git-send-email-qiming.yang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1481008582-69416-3-git-send-email-qiming.yang@intel.com", "date": "2016-12-06T07:16:19", "name": "[dpdk-dev,v2,2/5] net/e1000: add firmware version get", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "d0d7b44586c21caedbacda6fd93cf3a22bb4bad9", "submitter": { "id": 522, "url": "http://patches.dpdk.org/api/people/522/?format=api", "name": "Qiming Yang", "email": "qiming.yang@intel.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/1481008582-69416-3-git-send-email-qiming.yang@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/17695/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/17695/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 53AE932A5;\n\tTue, 6 Dec 2016 08:21:39 +0100 (CET)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 435522A66\n\tfor <dev@dpdk.org>; Tue, 6 Dec 2016 08:21:18 +0100 (CET)", "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga101.fm.intel.com with ESMTP; 05 Dec 2016 23:21:17 -0800", "from unknown (HELO dpdk7.bj.intel.com) ([172.16.182.76])\n\tby orsmga001.jf.intel.com with ESMTP; 05 Dec 2016 23:21:16 -0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos; i=\"5.33,751,1477983600\"; d=\"scan'208\";\n\ta=\"1068469752\"", "From": "Qiming Yang <qiming.yang@intel.com>", "To": "dev@dpdk.org", "Cc": "Qiming Yang <qiming.yang@intel.com>", "Date": "Tue, 6 Dec 2016 15:16:19 +0800", "Message-Id": "<1481008582-69416-3-git-send-email-qiming.yang@intel.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1481008582-69416-1-git-send-email-qiming.yang@intel.com>", "References": "<1479375779-46629-2-git-send-email-qiming.yang@intel.com>\n\t<1481008582-69416-1-git-send-email-qiming.yang@intel.com>", "Subject": "[dpdk-dev] [PATCH v2 2/5] net/e1000: add firmware version get", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Signed-off-by: Qiming Yang <qiming.yang@intel.com>\n---\n drivers/net/e1000/igb_ethdev.c | 46 ++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 46 insertions(+)", "diff": "diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c\nindex 2fddf0c..c47f1c8 100644\n--- a/drivers/net/e1000/igb_ethdev.c\n+++ b/drivers/net/e1000/igb_ethdev.c\n@@ -120,6 +120,8 @@ static int eth_igb_xstats_get_names(struct rte_eth_dev *dev,\n \t\t\t\t unsigned limit);\n static void eth_igb_stats_reset(struct rte_eth_dev *dev);\n static void eth_igb_xstats_reset(struct rte_eth_dev *dev);\n+static void eth_igb_fw_version_get(struct rte_eth_dev *dev,\n+\t\t\t\t char *fw_version, int fw_length);\n static void eth_igb_infos_get(struct rte_eth_dev *dev,\n \t\t\t struct rte_eth_dev_info *dev_info);\n static const uint32_t *eth_igb_supported_ptypes_get(struct rte_eth_dev *dev);\n@@ -388,6 +390,7 @@ static const struct eth_dev_ops eth_igb_ops = {\n \t.xstats_get_names = eth_igb_xstats_get_names,\n \t.stats_reset = eth_igb_stats_reset,\n \t.xstats_reset = eth_igb_xstats_reset,\n+\t.fw_version_get = eth_igb_fw_version_get,\n \t.dev_infos_get = eth_igb_infos_get,\n \t.dev_supported_ptypes_get = eth_igb_supported_ptypes_get,\n \t.mtu_set = eth_igb_mtu_set,\n@@ -1977,6 +1980,49 @@ eth_igbvf_stats_reset(struct rte_eth_dev *dev)\n }\n \n static void\n+eth_igb_fw_version_get(struct rte_eth_dev *dev, char *fw_version,\n+\t\t int fw_length)\n+{\n+\tstruct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tstruct e1000_fw_version fw;\n+\n+\te1000_get_fw_version(hw, &fw);\n+\n+\tswitch (hw->mac.type) {\n+\tcase e1000_i210:\n+\tcase e1000_i211:\n+\t\tif (!(e1000_get_flash_presence_i210(hw))) {\n+\t\t\tsnprintf(fw_version, fw_length,\n+\t\t\t\t \"%2d.%2d-%d\",\n+\t\t\t\t fw.invm_major, fw.invm_minor,\n+\t\t\t\t fw.invm_img_type);\n+\t\t\tbreak;\n+\t\t}\n+\t\t/* fall through */\n+\tdefault:\n+\t\t/* if option rom is valid, display its version too*/\n+\t\tif (fw.or_valid) {\n+\t\t\tsnprintf(fw_version, fw_length,\n+\t\t\t\t \"%d.%d, 0x%08x, %d.%d.%d\",\n+\t\t\t\t fw.eep_major, fw.eep_minor, fw.etrack_id,\n+\t\t\t\t fw.or_major, fw.or_build, fw.or_patch);\n+\t\t/* no option rom */\n+\t\t} else {\n+\t\t\tif (fw.etrack_id != 0X0000) {\n+\t\t\tsnprintf(fw_version, fw_length,\n+\t\t\t\t \"%d.%d, 0x%08x\",\n+\t\t\t\t fw.eep_major, fw.eep_minor, fw.etrack_id);\n+\t\t\t} else {\n+\t\t\tsnprintf(fw_version, fw_length,\n+\t\t\t\t \"%d.%d.%d\",\n+\t\t\t\t fw.eep_major, fw.eep_minor, fw.eep_build);\n+\t\t\t}\n+\t\t}\n+\t\tbreak;\n+\t}\n+}\n+\n+static void\n eth_igb_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n {\n \tstruct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n", "prefixes": [ "dpdk-dev", "v2", "2/5" ] }{ "id": 17695, "url": "