Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/813180/?format=api
{ "id": 813180, "url": "http://patchwork.ozlabs.org/api/patches/813180/?format=api", "web_url": "http://patchwork.ozlabs.org/project/skiboot/patch/20170913065946.11262-1-sjitindarsingh@gmail.com/", "project": { "id": 44, "url": "http://patchwork.ozlabs.org/api/projects/44/?format=api", "name": "skiboot firmware development", "link_name": "skiboot", "list_id": "skiboot.lists.ozlabs.org", "list_email": "skiboot@lists.ozlabs.org", "web_url": "http://github.com/open-power/skiboot", "scm_url": "http://github.com/open-power/skiboot", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170913065946.11262-1-sjitindarsingh@gmail.com>", "list_archive_url": null, "date": "2017-09-13T06:59:46", "name": "pflash: Fix erase command for unaligned start address", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "84933c1393f0a54ee357ea93c9c64a74b564a9a9", "submitter": { "id": 68427, "url": "http://patchwork.ozlabs.org/api/people/68427/?format=api", "name": "Suraj Jitindar Singh", "email": "sjitindarsingh@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/skiboot/patch/20170913065946.11262-1-sjitindarsingh@gmail.com/mbox/", "series": [ { "id": 2819, "url": "http://patchwork.ozlabs.org/api/series/2819/?format=api", "web_url": "http://patchwork.ozlabs.org/project/skiboot/list/?series=2819", "date": "2017-09-13T06:59:46", "name": "pflash: Fix erase command for unaligned start address", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/2819/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/813180/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/813180/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "skiboot@lists.ozlabs.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "skiboot@lists.ozlabs.org" ], "Received": [ "from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xsXc13Yf7z9sNV\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 17:00:17 +1000 (AEST)", "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xsXc1295kzDqr8\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 17:00:17 +1000 (AEST)", "from mail-pf0-x241.google.com (mail-pf0-x241.google.com\n\t[IPv6:2607:f8b0:400e:c00::241])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xsXbd2JVMzDqlw\n\tfor <skiboot@lists.ozlabs.org>; Wed, 13 Sep 2017 16:59:56 +1000 (AEST)", "by mail-pf0-x241.google.com with SMTP id g65so6953472pfe.1\n\tfor <skiboot@lists.ozlabs.org>; Tue, 12 Sep 2017 23:59:56 -0700 (PDT)", "from surajjs1.ozlabs.ibm.com ([122.99.82.10])\n\tby smtp.gmail.com with ESMTPSA id\n\tk27sm18892196pfk.20.2017.09.12.23.59.51\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 12 Sep 2017 23:59:53 -0700 (PDT)" ], "Authentication-Results": [ "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"rwLPdYTf\"; dkim-atps=neutral", "lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"rwLPdYTf\"; dkim-atps=neutral", "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gmail.com\n\t(client-ip=2607:f8b0:400e:c00::241; helo=mail-pf0-x241.google.com;\n\tenvelope-from=sjitindarsingh@gmail.com; receiver=<UNKNOWN>)", "lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"rwLPdYTf\"; dkim-atps=neutral" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id;\n\tbh=HIdCRMMYJe8f7aAPqOESkW0hJ6lMY6UjnZgWtOvABwY=;\n\tb=rwLPdYTfgTSxcWQCMq0ANIes2fmyYXky7EOKj7hGOX/Alzh6QLXJQjMNuH3+efFGAf\n\tRa71EMMfhd9FQHnWQkcxBdN186bj5DtBKZ+IH/Ho/VvShG7Ua1tRfsZDx+V5MNQHWEIq\n\t/CTxpdzNKJ7TFa8SmhWyOk52ia0YzvF61w2dQ45SUH3Qx3jDHHpe7URAFJ80HZ9UJAt1\n\tbFznfR2LSRBGXfjNozvJoddIFBb2apT6mQhpUNCeShdFmYvwUygqPnw0X6ceFjz3azj8\n\tBCP0WHN7dB/jm2xYwKkx4LpfLmc0qZX4ymBcktjhIRWcI7LeLinkrXNd27DMUcV2ahgN\n\tDP6Q==", "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;\n\tbh=HIdCRMMYJe8f7aAPqOESkW0hJ6lMY6UjnZgWtOvABwY=;\n\tb=jLBVxa6as+h+X+SrgOvFpj12HqMODPD8aY1ecPnIhsIiO2TLHcMtAHTYuEuRhUlz4F\n\tdWhhYGJN9KOP4pukc+Zd+TRtpbgVUEplCXRgwFYIa+7i3jsBSD99bEuQ07Tgkp+DZTFG\n\tXUretsrrQVn+YJnqPkUxIm6bLICGMoPZ+sUfxBFepMoE8knncFzSWdowIQFyRKWRmJCS\n\tta+ggkAg4KDcOXflo2E6limP8ggpnNt5f2BbMQxfFSKib87AJhRrbjRyO/bUZeLaHkmu\n\tMk2KW7kbjC8d3p18c603V9zxKeVgtXyBPhkYlZCEtZ/KTeeN1hbUYI79167esbT7z9ze\n\tdMyg==", "X-Gm-Message-State": "AHPjjUiyLhmGROD2RHFVRFnqYwKxvFRIceYclxzZshoYk+1OUqcM+HHw\n\tmtwvYkuTqkpOohvn", "X-Google-Smtp-Source": "ADKCNb4kVOWEANkSs/o0SpDOEcc07KrvPnERmOBmuLiqrKhNafPGJYC50SIj47J0RYjJjC6WMKKdtg==", "X-Received": "by 10.98.19.203 with SMTP id 72mr17319149pft.124.1505285994138; \n\tTue, 12 Sep 2017 23:59:54 -0700 (PDT)", "From": "Suraj Jitindar Singh <sjitindarsingh@gmail.com>", "To": "skiboot@lists.ozlabs.org", "Date": "Wed, 13 Sep 2017 16:59:46 +1000", "Message-Id": "<20170913065946.11262-1-sjitindarsingh@gmail.com>", "X-Mailer": "git-send-email 2.9.4", "Subject": "[Skiboot] [SKIBOOT] [PATCH] pflash: Fix erase command for unaligned\n\tstart address", "X-BeenThere": "skiboot@lists.ozlabs.org", "X-Mailman-Version": "2.1.24", "Precedence": "list", "List-Id": "Mailing list for skiboot development <skiboot.lists.ozlabs.org>", "List-Unsubscribe": "<https://lists.ozlabs.org/options/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://lists.ozlabs.org/pipermail/skiboot/>", "List-Post": "<mailto:skiboot@lists.ozlabs.org>", "List-Help": "<mailto:skiboot-request@lists.ozlabs.org?subject=help>", "List-Subscribe": "<https://lists.ozlabs.org/listinfo/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=subscribe>", "Cc": "cyrilbur@gmail.com", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org", "Sender": "\"Skiboot\"\n\t<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>" }, "content": "The erase_range() function handles erasing the flash for a given start\naddress and length, and can handle an unaligned start address and\nlength. However in the unaligned start address case we are incorrectly\ncalculating the remaining size which can lead to incomplete erases.\n\nIf we're going to update the remaining size based on what the start\naddress was then we probably want to do that before we overide the\norigin start address. So rearrange the code so that this is indeed the\ncase.\n\nReported-by: Pridhiviraj Paidipeddi <ppaidipe@in.ibm.com>\nSigned-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>\n---\n external/pflash/pflash.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)", "diff": "diff --git a/external/pflash/pflash.c b/external/pflash/pflash.c\nindex bfc975f..5b1be3c 100644\n--- a/external/pflash/pflash.c\n+++ b/external/pflash/pflash.c\n@@ -331,9 +331,9 @@ static int erase_range(struct flash_details *flash,\n \t\t\tfprintf(stderr, \"Failed to blocklevel_smart_erase(): %d\\n\", rc);\n \t\t\treturn 1;\n \t\t}\n-\t\tstart += flash->erase_granule - (start & erase_mask);\n \t\tsize -= flash->erase_granule - (start & erase_mask);\n \t\tdone = flash->erase_granule - (start & erase_mask);\n+\t\tstart += flash->erase_granule - (start & erase_mask);\n \t}\n \tprogress_tick(done);\n \twhile (size & ~(erase_mask)) {\n", "prefixes": [] }