[PATCH] omap : nand : fix subpage ecc issue with prefetch

Vimal Singh vimal.newwork at gmail.com
Fri May 6 03:30:47 EDT 2011


On Fri, May 6, 2011 at 12:18 AM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> On Mon, 2011-05-02 at 16:40 +0530, Kishore Kadiyala wrote:
>> For prefetch engine, read and write  got broken in commit '2c01946c'.
>> We never hit a scenario of not getting 'gpmc_prefetch_enable'
>> call success.
>> When reading/writing a subpage with a non divisible by 4 ecc number
>> of bytes, the mis-aligned bytes gets handled first before enabling
>> the Prefetch engine, then it reads/writes rest of the bytes.
>>
>> Signed-off-by: Kishore Kadiyala <kishore.kadiyala at ti.com>
>> Signed-off-by: Vimal Singh <vimal.newwork at gmail.com>
>> Reported-by: Bryan DE FARIA <bdefaria at adeneo-embedded.com>
>
> This needs a better commit message with more explanation and analysis of
> the problem and how it was fixed.This commit message is not very
> understandable. And then it needs also:

How about a commit log like this:

When reading/writing a subpage (When HW ECC is not available/enable)
for number of bytes not aligned to 4, the mis-aligned bytes gets
handled first (by cpu copy mathod) before enabling the Prefetch
engin to/from 'p' (start of buffer 'buf').
Then it reads/writes rest of the bytes with the help of Prefetch
engine, if available, or again by cpu copy mathod. Currnetly,
reading/writing of rest of bytes, is not done correctly. Its trying to
read/write again to/from begining of buffer 'buf', overwriting the
mis-aligned bytes.

For prefetch engine read and write it got broken in commit '2c01946c'.
And we never hit the scenario of not getting 'gpmc_prefetch_enable'
call sucess. So, problem did not get caught up.

This patch fixes the issue.

> Cc: stable at kernel.org [2.6.36+]
>
> Right? And then we could send it upstream.

Yes, sure. I think kishore can take care of adding this in 'cc'
while posting next time.

-- 
Regards,
Vimal Singh



More information about the linux-mtd mailing list