upgrade atheros targets to 2.6.22.1
[openwrt/svn-archive/archive.git] / target / linux / atheros-2.6 / patches / 140-redboot_partition_scan.patch
1 diff -urN linux.old/drivers/mtd/redboot.c linux.dev/drivers/mtd/redboot.c
2 --- linux.old/drivers/mtd/redboot.c 2006-12-14 23:53:29.000000000 +0100
3 +++ linux.dev/drivers/mtd/redboot.c 2006-12-16 04:23:42.000000000 +0100
4 @@ -64,6 +64,7 @@
5 if (!buf)
6 return -ENOMEM;
7
8 +restart:
9 if ( directory < 0 )
10 offset = master->size + directory*master->erasesize;
11 else
12 @@ -140,6 +141,11 @@
13 }
14 if (i == numslots) {
15 /* Didn't find it */
16 + if (offset + master->erasesize < master->size) {
17 + /* not at the end of the flash yet, maybe next block :) */
18 + directory++;
19 + goto restart;
20 + }
21 printk(KERN_NOTICE "No RedBoot partition table detected in %s\n",
22 master->name);
23 ret = 0;
24