get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1629718,
    "url": "http://patchwork.ozlabs.org/api/patches/1629718/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20220511183332.1362-1-pali@kernel.org/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api",
        "name": "U-Boot",
        "link_name": "uboot",
        "list_id": "u-boot.lists.denx.de",
        "list_email": "u-boot@lists.denx.de",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20220511183332.1362-1-pali@kernel.org>",
    "list_archive_url": null,
    "date": "2022-05-11T18:33:30",
    "name": "[1/3] mmc: fsl_esdhc_spl: Add support for loading proper U-Boot from unaligned location",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "b09809bb70661b18cfa7f46f131ae7af95b10427",
    "submitter": {
        "id": 78810,
        "url": "http://patchwork.ozlabs.org/api/people/78810/?format=api",
        "name": "Pali Rohár",
        "email": "pali@kernel.org"
    },
    "delegate": {
        "id": 55230,
        "url": "http://patchwork.ozlabs.org/api/users/55230/?format=api",
        "username": "freenix",
        "first_name": "Peng",
        "last_name": "Fan",
        "email": "van.freenix@gmail.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20220511183332.1362-1-pali@kernel.org/mbox/",
    "series": [
        {
            "id": 299695,
            "url": "http://patchwork.ozlabs.org/api/series/299695/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=299695",
            "date": "2022-05-11T18:33:32",
            "name": "[1/3] mmc: fsl_esdhc_spl: Add support for loading proper U-Boot from unaligned location",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/299695/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1629718/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1629718/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": [
            "bilbo.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=k9moufL7;\n\tdkim-atps=neutral",
            "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>)",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=kernel.org",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.b=\"k9moufL7\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=kernel.org",
            "phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org"
        ],
        "Received": [
            "from phobos.denx.de (phobos.denx.de [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (2048 bits))\n\t(No client certificate requested)\n\tby bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kz4nj4lb2z9sFk\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 12 May 2022 05:33:13 +1000 (AEST)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 202E884385;\n\tWed, 11 May 2022 21:23:07 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id 1258284348; Wed, 11 May 2022 21:22:57 +0200 (CEST)",
            "from ams.source.kernel.org (ams.source.kernel.org\n [IPv6:2604:1380:4601:e00::1])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 3341F8436D\n for <u-boot@lists.denx.de>; Wed, 11 May 2022 21:22:48 +0200 (CEST)",
            "from smtp.kernel.org (relay.kernel.org [52.25.139.140])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n (No client certificate requested)\n by ams.source.kernel.org (Postfix) with ESMTPS id 41DA0B825F8;\n Wed, 11 May 2022 18:34:25 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id D3D63C340EE;\n Wed, 11 May 2022 18:34:23 +0000 (UTC)",
            "by pali.im (Postfix)\n id ED6F921A6; Wed, 11 May 2022 20:34:20 +0200 (CEST)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,\n SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no\n version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n s=k20201202; t=1652294064;\n bh=Mr7FenBqXIfLgbbfXhhs6if3os5djpLXvZuLKkDYr2E=;\n h=From:To:Cc:Subject:Date:From;\n b=k9moufL7Ee+3SwguOShgAsvrFtCQCxABhe/BHiCkIQd6punz2/1A7C4rz3+I4p8j/\n J2jN6CGY14lhORTvHzpwST9Rxe+w2qLb8PTCChhH4bRT3VENai09UxZv6bEz7CE6wt\n SckXngy8DjljUC7zl5s88TSzhQxtlupVWS0uieam/J4/IIcVy//iPaNSO7ysMfWNM6\n NO8XEdbAwR2fInRtO7xmhSgvbJkk/bOR3ZGvuyFAPBEOLOmAvN/5ziUKugBLT1o1HJ\n ZlZ3yM+jSXIxOZ/S+Z5/QnAxgyPcUu3P6TFc1gxA0l0kTdYHCy2PyIGQoy6DHSZ/sG\n Y9QtHc/G2K9/A==",
        "From": "=?utf-8?q?Pali_Roh=C3=A1r?= <pali@kernel.org>",
        "To": "Peng Fan <peng.fan@nxp.com>, Jaehoon Chung <jh80.chung@samsung.com>,\n Priyanka Jain <priyanka.jain@nxp.com>, Sinan Akman <sinan@writeme.com>",
        "Cc": "u-boot@lists.denx.de",
        "Subject": "[PATCH 1/3] mmc: fsl_esdhc_spl: Add support for loading proper U-Boot\n from unaligned location",
        "Date": "Wed, 11 May 2022 20:33:30 +0200",
        "Message-Id": "<20220511183332.1362-1-pali@kernel.org>",
        "X-Mailer": "git-send-email 2.20.1",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.39",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>",
        "List-Post": "<mailto:u-boot@lists.denx.de>",
        "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>",
        "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>",
        "X-Virus-Scanned": "clamav-milter 0.103.5 at phobos.denx.de",
        "X-Virus-Status": "Clean"
    },
    "content": "This allows to concatenate SPL and proper U-Boot without extra alignment.\n\nSigned-off-by: Pali Rohár <pali@kernel.org>\n---\n drivers/mmc/fsl_esdhc_spl.c | 25 ++++++++++++++++++++++---\n 1 file changed, 22 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/drivers/mmc/fsl_esdhc_spl.c b/drivers/mmc/fsl_esdhc_spl.c\nindex 760f13d24018..e3175de16bab 100644\n--- a/drivers/mmc/fsl_esdhc_spl.c\n+++ b/drivers/mmc/fsl_esdhc_spl.c\n@@ -155,10 +155,21 @@ again:\n \t* Load U-Boot image from mmc into RAM\n \t*/\n \tcode_len = CONFIG_SYS_MMC_U_BOOT_SIZE;\n-\tblk_start = ALIGN(offset, mmc->read_bl_len) / mmc->read_bl_len;\n-\tblk_cnt = ALIGN(code_len, mmc->read_bl_len) / mmc->read_bl_len;\n+\tblk_start = offset / mmc->read_bl_len;\n+\tblk_off = offset % mmc->read_bl_len;\n+\tblk_cnt = ALIGN(code_len, mmc->read_bl_len) / mmc->read_bl_len + 1;\n+\tif (blk_off) {\n+\t\terr = mmc->block_dev.block_read(&mmc->block_dev,\n+\t\t\t\t\t\tblk_start, 1, tmp_buf);\n+\t\tif (err != 1) {\n+\t\t\tputs(\"spl: mmc read failed!!\\n\");\n+\t\t\thang();\n+\t\t}\n+\t\tblk_start++;\n+\t}\n \terr = mmc->block_dev.block_read(&mmc->block_dev, blk_start, blk_cnt,\n-\t\t\t\t\t(uchar *)CONFIG_SYS_MMC_U_BOOT_DST);\n+\t\t\t\t\t(uchar *)CONFIG_SYS_MMC_U_BOOT_DST +\n+\t\t\t\t\t(blk_off ? (mmc->read_bl_len - blk_off) : 0));\n \tif (err != blk_cnt) {\n \t\tputs(\"spl: mmc read failed!!\\n\");\n #ifndef CONFIG_FSL_CORENET\n@@ -166,6 +177,14 @@ again:\n #endif\n \t\thang();\n \t}\n+\t/*\n+\t * SDHC DMA may erase bytes at dst + bl_len - blk_off - 8\n+\t * due to unaligned access. So copy leading bytes from tmp_buf\n+\t * after SDHC DMA transfer.\n+\t */\n+\tif (blk_off)\n+\t\tmemcpy((uchar *)CONFIG_SYS_MMC_U_BOOT_DST,\n+\t\t       tmp_buf + blk_off, mmc->read_bl_len - blk_off);\n \n \t/*\n \t* Clean d-cache and invalidate i-cache, to\n",
    "prefixes": [
        "1/3"
    ]
}