Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/986040/?format=api
{ "id": 986040, "url": "http://patchwork.ozlabs.org/api/patches/986040/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20181018153709.32664-8-anirudh.venkataramanan@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": "<20181018153709.32664-8-anirudh.venkataramanan@intel.com>", "list_archive_url": null, "date": "2018-10-18T15:37:09", "name": "[7/7] ice: Poll for link status change", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "ff6b8b51d4aca54d3ae97664f8807bcb1377cf73", "submitter": { "id": 73601, "url": "http://patchwork.ozlabs.org/api/people/73601/?format=api", "name": "Anirudh Venkataramanan", "email": "anirudh.venkataramanan@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/20181018153709.32664-8-anirudh.venkataramanan@intel.com/mbox/", "series": [ { "id": 71486, "url": "http://patchwork.ozlabs.org/api/series/71486/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=71486", "date": "2018-10-18T15:37:02", "name": "[1/7] ice: Make ice_msix_clean_rings static", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/71486/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/986040/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/986040/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.137; helo=fraxinus.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 fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\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 42bY7z3Yrxz9sC2\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 19 Oct 2018 02:37:19 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id E6C8F86D65;\n\tThu, 18 Oct 2018 15:37:17 +0000 (UTC)", "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id kLCReHmP6a7h; Thu, 18 Oct 2018 15:37:16 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 7532E86DD5;\n\tThu, 18 Oct 2018 15:37:16 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id C0E291BF3E5\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 18 Oct 2018 15:37:11 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id BD25B87D81\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 18 Oct 2018 15:37:11 +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 lJHMwqXf-Ypp for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 18 Oct 2018 15:37:09 +0000 (UTC)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id D284D87CD9\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 18 Oct 2018 15:37:09 +0000 (UTC)", "from orsmga007.jf.intel.com ([10.7.209.58])\n\tby orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t18 Oct 2018 08:37:09 -0700", "from shasta.jf.intel.com ([10.166.241.11])\n\tby orsmga007.jf.intel.com with ESMTP; 18 Oct 2018 08:37:09 -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.54,396,1534834800\"; d=\"scan'208\";a=\"82246055\"", "From": "Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Thu, 18 Oct 2018 08:37:09 -0700", "Message-Id": "<20181018153709.32664-8-anirudh.venkataramanan@intel.com>", "X-Mailer": "git-send-email 2.14.3", "In-Reply-To": "<20181018153709.32664-1-anirudh.venkataramanan@intel.com>", "References": "<20181018153709.32664-1-anirudh.venkataramanan@intel.com>", "Subject": "[Intel-wired-lan] [PATCH 7/7] ice: Poll for link status change", "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>", "MIME-Version": "1.0", "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": "When the physical link goes up or down, the driver is supposed to\nreceive a link status event (LSE). The driver currently has the code\nto handle LSEs but there is no firmware support for this feature yet.\nSo this patch adds the ability for the driver to poll for link status\nchanges. The polling itself is done in ice_watchdog_subtask.\n\nFor namespace cleanliness, this patch also removes code that handles\nLSE. This code will be reintroduced once the feature is officially\nsupported.\n\nSigned-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>\n---\n drivers/net/ethernet/intel/ice/ice_common.c | 29 +-------\n drivers/net/ethernet/intel/ice/ice_common.h | 6 --\n drivers/net/ethernet/intel/ice/ice_main.c | 110 ++++++----------------------\n 3 files changed, 25 insertions(+), 120 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c\nindex 5a91a9087d1e..8cd6a2401fd9 100644\n--- a/drivers/net/ethernet/intel/ice/ice_common.c\n+++ b/drivers/net/ethernet/intel/ice/ice_common.c\n@@ -235,7 +235,7 @@ static enum ice_media_type ice_get_media_type(struct ice_port_info *pi)\n *\n * Get Link Status (0x607). Returns the link status of the adapter.\n */\n-enum ice_status\n+static enum ice_status\n ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse,\n \t\t struct ice_link_status *link, struct ice_sq_cd *cd)\n {\n@@ -2004,33 +2004,6 @@ ice_aq_set_link_restart_an(struct ice_port_info *pi, bool ena_link,\n \treturn ice_aq_send_cmd(pi->hw, &desc, NULL, 0, cd);\n }\n \n-/**\n- * ice_aq_set_event_mask\n- * @hw: pointer to the hw struct\n- * @port_num: port number of the physical function\n- * @mask: event mask to be set\n- * @cd: pointer to command details structure or NULL\n- *\n- * Set event mask (0x0613)\n- */\n-enum ice_status\n-ice_aq_set_event_mask(struct ice_hw *hw, u8 port_num, u16 mask,\n-\t\t struct ice_sq_cd *cd)\n-{\n-\tstruct ice_aqc_set_event_mask *cmd;\n-\tstruct ice_aq_desc desc;\n-\n-\tcmd = &desc.params.set_event_mask;\n-\n-\tice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_set_event_mask);\n-\n-\tcmd->lport_num = port_num;\n-\n-\tcmd->event_mask = cpu_to_le16(mask);\n-\n-\treturn ice_aq_send_cmd(hw, &desc, NULL, 0, cd);\n-}\n-\n /**\n * __ice_aq_get_set_rss_lut\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 876347e32b6f..cf760c24a6aa 100644\n--- a/drivers/net/ethernet/intel/ice/ice_common.h\n+++ b/drivers/net/ethernet/intel/ice/ice_common.h\n@@ -86,12 +86,6 @@ enum ice_status\n ice_aq_set_link_restart_an(struct ice_port_info *pi, bool ena_link,\n \t\t\t struct ice_sq_cd *cd);\n enum ice_status\n-ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse,\n-\t\t struct ice_link_status *link, struct ice_sq_cd *cd);\n-enum ice_status\n-ice_aq_set_event_mask(struct ice_hw *hw, u8 port_num, u16 mask,\n-\t\t struct ice_sq_cd *cd);\n-enum ice_status\n ice_dis_vsi_txq(struct ice_port_info *pi, u8 num_queues, u16 *q_ids,\n \t\tu32 *q_teids, enum ice_disq_rst_src rst_src, u16 vmvf_num,\n \t\tstruct ice_sq_cd *cmd_details);\ndiff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c\nindex 0084b7290b2b..05993451147a 100644\n--- a/drivers/net/ethernet/intel/ice/ice_main.c\n+++ b/drivers/net/ethernet/intel/ice/ice_main.c\n@@ -456,35 +456,6 @@ static void ice_reset_subtask(struct ice_pf *pf)\n \t}\n }\n \n-/**\n- * ice_watchdog_subtask - periodic tasks not using event driven scheduling\n- * @pf: board private structure\n- */\n-static void ice_watchdog_subtask(struct ice_pf *pf)\n-{\n-\tint i;\n-\n-\t/* if interface is down do nothing */\n-\tif (test_bit(__ICE_DOWN, pf->state) ||\n-\t test_bit(__ICE_CFG_BUSY, pf->state))\n-\t\treturn;\n-\n-\t/* make sure we don't do these things too often */\n-\tif (time_before(jiffies,\n-\t\t\tpf->serv_tmr_prev + pf->serv_tmr_period))\n-\t\treturn;\n-\n-\tpf->serv_tmr_prev = jiffies;\n-\n-\t/* Update the stats for active netdevs so the network stack\n-\t * can look at updated numbers whenever it cares to\n-\t */\n-\tice_update_pf_stats(pf);\n-\tfor (i = 0; i < pf->num_alloc_vsi; i++)\n-\t\tif (pf->vsi[i] && pf->vsi[i]->netdev)\n-\t\t\tice_update_vsi_stats(pf->vsi[i]);\n-}\n-\n /**\n * ice_print_link_msg - print link up or down message\n * @vsi: the VSI whose link status is being queried\n@@ -554,36 +525,6 @@ void ice_print_link_msg(struct ice_vsi *vsi, bool isup)\n \t\t speed, fc);\n }\n \n-/**\n- * ice_init_link_events - enable/initialize link events\n- * @pi: pointer to the port_info instance\n- *\n- * Returns -EIO on failure, 0 on success\n- */\n-static int ice_init_link_events(struct ice_port_info *pi)\n-{\n-\tu16 mask;\n-\n-\tmask = ~((u16)(ICE_AQ_LINK_EVENT_UPDOWN | ICE_AQ_LINK_EVENT_MEDIA_NA |\n-\t\t ICE_AQ_LINK_EVENT_MODULE_QUAL_FAIL));\n-\n-\tif (ice_aq_set_event_mask(pi->hw, pi->lport, mask, NULL)) {\n-\t\tdev_dbg(ice_hw_to_dev(pi->hw),\n-\t\t\t\"Failed to set link event mask for port %d\\n\",\n-\t\t\tpi->lport);\n-\t\treturn -EIO;\n-\t}\n-\n-\tif (ice_aq_get_link_info(pi, true, NULL, NULL)) {\n-\t\tdev_dbg(ice_hw_to_dev(pi->hw),\n-\t\t\t\"Failed to enable link events for port %d\\n\",\n-\t\t\tpi->lport);\n-\t\treturn -EIO;\n-\t}\n-\n-\treturn 0;\n-}\n-\n /**\n * ice_vsi_link_event - update the vsi's netdev\n * @vsi: the vsi on which the link event occurred\n@@ -671,27 +612,35 @@ ice_link_event(struct ice_pf *pf, struct ice_port_info *pi)\n }\n \n /**\n- * ice_handle_link_event - handle link event via ARQ\n- * @pf: pf that the link event is associated with\n- *\n- * Return -EINVAL if port_info is null\n- * Return status on succes\n+ * ice_watchdog_subtask - periodic tasks not using event driven scheduling\n+ * @pf: board private structure\n */\n-static int ice_handle_link_event(struct ice_pf *pf)\n+static void ice_watchdog_subtask(struct ice_pf *pf)\n {\n-\tstruct ice_port_info *port_info;\n-\tint status;\n+\tint i;\n \n-\tport_info = pf->hw.port_info;\n-\tif (!port_info)\n-\t\treturn -EINVAL;\n+\t/* if interface is down do nothing */\n+\tif (test_bit(__ICE_DOWN, pf->state) ||\n+\t test_bit(__ICE_CFG_BUSY, pf->state))\n+\t\treturn;\n \n-\tstatus = ice_link_event(pf, port_info);\n-\tif (status)\n-\t\tdev_dbg(&pf->pdev->dev,\n-\t\t\t\"Could not process link event, error %d\\n\", status);\n+\t/* make sure we don't do these things too often */\n+\tif (time_before(jiffies,\n+\t\t\tpf->serv_tmr_prev + pf->serv_tmr_period))\n+\t\treturn;\n \n-\treturn status;\n+\tpf->serv_tmr_prev = jiffies;\n+\n+\tif (ice_link_event(pf, pf->hw.port_info))\n+\t\tdev_dbg(&pf->pdev->dev, \"ice_link_event failed\\n\");\n+\n+\t/* Update the stats for active netdevs so the network stack\n+\t * can look at updated numbers whenever it cares to\n+\t */\n+\tice_update_pf_stats(pf);\n+\tfor (i = 0; i < pf->num_alloc_vsi; i++)\n+\t\tif (pf->vsi[i] && pf->vsi[i]->netdev)\n+\t\t\tice_update_vsi_stats(pf->vsi[i]);\n }\n \n /**\n@@ -797,11 +746,6 @@ static int __ice_clean_ctrlq(struct ice_pf *pf, enum ice_ctl_q q_type)\n \t\topcode = le16_to_cpu(event.desc.opcode);\n \n \t\tswitch (opcode) {\n-\t\tcase ice_aqc_opc_get_link_status:\n-\t\t\tif (ice_handle_link_event(pf))\n-\t\t\t\tdev_err(&pf->pdev->dev,\n-\t\t\t\t\t\"Could not handle link event\\n\");\n-\t\t\tbreak;\n \t\tcase ice_mbx_opc_send_msg_to_pf:\n \t\t\tice_vc_process_vf_msg(pf, &event);\n \t\t\tbreak;\n@@ -2207,12 +2151,6 @@ static int ice_probe(struct pci_dev *pdev,\n \t/* since everything is good, start the service timer */\n \tmod_timer(&pf->serv_tmr, round_jiffies(jiffies + pf->serv_tmr_period));\n \n-\terr = ice_init_link_events(pf->hw.port_info);\n-\tif (err) {\n-\t\tdev_err(&pdev->dev, \"ice_init_link_events failed: %d\\n\", err);\n-\t\tgoto err_alloc_sw_unroll;\n-\t}\n-\n \treturn 0;\n \n err_alloc_sw_unroll:\n", "prefixes": [ "7/7" ] }