get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 124062,
    "url": "http://patches.dpdk.org/api/patches/124062/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230216110919.373385-2-bruce.richardson@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20230216110919.373385-2-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230216110919.373385-2-bruce.richardson@intel.com",
    "date": "2023-02-16T11:09:14",
    "name": "[v3,1/6] dma/ioat: fix device stop if no copies done",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "627bdb6dab153fdc186905d3f8390e2723d2de9a",
    "submitter": {
        "id": 20,
        "url": "http://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230216110919.373385-2-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 27043,
            "url": "http://patches.dpdk.org/api/series/27043/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=27043",
            "date": "2023-02-16T11:09:13",
            "name": "dma/ioat: fix issues with stopping and restarting device",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/27043/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/124062/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/124062/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 87B8941CB1;\n\tThu, 16 Feb 2023 12:09:38 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D44A642D1D;\n\tThu, 16 Feb 2023 12:09:34 +0100 (CET)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by mails.dpdk.org (Postfix) with ESMTP id 2FC1D40E0F;\n Thu, 16 Feb 2023 12:09:32 +0100 (CET)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 16 Feb 2023 03:09:30 -0800",
            "from silpixa00401385.ir.intel.com ([10.237.214.22])\n by orsmga001.jf.intel.com with ESMTP; 16 Feb 2023 03:09:29 -0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1676545772; x=1708081772;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=0Pb298xtmdmJVsr6vOdGVeKDvu23mP3N9B7dlHT3QaM=;\n b=JFlPv6AVfF2eLsOcTMpjo60Xzba3cAOySuXrx4xfCgclK/4Rc5oEEaEl\n tDK6Gr5SzKyNBY8giLd3AhgGc9FJKsudckJOXQY10QnghbDJjPASWSy9m\n UsoddTKABil6nvM1FfpW/lwWlV25Y1HqgQzSaQOSB/HOV1h4qYdEyOs7O\n imE8mHlZ5oTQlmyR17n2iPgvEzf0hss+5L1+NWrLlzp8pbm3mdTkz+G1p\n nuWpRd2vT6g0ktaOvVVyiE5xBlCuMDpt7c2Evqu5AMsE2j9bc/35f1miW\n OV1aa9HyEVLZ1VNdOuGvgBjihu8jIS8LMTLwHjKlvPyU6ypBNHm0ELLLU Q==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10622\"; a=\"315368142\"",
            "E=Sophos;i=\"5.97,302,1669104000\"; d=\"scan'208\";a=\"315368142\"",
            "E=McAfee;i=\"6500,9779,10622\"; a=\"702522812\"",
            "E=Sophos;i=\"5.97,302,1669104000\"; d=\"scan'208\";a=\"702522812\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "fengchengwen@huawei.com, Bruce Richardson <bruce.richardson@intel.com>,\n conor.walsh@intel.com, stable@dpdk.org, Kevin Laatz <kevin.laatz@intel.com>",
        "Subject": "[PATCH v3 1/6] dma/ioat: fix device stop if no copies done",
        "Date": "Thu, 16 Feb 2023 11:09:14 +0000",
        "Message-Id": "<20230216110919.373385-2-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.37.2",
        "In-Reply-To": "<20230216110919.373385-1-bruce.richardson@intel.com>",
        "References": "<20230116153714.554470-1-bruce.richardson@intel.com>\n <20230216110919.373385-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "The HW DMA devices supported by IOAT driver do not transition to\nthe \"active\" state until the first operation is started by the HW.\nTherefore, if the user calls \"rte_dma_stop()\" on a device without\ntriggering any operations, the sequence of commands to be sent to\nthe HW is different, as is the final device state.\n\nUpdate the IOAT driver \"stop\" function to take account of this\ndifference.\n\nFixes: 583f046dd404 (\"dma/ioat: add start and stop\")\nCc: conor.walsh@intel.com\nCc: stable@dpdk.org\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\nReviewed-by: Conor Walsh <conor.walsh@intel.com>\nAcked-by: Kevin Laatz <kevin.laatz@intel.com>\n---\n drivers/dma/ioat/ioat_dmadev.c | 19 +++++++++++++++----\n 1 file changed, 15 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/dma/ioat/ioat_dmadev.c b/drivers/dma/ioat/ioat_dmadev.c\nindex 5906eb45aa..aff7bbbfde 100644\n--- a/drivers/dma/ioat/ioat_dmadev.c\n+++ b/drivers/dma/ioat/ioat_dmadev.c\n@@ -166,17 +166,28 @@ static int\n ioat_dev_stop(struct rte_dma_dev *dev)\n {\n \tstruct ioat_dmadev *ioat = dev->fp_obj->dev_private;\n+\tunsigned int chansts;\n \tuint32_t retry = 0;\n \n-\tioat->regs->chancmd = IOAT_CHANCMD_SUSPEND;\n+\tchansts = (unsigned int)(ioat->regs->chansts & IOAT_CHANSTS_STATUS);\n+\tif (chansts == IOAT_CHANSTS_ACTIVE || chansts == IOAT_CHANSTS_IDLE)\n+\t\tioat->regs->chancmd = IOAT_CHANCMD_SUSPEND;\n+\telse\n+\t\tioat->regs->chancmd = IOAT_CHANCMD_RESET;\n \n \tdo {\n \t\trte_pause();\n \t\tretry++;\n-\t} while ((ioat->regs->chansts & IOAT_CHANSTS_STATUS) != IOAT_CHANSTS_SUSPENDED\n-\t\t\t&& retry < 200);\n+\t\tchansts = (unsigned int)(ioat->regs->chansts & IOAT_CHANSTS_STATUS);\n+\t} while (chansts != IOAT_CHANSTS_SUSPENDED &&\n+\t\t\tchansts != IOAT_CHANSTS_HALTED && retry < 200);\n+\n+\tif (chansts == IOAT_CHANSTS_SUSPENDED || chansts == IOAT_CHANSTS_HALTED)\n+\t\treturn 0;\n \n-\treturn ((ioat->regs->chansts & IOAT_CHANSTS_STATUS) == IOAT_CHANSTS_SUSPENDED) ? 0 : -1;\n+\tIOAT_PMD_WARN(\"Channel could not be suspended on stop. (chansts = %u [%s])\",\n+\t\t\tchansts, chansts_readable[chansts]);\n+\treturn -1;\n }\n \n /* Get device information of a device. */\n",
    "prefixes": [
        "v3",
        "1/6"
    ]
}