get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1191946,
    "url": "http://patchwork.ozlabs.org/api/patches/1191946/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20191108130123.6839-31-linux@rasmusvillemoes.dk/",
    "project": {
        "id": 2,
        "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api",
        "name": "Linux PPC development",
        "link_name": "linuxppc-dev",
        "list_id": "linuxppc-dev.lists.ozlabs.org",
        "list_email": "linuxppc-dev@lists.ozlabs.org",
        "web_url": "https://github.com/linuxppc/wiki/wiki",
        "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git",
        "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/",
        "list_archive_url": "https://lore.kernel.org/linuxppc-dev/",
        "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/",
        "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"
    },
    "msgid": "<20191108130123.6839-31-linux@rasmusvillemoes.dk>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20191108130123.6839-31-linux@rasmusvillemoes.dk/",
    "date": "2019-11-08T13:01:06",
    "name": "[v4,30/47] serial: ucc_uart: factor out soft_uart initialization",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "3345380e798697798c0170136c8af8ed9f73136b",
    "submitter": {
        "id": 27394,
        "url": "http://patchwork.ozlabs.org/api/people/27394/?format=api",
        "name": "Rasmus Villemoes",
        "email": "linux@rasmusvillemoes.dk"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20191108130123.6839-31-linux@rasmusvillemoes.dk/mbox/",
    "series": [
        {
            "id": 141654,
            "url": "http://patchwork.ozlabs.org/api/series/141654/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=141654",
            "date": "2019-11-08T13:00:38",
            "name": "QUICC Engine support on ARM and ARM64",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/141654/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1191946/comments/",
    "check": "warning",
    "checks": "http://patchwork.ozlabs.org/api/patches/1191946/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "patchwork-incoming@ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (4096 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 478jz54DLmz9sNH\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  9 Nov 2019 01:56:49 +1100 (AEDT)",
            "from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 478jz368Y1zF6yt\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  9 Nov 2019 01:56:47 +1100 (AEDT)",
            "from mail-lf1-x141.google.com (mail-lf1-x141.google.com\n\t[IPv6:2a00:1450:4864:20::141])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 478gQp47ZgzF6tH\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tSat,  9 Nov 2019 00:02:10 +1100 (AEDT)",
            "by mail-lf1-x141.google.com with SMTP id m6so4422401lfl.3\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri, 08 Nov 2019 05:02:10 -0800 (PST)",
            "from prevas-ravi.prevas.se ([81.216.59.226])\n\tby smtp.gmail.com with ESMTPSA id\n\td28sm2454725lfn.33.2019.11.08.05.02.04\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 08 Nov 2019 05:02:05 -0800 (PST)"
        ],
        "Authentication-Results": [
            "ozlabs.org; dmarc=none (p=none dis=none)\n\theader.from=rasmusvillemoes.dk",
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=rasmusvillemoes.dk header.i=@rasmusvillemoes.dk\n\theader.b=\"URxmLDTd\"; dkim-atps=neutral",
            "lists.ozlabs.org; spf=pass (sender SPF authorized)\n\tsmtp.mailfrom=rasmusvillemoes.dk (client-ip=2a00:1450:4864:20::141;\n\thelo=mail-lf1-x141.google.com; envelope-from=linux@rasmusvillemoes.dk;\n\treceiver=<UNKNOWN>)",
            "lists.ozlabs.org; dmarc=none (p=none dis=none)\n\theader.from=rasmusvillemoes.dk",
            "lists.ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=rasmusvillemoes.dk header.i=@rasmusvillemoes.dk\n\theader.b=\"URxmLDTd\"; dkim-atps=neutral"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=rasmusvillemoes.dk; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=A4Xv5WoIG3tnGwzAreyDrYqib6OrZF77Ddvl40A6T0E=;\n\tb=URxmLDTdcAq80aCnMhvo9+yxriyxiXCl2huzwXJbiNzXqU4LBIzlQJxwIlqwDb0B6D\n\t4l1aeb0I3lz6KK864Ho3RFQFugG/ukSM1ds9W4OZWaEV8jGHwac3TWVpT/rSftXjdWZi\n\thxoY84qVs4c5q00EAZcnrdRF2IW6X2EmBpgMo=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=A4Xv5WoIG3tnGwzAreyDrYqib6OrZF77Ddvl40A6T0E=;\n\tb=h0gtpDNoe6dj2J2zHCjPLIcJMVQVF7kUs+yb6uxa/y7Y8X9nvXPt8TDQcTjSNSAe0e\n\tr+CwbMMM8rdK0i4wdjieqDZbHt7uwrBQCbuRun73hXBp0SVe66KLhz2/bSTKQVfZK5JD\n\tmAQ7I5Zp7MGRYIoprxvdj5eFCcVMQ7lukhNXo1L80fzltS88d61laJALqf6g3QIuW8Sz\n\tusY4FCh9jJRGoHNoZKyi14Xoq6gplQZJCEQhK6+MkK0XY1sySIZmtsnbQSIFzhKweaCD\n\tv5McxnXyoVaEty3ysazynZbYH1H29ZmwkM5SZAmxk/MeJ4KY+W1AFeDUQ7chHQhexSSN\n\thyuw==",
        "X-Gm-Message-State": "APjAAAVvesX/s+zxVQEi7aovmK8C8jHr0GQsl19R6fNIeITpf3AGZ5Xm\n\tOVnFi4tqunIkRGgX0W8mIk68Mg==",
        "X-Google-Smtp-Source": "APXvYqxok15BiW8QWqekpOKDoemwZFfMMm68NncqzQP8AGYfQOjWESyeOU61ee1ET9EOKFQzN2AVDQ==",
        "X-Received": "by 2002:ac2:4a8a:: with SMTP id\n\tl10mr6565299lfp.185.1573218126060; \n\tFri, 08 Nov 2019 05:02:06 -0800 (PST)",
        "From": "Rasmus Villemoes <linux@rasmusvillemoes.dk>",
        "To": "Qiang Zhao <qiang.zhao@nxp.com>, Li Yang <leoyang.li@nxp.com>,\n\tChristophe Leroy <christophe.leroy@c-s.fr>",
        "Subject": "[PATCH v4 30/47] serial: ucc_uart: factor out soft_uart\n\tinitialization",
        "Date": "Fri,  8 Nov 2019 14:01:06 +0100",
        "Message-Id": "<20191108130123.6839-31-linux@rasmusvillemoes.dk>",
        "X-Mailer": "git-send-email 2.23.0",
        "In-Reply-To": "<20191108130123.6839-1-linux@rasmusvillemoes.dk>",
        "References": "<20191108130123.6839-1-linux@rasmusvillemoes.dk>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "linuxppc-dev@lists.ozlabs.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>",
        "List-Unsubscribe": "<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.ozlabs.org/pipermail/linuxppc-dev/>",
        "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>",
        "List-Help": "<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>",
        "List-Subscribe": "<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>",
        "Cc": "Rasmus Villemoes <linux@rasmusvillemoes.dk>, linux-kernel@vger.kernel.org,\n\tScott Wood <oss@buserror.net>, linux-serial@vger.kernel.org,\n\tlinuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org",
        "Errors-To": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org",
        "Sender": "\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"
    },
    "content": "The \"soft uart\" mechanism is a workaround for a silicon bug which (as\nfar as I know) only affects some PPC-based SOCs.\n\nThe code that determines which microcode blob to request relies on\nsome powerpc-specific bits (e.g. the mfspr(SPRN_SVR) and hence also\nthe asm/reg.h header). This makes it a little awkward to allow this\ndriver to be built for non-PPC based SOCs with a QE, even if they are\nnot affected by that silicon bug and thus don't need any of the Soft\nUART logic.\n\nThere's no way around guarding those bits with some ifdeffery, so to\nkeep that isolated, factor out the\ndo-we-need-soft-uart-and-if-so-handle-the-firmware to a separate\nfunction, which we can then easily stub out for non-PPC.\n\nSigned-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>\n---\n drivers/tty/serial/ucc_uart.c | 110 ++++++++++++++++++----------------\n 1 file changed, 58 insertions(+), 52 deletions(-)",
    "diff": "diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c\nindex 8a378ee5d34f..f286e91714cb 100644\n--- a/drivers/tty/serial/ucc_uart.c\n+++ b/drivers/tty/serial/ucc_uart.c\n@@ -1183,70 +1183,76 @@ static void uart_firmware_cont(const struct firmware *fw, void *context)\n \trelease_firmware(fw);\n }\n \n-static int ucc_uart_probe(struct platform_device *ofdev)\n+static int soft_uart_init(struct platform_device *ofdev)\n {\n \tstruct device_node *np = ofdev->dev.of_node;\n-\tconst unsigned int *iprop;      /* Integer OF properties */\n-\tconst char *sprop;      /* String OF properties */\n-\tstruct uart_qe_port *qe_port = NULL;\n-\tstruct resource res;\n+\tstruct qe_firmware_info *qe_fw_info;\n \tint ret;\n \n-\t/*\n-\t * Determine if we need Soft-UART mode\n-\t */\n \tif (of_find_property(np, \"soft-uart\", NULL)) {\n \t\tdev_dbg(&ofdev->dev, \"using Soft-UART mode\\n\");\n \t\tsoft_uart = 1;\n+\t} else {\n+\t\treturn 0;\n \t}\n \n-\t/*\n-\t * If we are using Soft-UART, determine if we need to upload the\n-\t * firmware, too.\n-\t */\n-\tif (soft_uart) {\n-\t\tstruct qe_firmware_info *qe_fw_info;\n-\n-\t\tqe_fw_info = qe_get_firmware_info();\n-\n-\t\t/* Check if the firmware has been uploaded. */\n-\t\tif (qe_fw_info && strstr(qe_fw_info->id, \"Soft-UART\")) {\n-\t\t\tfirmware_loaded = 1;\n-\t\t} else {\n-\t\t\tchar filename[32];\n-\t\t\tunsigned int soc;\n-\t\t\tunsigned int rev_h;\n-\t\t\tunsigned int rev_l;\n-\n-\t\t\tsoc = soc_info(&rev_h, &rev_l);\n-\t\t\tif (!soc) {\n-\t\t\t\tdev_err(&ofdev->dev, \"unknown CPU model\\n\");\n-\t\t\t\treturn -ENXIO;\n-\t\t\t}\n-\t\t\tsprintf(filename, \"fsl_qe_ucode_uart_%u_%u%u.bin\",\n-\t\t\t\tsoc, rev_h, rev_l);\n-\n-\t\t\tdev_info(&ofdev->dev, \"waiting for firmware %s\\n\",\n-\t\t\t\tfilename);\n+\tqe_fw_info = qe_get_firmware_info();\n \n-\t\t\t/*\n-\t\t\t * We call request_firmware_nowait instead of\n-\t\t\t * request_firmware so that the driver can load and\n-\t\t\t * initialize the ports without holding up the rest of\n-\t\t\t * the kernel.  If hotplug support is enabled in the\n-\t\t\t * kernel, then we use it.\n-\t\t\t */\n-\t\t\tret = request_firmware_nowait(THIS_MODULE,\n-\t\t\t\tFW_ACTION_HOTPLUG, filename, &ofdev->dev,\n-\t\t\t\tGFP_KERNEL, &ofdev->dev, uart_firmware_cont);\n-\t\t\tif (ret) {\n-\t\t\t\tdev_err(&ofdev->dev,\n-\t\t\t\t\t\"could not load firmware %s\\n\",\n-\t\t\t\t\tfilename);\n-\t\t\t\treturn ret;\n-\t\t\t}\n+\t/* Check if the firmware has been uploaded. */\n+\tif (qe_fw_info && strstr(qe_fw_info->id, \"Soft-UART\")) {\n+\t\tfirmware_loaded = 1;\n+\t} else {\n+\t\tchar filename[32];\n+\t\tunsigned int soc;\n+\t\tunsigned int rev_h;\n+\t\tunsigned int rev_l;\n+\n+\t\tsoc = soc_info(&rev_h, &rev_l);\n+\t\tif (!soc) {\n+\t\t\tdev_err(&ofdev->dev, \"unknown CPU model\\n\");\n+\t\t\treturn -ENXIO;\n+\t\t}\n+\t\tsprintf(filename, \"fsl_qe_ucode_uart_%u_%u%u.bin\",\n+\t\t\tsoc, rev_h, rev_l);\n+\n+\t\tdev_info(&ofdev->dev, \"waiting for firmware %s\\n\",\n+\t\t\t filename);\n+\n+\t\t/*\n+\t\t * We call request_firmware_nowait instead of\n+\t\t * request_firmware so that the driver can load and\n+\t\t * initialize the ports without holding up the rest of\n+\t\t * the kernel.  If hotplug support is enabled in the\n+\t\t * kernel, then we use it.\n+\t\t */\n+\t\tret = request_firmware_nowait(THIS_MODULE,\n+\t\t\t\t\t      FW_ACTION_HOTPLUG, filename, &ofdev->dev,\n+\t\t\t\t\t      GFP_KERNEL, &ofdev->dev, uart_firmware_cont);\n+\t\tif (ret) {\n+\t\t\tdev_err(&ofdev->dev,\n+\t\t\t\t\"could not load firmware %s\\n\",\n+\t\t\t\tfilename);\n+\t\t\treturn ret;\n \t\t}\n \t}\n+\treturn 0;\n+}\n+\n+static int ucc_uart_probe(struct platform_device *ofdev)\n+{\n+\tstruct device_node *np = ofdev->dev.of_node;\n+\tconst unsigned int *iprop;      /* Integer OF properties */\n+\tconst char *sprop;      /* String OF properties */\n+\tstruct uart_qe_port *qe_port = NULL;\n+\tstruct resource res;\n+\tint ret;\n+\n+\t/*\n+\t * Determine if we need Soft-UART mode\n+\t */\n+\tret = soft_uart_init(ofdev);\n+\tif (ret)\n+\t\treturn ret;\n \n \tqe_port = kzalloc(sizeof(struct uart_qe_port), GFP_KERNEL);\n \tif (!qe_port) {\n",
    "prefixes": [
        "v4",
        "30/47"
    ]
}