Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1159937/?format=api
{ "id": 1159937, "url": "http://patchwork.ozlabs.org/api/patches/1159937/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190909134747.10415-2-anthony.l.nguyen@intel.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20190909134747.10415-2-anthony.l.nguyen@intel.com>", "list_archive_url": null, "date": "2019-09-09T13:47:43", "name": "[S29,v3,2/6] ice: Fix FW version formatting in dmesg", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "212d5fe6d4341c8e48a0462bd9bdf9681738df46", "submitter": { "id": 68875, "url": "http://patchwork.ozlabs.org/api/people/68875/?format=api", "name": "Tony Nguyen", "email": "anthony.l.nguyen@intel.com" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190909134747.10415-2-anthony.l.nguyen@intel.com/mbox/", "series": [ { "id": 129833, "url": "http://patchwork.ozlabs.org/api/series/129833/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=129833", "date": "2019-09-09T13:47:42", "name": "[S29,v3,1/6] ice: send driver version to firmware", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/129833/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1159937/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1159937/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.133; helo=hemlock.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=intel.com" ], "Received": [ "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 46S2Zw4VWRz9sPF\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 10 Sep 2019 08:17:11 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 2F8B3878C4;\n\tMon, 9 Sep 2019 22:17:10 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id UfnEm7KetoQj; Mon, 9 Sep 2019 22:17:09 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 776F3878B3;\n\tMon, 9 Sep 2019 22:17:09 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 7D16A1BF375\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 9 Sep 2019 22:17:06 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 758FA8790D\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 9 Sep 2019 22:17:06 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id ZGh8PkRJJTcP for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 9 Sep 2019 22:17:03 +0000 (UTC)", "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id CEEC4877E4\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 9 Sep 2019 22:17:03 +0000 (UTC)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t09 Sep 2019 15:17:03 -0700", "from unknown (HELO localhost.jf.intel.com) ([10.166.244.174])\n\tby FMSMGA003.fm.intel.com with ESMTP; 09 Sep 2019 15:17:02 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.64,487,1559545200\"; d=\"scan'208\";a=\"191631113\"", "From": "Tony Nguyen <anthony.l.nguyen@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Mon, 9 Sep 2019 06:47:43 -0700", "Message-Id": "<20190909134747.10415-2-anthony.l.nguyen@intel.com>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20190909134747.10415-1-anthony.l.nguyen@intel.com>", "References": "<20190909134747.10415-1-anthony.l.nguyen@intel.com>", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [PATCH S29 v3 2/6] ice: Fix FW version formatting\n\tin dmesg", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "From: Lukasz Czapnik <lukasz.czapnik@intel.com>\n\nThe FW build id is currently being displayed as an int which doesn't make\nsense. Instead display FW build id as a hex value. Also add other useful\ninformation to the output such as NVM version, api patch info, and FW\nbuild hash.\n\nSigned-off-by: Lukasz Czapnik <lukasz.czapnik@intel.com>\nSigned-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>\n---\n drivers/net/ethernet/intel/ice/ice.h | 1 -\n drivers/net/ethernet/intel/ice/ice_common.c | 23 ++++++++++++++++++\n drivers/net/ethernet/intel/ice/ice_common.h | 3 +++\n drivers/net/ethernet/intel/ice/ice_ethtool.c | 25 --------------------\n drivers/net/ethernet/intel/ice/ice_lib.c | 19 +++++++++++++++\n drivers/net/ethernet/intel/ice/ice_lib.h | 2 ++\n drivers/net/ethernet/intel/ice/ice_main.c | 7 +++---\n drivers/net/ethernet/intel/ice/ice_type.h | 2 ++\n 8 files changed, 53 insertions(+), 29 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h\nindex 4cdedcebb163..3a3e69a2bc5a 100644\n--- a/drivers/net/ethernet/intel/ice/ice.h\n+++ b/drivers/net/ethernet/intel/ice/ice.h\n@@ -53,7 +53,6 @@ extern const char ice_drv_ver[];\n \n #define ICE_DFLT_TRAFFIC_CLASS\tBIT(0)\n #define ICE_INT_NAME_STR_LEN\t(IFNAMSIZ + 16)\n-#define ICE_ETHTOOL_FWVER_LEN\t32\n #define ICE_AQ_LEN\t\t64\n #define ICE_MBXSQ_LEN\t\t64\n #define ICE_MBXRQ_LEN\t\t512\ndiff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c\nindex db62cc748544..22d2a11ef41f 100644\n--- a/drivers/net/ethernet/intel/ice/ice_common.c\n+++ b/drivers/net/ethernet/intel/ice/ice_common.c\n@@ -728,6 +728,29 @@ static void ice_get_itr_intrl_gran(struct ice_hw *hw)\n \t}\n }\n \n+/**\n+ * ice_get_nvm_version - get cached NVM version data\n+ * @hw: pointer to the hardware structure\n+ * @oem_ver: 8 bit NVM version\n+ * @oem_build: 16 bit NVM build number\n+ * @oem_patch: 8 NVM patch number\n+ * @ver_hi: high 16 bits of the NVM version\n+ * @ver_lo: low 16 bits of the NVM version\n+ */\n+void\n+ice_get_nvm_version(struct ice_hw *hw, u8 *oem_ver, u16 *oem_build,\n+\t\t u8 *oem_patch, u8 *ver_hi, u8 *ver_lo)\n+{\n+\tstruct ice_nvm_info *nvm = &hw->nvm;\n+\n+\t*oem_ver = (u8)((nvm->oem_ver & ICE_OEM_VER_MASK) >> ICE_OEM_VER_SHIFT);\n+\t*oem_patch = (u8)(nvm->oem_ver & ICE_OEM_VER_PATCH_MASK);\n+\t*oem_build = (u16)((nvm->oem_ver & ICE_OEM_VER_BUILD_MASK) >>\n+\t\t\t ICE_OEM_VER_BUILD_SHIFT);\n+\t*ver_hi = (nvm->ver & ICE_NVM_VER_HI_MASK) >> ICE_NVM_VER_HI_SHIFT;\n+\t*ver_lo = (nvm->ver & ICE_NVM_VER_LO_MASK) >> ICE_NVM_VER_LO_SHIFT;\n+}\n+\n /**\n * ice_init_hw - main hardware initialization routine\n * @hw: pointer to the hardware structure\ndiff --git a/drivers/net/ethernet/intel/ice/ice_common.h b/drivers/net/ethernet/intel/ice/ice_common.h\nindex e9d77370a17c..0525a051e05b 100644\n--- a/drivers/net/ethernet/intel/ice/ice_common.h\n+++ b/drivers/net/ethernet/intel/ice/ice_common.h\n@@ -133,6 +133,9 @@ ice_stat_update40(struct ice_hw *hw, u32 reg, bool prev_stat_loaded,\n void\n ice_stat_update32(struct ice_hw *hw, u32 reg, bool prev_stat_loaded,\n \t\t u64 *prev_stat, u64 *cur_stat);\n+void\n+ice_get_nvm_version(struct ice_hw *hw, u8 *oem_ver, u16 *oem_build,\n+\t\t u8 *oem_patch, u8 *ver_hi, u8 *ver_lo);\n enum ice_status\n ice_sched_query_elem(struct ice_hw *hw, u32 node_teid,\n \t\t struct ice_aqc_get_elem *buf);\ndiff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c\nindex d5db1426d484..a16b461b46bb 100644\n--- a/drivers/net/ethernet/intel/ice/ice_ethtool.c\n+++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c\n@@ -160,31 +160,6 @@ static const struct ice_priv_flag ice_gstrings_priv_flags[] = {\n \n #define ICE_PRIV_FLAG_ARRAY_SIZE\tARRAY_SIZE(ice_gstrings_priv_flags)\n \n-/**\n- * ice_nvm_version_str - format the NVM version strings\n- * @hw: ptr to the hardware info\n- */\n-static char *ice_nvm_version_str(struct ice_hw *hw)\n-{\n-\tstatic char buf[ICE_ETHTOOL_FWVER_LEN];\n-\tu8 ver, patch;\n-\tu32 full_ver;\n-\tu16 build;\n-\n-\tfull_ver = hw->nvm.oem_ver;\n-\tver = (u8)((full_ver & ICE_OEM_VER_MASK) >> ICE_OEM_VER_SHIFT);\n-\tbuild = (u16)((full_ver & ICE_OEM_VER_BUILD_MASK) >>\n-\t\t ICE_OEM_VER_BUILD_SHIFT);\n-\tpatch = (u8)(full_ver & ICE_OEM_VER_PATCH_MASK);\n-\n-\tsnprintf(buf, sizeof(buf), \"%x.%02x 0x%x %d.%d.%d\",\n-\t\t (hw->nvm.ver & ICE_NVM_VER_HI_MASK) >> ICE_NVM_VER_HI_SHIFT,\n-\t\t (hw->nvm.ver & ICE_NVM_VER_LO_MASK) >> ICE_NVM_VER_LO_SHIFT,\n-\t\t hw->nvm.eetrack, ver, build, patch);\n-\n-\treturn buf;\n-}\n-\n static void\n ice_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo)\n {\ndiff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c\nindex 7cd8c5d13bcc..9680692bf27c 100644\n--- a/drivers/net/ethernet/intel/ice/ice_lib.c\n+++ b/drivers/net/ethernet/intel/ice/ice_lib.c\n@@ -3275,6 +3275,25 @@ int ice_vsi_cfg_tc(struct ice_vsi *vsi, u8 ena_tc)\n }\n #endif /* CONFIG_DCB */\n \n+/**\n+ * ice_nvm_version_str - format the NVM version strings\n+ * @hw: ptr to the hardware info\n+ */\n+char *ice_nvm_version_str(struct ice_hw *hw)\n+{\n+\tu8 oem_ver, oem_patch, ver_hi, ver_lo;\n+\tstatic char buf[ICE_NVM_VER_LEN];\n+\tu16 oem_build;\n+\n+\tice_get_nvm_version(hw, &oem_ver, &oem_build, &oem_patch, &ver_hi,\n+\t\t\t &ver_lo);\n+\n+\tsnprintf(buf, sizeof(buf), \"%x.%02x 0x%x %d.%d.%d\", ver_hi, ver_lo,\n+\t\t hw->nvm.eetrack, oem_ver, oem_build, oem_patch);\n+\n+\treturn buf;\n+}\n+\n /**\n * ice_vsi_cfg_mac_fltr - Add or remove a MAC address filter for a VSI\n * @vsi: the VSI being configured MAC filter\ndiff --git a/drivers/net/ethernet/intel/ice/ice_lib.h b/drivers/net/ethernet/intel/ice/ice_lib.h\nindex 7faf8db844f6..87f7f5422b46 100644\n--- a/drivers/net/ethernet/intel/ice/ice_lib.h\n+++ b/drivers/net/ethernet/intel/ice/ice_lib.h\n@@ -120,6 +120,8 @@ int ice_vsi_manage_rss_lut(struct ice_vsi *vsi, bool ena);\n \n u32 ice_intrl_usec_to_reg(u8 intrl, u8 gran);\n \n+char *ice_nvm_version_str(struct ice_hw *hw);\n+\n enum ice_status\n ice_vsi_cfg_mac_fltr(struct ice_vsi *vsi, const u8 *macaddr, bool set);\n \ndiff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c\nindex c0988b74f007..ff295cb54cfd 100644\n--- a/drivers/net/ethernet/intel/ice/ice_main.c\n+++ b/drivers/net/ethernet/intel/ice/ice_main.c\n@@ -2558,9 +2558,10 @@ ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent)\n \t\tgoto err_exit_unroll;\n \t}\n \n-\tdev_info(dev, \"firmware %d.%d.%05d api %d.%d\\n\",\n-\t\t hw->fw_maj_ver, hw->fw_min_ver, hw->fw_build,\n-\t\t hw->api_maj_ver, hw->api_min_ver);\n+\tdev_info(dev, \"firmware %d.%d.%d api %d.%d.%d nvm %s build 0x%08x\\n\",\n+\t\t hw->fw_maj_ver, hw->fw_min_ver, hw->fw_patch,\n+\t\t hw->api_maj_ver, hw->api_min_ver, hw->api_patch,\n+\t\t ice_nvm_version_str(hw), hw->fw_build);\n \n \terr = ice_init_pf(pf);\n \tif (err) {\ndiff --git a/drivers/net/ethernet/intel/ice/ice_type.h b/drivers/net/ethernet/intel/ice/ice_type.h\nindex a2676003275a..7ec8a529b5cf 100644\n--- a/drivers/net/ethernet/intel/ice/ice_type.h\n+++ b/drivers/net/ethernet/intel/ice/ice_type.h\n@@ -230,6 +230,8 @@ struct ice_nvm_info {\n \tu8 blank_nvm_mode; /* is NVM empty (no FW present) */\n };\n \n+#define ICE_NVM_VER_LEN\t32\n+\n /* Max number of port to queue branches w.r.t topology */\n #define ICE_MAX_TRAFFIC_CLASS 8\n #define ICE_TXSCHED_MAX_BRANCHES ICE_MAX_TRAFFIC_CLASS\n", "prefixes": [ "S29", "v3", "2/6" ] }