[Skiboot] [SKIBOOT] [PATCH] pflash: Fix erase command for unaligned start address

Stewart Smith stewart at linux.vnet.ibm.com
Fri Sep 15 18:18:25 AEST 2017

Cyril Bur <cyrilbur at gmail.com> writes:
> On Wed, 2017-09-13 at 16:59 +1000, Suraj Jitindar Singh wrote:
>> The erase_range() function handles erasing the flash for a given start
>> address and length, and can handle an unaligned start address and
>> length. However in the unaligned start address case we are incorrectly
>> calculating the remaining size which can lead to incomplete erases.
>> If we're going to update the remaining size based on what the start
>> address was then we probably want to do that before we overide the
>> origin start address. So rearrange the code so that this is indeed the
>> case.
>> Reported-by: Pridhiviraj Paidipeddi <ppaidipe at in.ibm.com>
>> Signed-off-by: Suraj Jitindar Singh <sjitindarsingh at gmail.com>
> Good find.
> Stewart: I know you usually do, but just to be sure, if you could
> respond with the merged sha1 of this so that I'll remember to add a
> testcase for this, I'm surprised this wasn't caught in testing.

Merged as of aefd3ffce6ed8f586290c0044446024f6e6fdcd5

Moar tests always welcomed. :)

Stewart Smith
OPAL Architect, IBM.

More information about the Skiboot mailing list