Bug 4856 - [PATCH] correct nanddump behaviour
Summary: [PATCH] correct nanddump behaviour
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: 1.18.x
Hardware: Other Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-06 09:56 UTC by richard.genoud
Modified: 2013-11-09 00:08 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments
patch correcting nanddump behaviour with bad blocks (2.43 KB, patch)
2012-03-06 09:56 UTC, richard.genoud
Details
[PATCH 1/2] nanddump: correct rounding to next page (1.26 KB, patch)
2013-04-24 13:40 UTC, richard.genoud
Details
[PATCH 2/2] nanddump: dump rigth length when jumping bad blocks (1.82 KB, patch)
2013-04-24 13:42 UTC, richard.genoud
Details

Note You need to log in before you can comment on or make changes to this bug.
Description richard.genoud 2012-03-06 09:56:37 UTC
Created attachment 4076 [details]
patch correcting nanddump behaviour with bad blocks

There's an infinite loop in nanddump when dumping a bad block.
Moreover, bad blocks are dumped even if the -b option is given.

The attached patch corrects those points:
- dump the specified length when -b is given
- do not dump the bad blocks when -b is given
- when dumping a bad block, len should be aligned on next page aligned only if it's not already page aligned in order to dump the right size.
Comment 1 richard.genoud 2013-04-24 13:36:18 UTC
Comment on attachment 4076 [details]
patch correcting nanddump behaviour with bad blocks

patch forward ported on 1.21.0
Comment 2 richard.genoud 2013-04-24 13:40:59 UTC
Created attachment 4850 [details]
[PATCH 1/2] nanddump: correct rounding to next page
Comment 3 richard.genoud 2013-04-24 13:42:25 UTC
Created attachment 4856 [details]
[PATCH 2/2] nanddump: dump rigth length when jumping bad blocks
Comment 4 richard.genoud 2013-04-24 13:46:54 UTC
For an easier review, the original patch has been forward ported to v1.21.0 and split in 2 functional patches.

Patch 1:
Correct wrong page rounding formula on nanddump causing an (almost) infinite loop when dumping bad blocks.

Patch 2:
with the "skip bad blocks" options, nanddump is not dumping the right len when there's bad bocks. (It is dumping len - bad_block_number * erase_size).
It should skip bad blocks and still dump the requested size.

Richard.