Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1158737/?format=api
{ "id": 1158737, "url": "http://patchwork.ozlabs.org/api/patches/1158737/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190905153956.53086-1-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": "<20190905153956.53086-1-anthony.l.nguyen@intel.com>", "list_archive_url": null, "date": "2019-09-05T15:39:51", "name": "[S29,1/6] ice: send driver version to firmware", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "45ee5a34c972bdbbdbbf5525b7fa7739d8ec53f9", "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/20190905153956.53086-1-anthony.l.nguyen@intel.com/mbox/", "series": [ { "id": 129309, "url": "http://patchwork.ozlabs.org/api/series/129309/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=129309", "date": "2019-09-05T15:39:51", "name": "[S29,1/6] ice: send driver version to firmware", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/129309/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1158737/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1158737/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.138; helo=whitealder.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 whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\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 46PdGG4kb4z9sDB\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 6 Sep 2019 10:09:26 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 232278489C;\n\tFri, 6 Sep 2019 00:09:25 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 0OZYcB5zjbms; Fri, 6 Sep 2019 00:09:22 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 17FF3838F6;\n\tFri, 6 Sep 2019 00:09:22 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 35F351BF9BD\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 6 Sep 2019 00:09:20 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 3512584AE3\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 6 Sep 2019 00:09:19 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 6Qhem7o1ZC+J for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 6 Sep 2019 00:09:15 +0000 (UTC)", "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id BA031838CD\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 6 Sep 2019 00:09:15 +0000 (UTC)", "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t05 Sep 2019 17:09:15 -0700", "from unknown (HELO localhost.jf.intel.com) ([10.166.244.174])\n\tby orsmga002.jf.intel.com with ESMTP; 05 Sep 2019 17:09:14 -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,471,1559545200\"; d=\"scan'208\";a=\"195268843\"", "From": "Tony Nguyen <anthony.l.nguyen@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Thu, 5 Sep 2019 08:39:51 -0700", "Message-Id": "<20190905153956.53086-1-anthony.l.nguyen@intel.com>", "X-Mailer": "git-send-email 2.20.1", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [PATCH S29 1/6] ice: send driver version to\n\tfirmware", "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: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>\n\nThe driver is required to send a version to the firmware\nto indicate that the driver is up. If the driver doesn't\ndo this the firmware doesn't behave properly.\n\nSigned-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>\nSigned-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>\n---\n drivers/net/ethernet/intel/ice/ice.h | 1 +\n .../net/ethernet/intel/ice/ice_adminq_cmd.h | 13 +++++++\n drivers/net/ethernet/intel/ice/ice_common.c | 37 +++++++++++++++++++\n drivers/net/ethernet/intel/ice/ice_common.h | 3 ++\n drivers/net/ethernet/intel/ice/ice_main.c | 36 +++++++++++++++++-\n drivers/net/ethernet/intel/ice/ice_type.h | 8 ++++\n 6 files changed, 97 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h\nindex b36e1cf0e461..4cdedcebb163 100644\n--- a/drivers/net/ethernet/intel/ice/ice.h\n+++ b/drivers/net/ethernet/intel/ice/ice.h\n@@ -29,6 +29,7 @@\n #include <linux/sctp.h>\n #include <linux/ipv6.h>\n #include <linux/if_bridge.h>\n+#include <linux/ctype.h>\n #include <linux/avf/virtchnl.h>\n #include <net/ipv6.h>\n #include \"ice_devids.h\"\ndiff --git a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h\nindex 4da0cde9695b..9c9791788610 100644\n--- a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h\n+++ b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h\n@@ -33,6 +33,17 @@ struct ice_aqc_get_ver {\n \tu8 api_patch;\n };\n \n+/* Send driver version (indirect 0x0002) */\n+struct ice_aqc_driver_ver {\n+\tu8 major_ver;\n+\tu8 minor_ver;\n+\tu8 build_ver;\n+\tu8 subbuild_ver;\n+\tu8 reserved[4];\n+\t__le32 addr_high;\n+\t__le32 addr_low;\n+};\n+\n /* Queue Shutdown (direct 0x0003) */\n struct ice_aqc_q_shutdown {\n \tu8 driver_unloading;\n@@ -1547,6 +1558,7 @@ struct ice_aq_desc {\n \t\tu8 raw[16];\n \t\tstruct ice_aqc_generic generic;\n \t\tstruct ice_aqc_get_ver get_ver;\n+\t\tstruct ice_aqc_driver_ver driver_ver;\n \t\tstruct ice_aqc_q_shutdown q_shutdown;\n \t\tstruct ice_aqc_req_res res_owner;\n \t\tstruct ice_aqc_manage_mac_read mac_read;\n@@ -1618,6 +1630,7 @@ enum ice_aq_err {\n enum ice_adminq_opc {\n \t/* AQ commands */\n \tice_aqc_opc_get_ver\t\t\t\t= 0x0001,\n+\tice_aqc_opc_driver_ver\t\t\t\t= 0x0002,\n \tice_aqc_opc_q_shutdown\t\t\t\t= 0x0003,\n \n \t/* resource ownership */\ndiff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c\nindex 8b2c46615834..db62cc748544 100644\n--- a/drivers/net/ethernet/intel/ice/ice_common.c\n+++ b/drivers/net/ethernet/intel/ice/ice_common.c\n@@ -1258,6 +1258,43 @@ enum ice_status ice_aq_get_fw_ver(struct ice_hw *hw, struct ice_sq_cd *cd)\n \treturn status;\n }\n \n+/**\n+ * ice_aq_send_driver_ver\n+ * @hw: pointer to the HW struct\n+ * @dv: driver's major, minor version\n+ * @cd: pointer to command details structure or NULL\n+ *\n+ * Send the driver version (0x0002) to the firmware\n+ */\n+enum ice_status\n+ice_aq_send_driver_ver(struct ice_hw *hw, struct ice_driver_ver *dv,\n+\t\t struct ice_sq_cd *cd)\n+{\n+\tstruct ice_aqc_driver_ver *cmd;\n+\tstruct ice_aq_desc desc;\n+\tu16 len;\n+\n+\tcmd = &desc.params.driver_ver;\n+\n+\tif (!dv)\n+\t\treturn ICE_ERR_PARAM;\n+\n+\tice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_driver_ver);\n+\n+\tdesc.flags |= cpu_to_le16(ICE_AQ_FLAG_RD);\n+\tcmd->major_ver = dv->major_ver;\n+\tcmd->minor_ver = dv->minor_ver;\n+\tcmd->build_ver = dv->build_ver;\n+\tcmd->subbuild_ver = dv->subbuild_ver;\n+\n+\tlen = 0;\n+\twhile (len < sizeof(dv->driver_string) &&\n+\t isascii(dv->driver_string[len]) && dv->driver_string[len])\n+\t\tlen++;\n+\n+\treturn ice_aq_send_cmd(hw, &desc, dv->driver_string, len, cd);\n+}\n+\n /**\n * ice_aq_q_shutdown\n * @hw: pointer to the HW struct\ndiff --git a/drivers/net/ethernet/intel/ice/ice_common.h b/drivers/net/ethernet/intel/ice/ice_common.h\nindex e376d1eadba4..e9d77370a17c 100644\n--- a/drivers/net/ethernet/intel/ice/ice_common.h\n+++ b/drivers/net/ethernet/intel/ice/ice_common.h\n@@ -71,6 +71,9 @@ ice_aq_send_cmd(struct ice_hw *hw, struct ice_aq_desc *desc,\n \t\tvoid *buf, u16 buf_size, struct ice_sq_cd *cd);\n enum ice_status ice_aq_get_fw_ver(struct ice_hw *hw, struct ice_sq_cd *cd);\n \n+enum ice_status\n+ice_aq_send_driver_ver(struct ice_hw *hw, struct ice_driver_ver *dv,\n+\t\t struct ice_sq_cd *cd);\n enum ice_status\n ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode,\n \t\t struct ice_aqc_get_phy_caps_data *caps,\ndiff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c\nindex f8be9ada2447..ea55ec598dac 100644\n--- a/drivers/net/ethernet/intel/ice/ice_main.c\n+++ b/drivers/net/ethernet/intel/ice/ice_main.c\n@@ -9,7 +9,13 @@\n #include \"ice_lib.h\"\n #include \"ice_dcb_lib.h\"\n \n-#define DRV_VERSION\t\"0.7.5-k\"\n+#define DRV_VERSION_MAJOR 0\n+#define DRV_VERSION_MINOR 7\n+#define DRV_VERSION_BUILD 5\n+\n+#define DRV_VERSION\t__stringify(DRV_VERSION_MAJOR) \".\" \\\n+\t\t\t__stringify(DRV_VERSION_MINOR) \".\" \\\n+\t\t\t__stringify(DRV_VERSION_BUILD) \"-k\"\n #define DRV_SUMMARY\t\"Intel(R) Ethernet Connection E800 Series Linux Driver\"\n const char ice_drv_ver[] = DRV_VERSION;\n static const char ice_driver_string[] = DRV_SUMMARY;\n@@ -2459,6 +2465,25 @@ static void ice_verify_cacheline_size(struct ice_pf *pf)\n \t\t\t ICE_CACHE_LINE_BYTES);\n }\n \n+/**\n+ * ice_send_version - update firmware with driver version\n+ * @pf: PF struct\n+ *\n+ * Returns ICE_SUCCESS on success, else error code\n+ */\n+static enum ice_status ice_send_version(struct ice_pf *pf)\n+{\n+\tstruct ice_driver_ver dv;\n+\n+\tdv.major_ver = DRV_VERSION_MAJOR;\n+\tdv.minor_ver = DRV_VERSION_MINOR;\n+\tdv.build_ver = DRV_VERSION_BUILD;\n+\tdv.subbuild_ver = 0;\n+\tstrscpy((char *)dv.driver_string, DRV_VERSION,\n+\t\tsizeof(dv.driver_string));\n+\treturn ice_aq_send_driver_ver(&pf->hw, &dv, NULL);\n+}\n+\n /**\n * ice_probe - Device initialization routine\n * @pdev: PCI device information struct\n@@ -2612,6 +2637,15 @@ ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent)\n \n \tclear_bit(__ICE_SERVICE_DIS, pf->state);\n \n+\t/* tell the firmware we are up */\n+\terr = ice_send_version(pf);\n+\tif (err) {\n+\t\tdev_err(dev,\n+\t\t\t\"probe failed due to error sending driver version:%d\\n\",\n+\t\t\terr);\n+\t\tgoto err_alloc_sw_unroll;\n+\t}\n+\n \t/* since everything is good, start the service timer */\n \tmod_timer(&pf->serv_tmr, round_jiffies(jiffies + pf->serv_tmr_period));\n \ndiff --git a/drivers/net/ethernet/intel/ice/ice_type.h b/drivers/net/ethernet/intel/ice/ice_type.h\nindex 4501d50a7dcc..a2676003275a 100644\n--- a/drivers/net/ethernet/intel/ice/ice_type.h\n+++ b/drivers/net/ethernet/intel/ice/ice_type.h\n@@ -53,6 +53,14 @@ enum ice_aq_res_access_type {\n \tICE_RES_WRITE\n };\n \n+struct ice_driver_ver {\n+\tu8 major_ver;\n+\tu8 minor_ver;\n+\tu8 build_ver;\n+\tu8 subbuild_ver;\n+\tu8 driver_string[32];\n+};\n+\n enum ice_fc_mode {\n \tICE_FC_NONE = 0,\n \tICE_FC_RX_PAUSE,\n", "prefixes": [ "S29", "1/6" ] }