1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-05 05:21:32 +02:00
openwrt-xburst/target/linux/atheros/patches-2.6.23/140-redboot_partition_scan.patch
juhosg 02e216b7f2 [atheros] refresh kernel patches
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11197 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-05-19 07:16:54 +00:00

25 lines
764 B
Diff

Index: linux-2.6.23.17/drivers/mtd/redboot.c
===================================================================
--- linux-2.6.23.17.orig/drivers/mtd/redboot.c
+++ linux-2.6.23.17/drivers/mtd/redboot.c
@@ -64,6 +64,7 @@ static int parse_redboot_partitions(stru
if (!buf)
return -ENOMEM;
+restart:
if ( directory < 0 )
offset = master->size + directory*master->erasesize;
else
@@ -140,6 +141,11 @@ static int parse_redboot_partitions(stru
}
if (i == numslots) {
/* Didn't find it */
+ if (offset + master->erasesize < master->size) {
+ /* not at the end of the flash yet, maybe next block :) */
+ directory++;
+ goto restart;
+ }
printk(KERN_NOTICE "No RedBoot partition table detected in %s\n",
master->name);
ret = 0;