get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/1038982/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 1038982,
    "url": "http://patchwork.ozlabs.org/api/patches/1038982/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190208205043.11975-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": "<20190208205043.11975-8-anirudh.venkataramanan@intel.com>",
    "list_archive_url": null,
    "date": "2019-02-08T20:50:34",
    "name": "[S11,07/16] ice: fix issue where host reboots on unload when iommu=on",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "49707a8bdd7e2c57fd10b9da8a81a4f0fce0a872",
    "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/20190208205043.11975-8-anirudh.venkataramanan@intel.com/mbox/",
    "series": [
        {
            "id": 90915,
            "url": "http://patchwork.ozlabs.org/api/series/90915/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=90915",
            "date": "2019-02-08T20:50:37",
            "name": "Bug fixes for ice",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/90915/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1038982/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1038982/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 ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 43x6qh1D5Pz9sMp\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  9 Feb 2019 07:54:24 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 9CD7630CF8;\n\tFri,  8 Feb 2019 20:54:22 +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 UQvHyKbVAo8D; Fri,  8 Feb 2019 20:54:21 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id A897B228AE;\n\tFri,  8 Feb 2019 20:54:21 +0000 (UTC)",
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 3EDA01BF980\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri,  8 Feb 2019 20:52:32 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 507552343B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri,  8 Feb 2019 20:52:31 +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 FM393GlQjEs7 for <intel-wired-lan@lists.osuosl.org>;\n\tFri,  8 Feb 2019 20:52:28 +0000 (UTC)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 9A88423735\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri,  8 Feb 2019 20:52:28 +0000 (UTC)",
            "from orsmga008.jf.intel.com ([10.7.209.65])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t08 Feb 2019 12:50:43 -0800",
            "from shasta.jf.intel.com ([10.166.241.11])\n\tby orsmga008.jf.intel.com with ESMTP; 08 Feb 2019 12:50:44 -0800"
        ],
        "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.58,348,1544515200\"; d=\"scan'208\";a=\"116332336\"",
        "From": "Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Fri,  8 Feb 2019 12:50:34 -0800",
        "Message-Id": "<20190208205043.11975-8-anirudh.venkataramanan@intel.com>",
        "X-Mailer": "git-send-email 2.14.5",
        "In-Reply-To": "<20190208205043.11975-1-anirudh.venkataramanan@intel.com>",
        "References": "<20190208205043.11975-1-anirudh.venkataramanan@intel.com>",
        "Subject": "[Intel-wired-lan] [PATCH S11 07/16] ice: fix issue where host\n\treboots on unload when iommu=on",
        "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": "From: Brett Creeley <brett.creeley@intel.com>\n\nCurrently if the kernel has the intel_iommu=on parameter set, on some\nplatforms removing the driver causes a system reboot. In initialization\nwe associate the control queue interrupts with the pf->hw_oicr_idx and\nenable the interrupts by setting the CAUSE_ENA bit. The problem comes\non teardown because we are not clearing the CAUSE_ENA bit for the\ncontrol queues, but the vector at pf->hw_oicr_idx (miscellaneous\ninterrupt vector) gets disabled.\n\nFix this by clearing the CAUSE_ENA bit in the appropriate control queue\nregisters on when freeing the misceallaneous interrupt vector. Also,\nmove the call to ice_free_irq_msix_misc() to after ice_deinit_sw() in\nice_remove() because ice_deinit_sw() makes an AQ call, but\nice_free_irq_msix_misc() disables the miscellaneous vector and it's\nassociated interrupts.\n\nAlso, create two small helper functions to enable and disable the\ncontrol queue interrupts respectively.\n\nSigned-off-by: Brett Creeley <brett.creeley@intel.com>\nSigned-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>\n---\n[Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> cleaned up commit message]\n---\n drivers/net/ethernet/intel/ice/ice_main.c | 71 +++++++++++++++++++++++--------\n 1 file changed, 54 insertions(+), 17 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c\nindex aff348e42562..fb04a5ebdc0b 100644\n--- a/drivers/net/ethernet/intel/ice/ice_main.c\n+++ b/drivers/net/ethernet/intel/ice/ice_main.c\n@@ -1355,15 +1355,40 @@ static irqreturn_t ice_misc_intr(int __always_unused irq, void *data)\n \treturn ret;\n }\n \n+/**\n+ * ice_dis_ctrlq_interrupts - disable control queue interrupts\n+ * @hw: pointer to HW structure\n+ */\n+static void ice_dis_ctrlq_interrupts(struct ice_hw *hw)\n+{\n+\t/* disable Admin queue Interrupt causes */\n+\twr32(hw, PFINT_FW_CTL,\n+\t     rd32(hw, PFINT_FW_CTL) & ~PFINT_FW_CTL_CAUSE_ENA_M);\n+\n+\t/* disable Mailbox queue Interrupt causes */\n+\twr32(hw, PFINT_MBX_CTL,\n+\t     rd32(hw, PFINT_MBX_CTL) & ~PFINT_MBX_CTL_CAUSE_ENA_M);\n+\n+\t/* disable Control queue Interrupt causes */\n+\twr32(hw, PFINT_OICR_CTL,\n+\t     rd32(hw, PFINT_OICR_CTL) & ~PFINT_OICR_CTL_CAUSE_ENA_M);\n+\n+\tice_flush(hw);\n+}\n+\n /**\n  * ice_free_irq_msix_misc - Unroll misc vector setup\n  * @pf: board private structure\n  */\n static void ice_free_irq_msix_misc(struct ice_pf *pf)\n {\n+\tstruct ice_hw *hw = &pf->hw;\n+\n+\tice_dis_ctrlq_interrupts(hw);\n+\n \t/* disable OICR interrupt */\n-\twr32(&pf->hw, PFINT_OICR_ENA, 0);\n-\tice_flush(&pf->hw);\n+\twr32(hw, PFINT_OICR_ENA, 0);\n+\tice_flush(hw);\n \n \tif (test_bit(ICE_FLAG_MSIX_ENA, pf->flags) && pf->msix_entries) {\n \t\tsynchronize_irq(pf->msix_entries[pf->sw_oicr_idx].vector);\n@@ -1377,6 +1402,32 @@ static void ice_free_irq_msix_misc(struct ice_pf *pf)\n \tice_free_res(pf->hw_irq_tracker, pf->hw_oicr_idx, ICE_RES_MISC_VEC_ID);\n }\n \n+/**\n+ * ice_ena_ctrlq_interrupts - enable control queue interrupts\n+ * @hw: pointer to HW structure\n+ * @v_idx: HW vector index to associate the control queue interrupts with\n+ */\n+static void ice_ena_ctrlq_interrupts(struct ice_hw *hw, u16 v_idx)\n+{\n+\tu32 val;\n+\n+\tval = ((v_idx & PFINT_OICR_CTL_MSIX_INDX_M) |\n+\t       PFINT_OICR_CTL_CAUSE_ENA_M);\n+\twr32(hw, PFINT_OICR_CTL, val);\n+\n+\t/* enable Admin queue Interrupt causes */\n+\tval = ((v_idx & PFINT_FW_CTL_MSIX_INDX_M) |\n+\t       PFINT_FW_CTL_CAUSE_ENA_M);\n+\twr32(hw, PFINT_FW_CTL, val);\n+\n+\t/* enable Mailbox queue Interrupt causes */\n+\tval = ((v_idx & PFINT_MBX_CTL_MSIX_INDX_M) |\n+\t       PFINT_MBX_CTL_CAUSE_ENA_M);\n+\twr32(hw, PFINT_MBX_CTL, val);\n+\n+\tice_flush(hw);\n+}\n+\n /**\n  * ice_req_irq_msix_misc - Setup the misc vector to handle non queue events\n  * @pf: board private structure\n@@ -1389,7 +1440,6 @@ static int ice_req_irq_msix_misc(struct ice_pf *pf)\n {\n \tstruct ice_hw *hw = &pf->hw;\n \tint oicr_idx, err = 0;\n-\tu32 val;\n \n \tif (!pf->int_name[0])\n \t\tsnprintf(pf->int_name, sizeof(pf->int_name) - 1, \"%s-%s:misc\",\n@@ -1438,20 +1488,7 @@ static int ice_req_irq_msix_misc(struct ice_pf *pf)\n skip_req_irq:\n \tice_ena_misc_vector(pf);\n \n-\tval = ((pf->hw_oicr_idx & PFINT_OICR_CTL_MSIX_INDX_M) |\n-\t       PFINT_OICR_CTL_CAUSE_ENA_M);\n-\twr32(hw, PFINT_OICR_CTL, val);\n-\n-\t/* This enables Admin queue Interrupt causes */\n-\tval = ((pf->hw_oicr_idx & PFINT_FW_CTL_MSIX_INDX_M) |\n-\t       PFINT_FW_CTL_CAUSE_ENA_M);\n-\twr32(hw, PFINT_FW_CTL, val);\n-\n-\t/* This enables Mailbox queue Interrupt causes */\n-\tval = ((pf->hw_oicr_idx & PFINT_MBX_CTL_MSIX_INDX_M) |\n-\t       PFINT_MBX_CTL_CAUSE_ENA_M);\n-\twr32(hw, PFINT_MBX_CTL, val);\n-\n+\tice_ena_ctrlq_interrupts(hw, pf->hw_oicr_idx);\n \twr32(hw, GLINT_ITR(ICE_RX_ITR, pf->hw_oicr_idx),\n \t     ITR_REG_ALIGN(ICE_ITR_8K) >> ICE_ITR_GRAN_S);\n \n",
    "prefixes": [
        "S11",
        "07/16"
    ]
}