Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/948153/?format=api
{ "id": 948153, "url": "http://patchwork.ozlabs.org/api/patches/948153/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180723231348.14838-14-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": "<20180723231348.14838-14-anirudh.venkataramanan@intel.com>", "list_archive_url": null, "date": "2018-07-23T23:13:48", "name": "[13/13] ice: Introduce SERVICE_DIS flag and service routine functions", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "4077df8f725cca10bac6574bc0c67cb4a2d508d2", "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/20180723231348.14838-14-anirudh.venkataramanan@intel.com/mbox/", "series": [ { "id": 57159, "url": "http://patchwork.ozlabs.org/api/series/57159/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=57159", "date": "2018-07-23T23:13:35", "name": "Feature updates for ice", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/57159/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/948153/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/948153/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.136; helo=silver.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 silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 41ZHP10mqvz9s4Z\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 24 Jul 2018 09:13:56 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 550D924527;\n\tMon, 23 Jul 2018 23:13:55 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 16QS2ceoP6g2; Mon, 23 Jul 2018 23:13:53 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id A8DBD20778;\n\tMon, 23 Jul 2018 23:13:53 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 57BC91C1237\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 23 Jul 2018 23:13:52 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 55DAA8241A\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 23 Jul 2018 23:13:52 +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 nvX4vI+Wb0kX for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 23 Jul 2018 23:13:51 +0000 (UTC)", "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 6340C8344C\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 23 Jul 2018 23:13:51 +0000 (UTC)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t23 Jul 2018 16:13:50 -0700", "from shasta.jf.intel.com ([10.166.241.10])\n\tby fmsmga006.fm.intel.com with ESMTP; 23 Jul 2018 16:13:50 -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.51,394,1526367600\"; d=\"scan'208\";a=\"248252750\"", "From": "Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Mon, 23 Jul 2018 16:13:48 -0700", "Message-Id": "<20180723231348.14838-14-anirudh.venkataramanan@intel.com>", "X-Mailer": "git-send-email 2.14.3", "In-Reply-To": "<20180723231348.14838-1-anirudh.venkataramanan@intel.com>", "References": "<20180723231348.14838-1-anirudh.venkataramanan@intel.com>", "Subject": "[Intel-wired-lan] [PATCH 13/13] ice: Introduce SERVICE_DIS flag and\n\tservice routine functions", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.24", "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>", "Cc": "Akeem G Abodunrin <akeem.g.abodunrin@intel.com>", "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": "From: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>\n\nThis patch introduces SERVICE_DIS flag to use for stopping service task.\nThis flag will be checked before scheduling new tasks. Also add new\nfunctions ice_service_task_stop to stop service task.\n\nSigned-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>\nSigned-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>\n---\n drivers/net/ethernet/intel/ice/ice.h | 1 +\n drivers/net/ethernet/intel/ice/ice_main.c | 34 ++++++++++++++++++++++++-------\n 2 files changed, 28 insertions(+), 7 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h\nindex 6f44a850c4b2..9cf233d085d8 100644\n--- a/drivers/net/ethernet/intel/ice/ice.h\n+++ b/drivers/net/ethernet/intel/ice/ice.h\n@@ -138,6 +138,7 @@ enum ice_state {\n \t__ICE_FLTR_OVERFLOW_PROMISC,\n \t__ICE_CFG_BUSY,\n \t__ICE_SERVICE_SCHED,\n+\t__ICE_SERVICE_DIS,\n \t__ICE_STATE_NBITS\t\t/* must be last */\n };\n \ndiff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c\nindex cb1145515f98..3a77812e4be7 100644\n--- a/drivers/net/ethernet/intel/ice/ice_main.c\n+++ b/drivers/net/ethernet/intel/ice/ice_main.c\n@@ -1107,7 +1107,7 @@ static void ice_clean_adminq_subtask(struct ice_pf *pf)\n */\n static void ice_service_task_schedule(struct ice_pf *pf)\n {\n-\tif (!test_bit(__ICE_DOWN, pf->state) &&\n+\tif (!test_bit(__ICE_SERVICE_DIS, pf->state) &&\n \t !test_and_set_bit(__ICE_SERVICE_SCHED, pf->state) &&\n \t !test_bit(__ICE_NEEDS_RESTART, pf->state))\n \t\tqueue_work(ice_wq, &pf->serv_task);\n@@ -1126,6 +1126,22 @@ static void ice_service_task_complete(struct ice_pf *pf)\n \tclear_bit(__ICE_SERVICE_SCHED, pf->state);\n }\n \n+/**\n+ * ice_service_task_stop - stop service task and cancel works\n+ * @pf: board private structure\n+ */\n+static void ice_service_task_stop(struct ice_pf *pf)\n+{\n+\tset_bit(__ICE_SERVICE_DIS, pf->state);\n+\n+\tif (pf->serv_tmr.function)\n+\t\tdel_timer_sync(&pf->serv_tmr);\n+\tif (pf->serv_task.func)\n+\t\tcancel_work_sync(&pf->serv_task);\n+\n+\tclear_bit(__ICE_SERVICE_SCHED, pf->state);\n+}\n+\n /**\n * ice_service_timer - timer callback to schedule service task\n * @t: pointer to timer_list\n@@ -3391,10 +3407,7 @@ static void ice_determine_q_usage(struct ice_pf *pf)\n */\n static void ice_deinit_pf(struct ice_pf *pf)\n {\n-\tif (pf->serv_tmr.function)\n-\t\tdel_timer_sync(&pf->serv_tmr);\n-\tif (pf->serv_task.func)\n-\t\tcancel_work_sync(&pf->serv_task);\n+\tice_service_task_stop(pf);\n \tmutex_destroy(&pf->sw_mutex);\n \tmutex_destroy(&pf->avail_q_mutex);\n }\n@@ -3601,6 +3614,8 @@ static int ice_probe(struct pci_dev *pdev,\n \tpf->pdev = pdev;\n \tpci_set_drvdata(pdev, pf);\n \tset_bit(__ICE_DOWN, pf->state);\n+\t/* Disable service task until DOWN bit is cleared */\n+\tset_bit(__ICE_SERVICE_DIS, pf->state);\n \n \thw = &pf->hw;\n \thw->hw_addr = pcim_iomap_table(pdev)[ICE_BAR0];\n@@ -3658,6 +3673,9 @@ static int ice_probe(struct pci_dev *pdev,\n \t\tgoto err_init_interrupt_unroll;\n \t}\n \n+\t/* Driver is mostly up */\n+\tclear_bit(__ICE_DOWN, pf->state);\n+\n \t/* In case of MSIX we are going to setup the misc vector right here\n \t * to handle admin queue events etc. In case of legacy and MSI\n \t * the misc functionality and queue processing is combined in\n@@ -3697,8 +3715,7 @@ static int ice_probe(struct pci_dev *pdev,\n \t\tgoto err_alloc_sw_unroll;\n \t}\n \n-\t/* Driver is mostly up */\n-\tclear_bit(__ICE_DOWN, pf->state);\n+\tclear_bit(__ICE_SERVICE_DIS, pf->state);\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@@ -3712,6 +3729,7 @@ static int ice_probe(struct pci_dev *pdev,\n \treturn 0;\n \n err_alloc_sw_unroll:\n+\tset_bit(__ICE_SERVICE_DIS, pf->state);\n \tset_bit(__ICE_DOWN, pf->state);\n \tdevm_kfree(&pf->pdev->dev, pf->first_sw);\n err_msix_misc_unroll:\n@@ -3739,6 +3757,7 @@ static void ice_remove(struct pci_dev *pdev)\n \t\treturn;\n \n \tset_bit(__ICE_DOWN, pf->state);\n+\tice_service_task_stop(pf);\n \n \tice_vsi_release_all(pf);\n \tice_free_irq_msix_misc(pf);\n@@ -6003,6 +6022,7 @@ static void ice_tx_timeout(struct net_device *netdev)\n \t\tnetdev_err(netdev, \"tx_timeout recovery unsuccessful, device is in unrecoverable state.\\n\");\n \t\tset_bit(__ICE_DOWN, pf->state);\n \t\tset_bit(__ICE_NEEDS_RESTART, vsi->state);\n+\t\tset_bit(__ICE_SERVICE_DIS, pf->state);\n \t\tbreak;\n \t}\n \n", "prefixes": [ "13/13" ] }