summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2006-03-31 12:29:52 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-31 22:18:49 +0200
commit84e699e6ec5b431289474f78f8df9dfcc2737085 (patch)
tree6f402905e4b4fd3fe8f2bdafdb8f0d13b5b5a371 /drivers/mtd
parent[PATCH] Add chip used in collie to jedec_probe (diff)
downloadlinux-84e699e6ec5b431289474f78f8df9dfcc2737085.tar.xz
linux-84e699e6ec5b431289474f78f8df9dfcc2737085.zip
[PATCH] mtd/redboot: Handle holes in fis table
Redboot simply sets the first character of a fis entry to 0xff on "fis delete". The kernel redboot parser stops parsing on such an entry, and without this patch any entries after a deleted image would not be detected. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Cc: Thomas Gleixner <tglx@linutronix.de> Acked-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/redboot.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/mtd/redboot.c b/drivers/mtd/redboot.c
index 8815c8dbef2d..c077d2ec9cdd 100644
--- a/drivers/mtd/redboot.c
+++ b/drivers/mtd/redboot.c
@@ -85,10 +85,6 @@ static int parse_redboot_partitions(struct mtd_info *master,
numslots = (master->erasesize / sizeof(struct fis_image_desc));
for (i = 0; i < numslots; i++) {
- if (buf[i].name[0] == 0xff) {
- i = numslots;
- break;
- }
if (!memcmp(buf[i].name, "FIS directory", 14)) {
/* This is apparently the FIS directory entry for the
* FIS directory itself. The FIS directory size is
@@ -128,7 +124,7 @@ static int parse_redboot_partitions(struct mtd_info *master,
struct fis_list *new_fl, **prev;
if (buf[i].name[0] == 0xff)
- break;
+ continue;
if (!redboot_checksum(&buf[i]))
break;