diff options
Diffstat (limited to 'packages/linux/nslu2-kernel')
-rw-r--r-- | packages/linux/nslu2-kernel/2.6.14/10-mtdpart-redboot-fis-byteswap.patch | 42 | ||||
-rw-r--r-- | packages/linux/nslu2-kernel/2.6.14/defconfig | 5 |
2 files changed, 45 insertions, 2 deletions
diff --git a/packages/linux/nslu2-kernel/2.6.14/10-mtdpart-redboot-fis-byteswap.patch b/packages/linux/nslu2-kernel/2.6.14/10-mtdpart-redboot-fis-byteswap.patch new file mode 100644 index 0000000000..c5e322ccac --- /dev/null +++ b/packages/linux/nslu2-kernel/2.6.14/10-mtdpart-redboot-fis-byteswap.patch @@ -0,0 +1,42 @@ +On IXP4XX systems the FIS directory is big endian even with a little +endian kernel. This patch recognises the FIS directory on such a +system and byte swaps it to obtain a valid table based on the 'size' +field of the FIS directory (the size field is know to always match the +erase block size on such systems, and probably all systems.) + +--- linux-2.6.13/drivers/mtd/redboot.c.orig 2005-10-19 17:14:19.304956677 -0700 ++++ linux-2.6.13/drivers/mtd/redboot.c 2005-10-19 17:48:16.457146582 -0700 +@@ -89,8 +89,32 @@ + i = numslots; + break; + } +- if (!memcmp(buf[i].name, "FIS directory", 14)) ++ 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 ++ * one erase block, if the buf[i].size field is ++ * swab32(erasesize) then we know we are looking at ++ * a byte swapped FIS directory - swap all the entries! ++ * (NOTE: this is 'size' not 'data_length', size is ++ * the full size of the entry.) ++ */ ++ if (swab32(buf[i].size) == master->erasesize) { ++ int j; ++ for (j = 0; j < numslots && buf[j].name[0] != 0xff; ++j) { ++ /* The unsigned long fields were written with the ++ * wrong byte sex, name and pad have no byte sex. ++ */ ++ swab32s(&buf[j].flash_base); ++ swab32s(&buf[j].mem_base); ++ swab32s(&buf[j].size); ++ swab32s(&buf[j].entry_point); ++ swab32s(&buf[j].data_length); ++ swab32s(&buf[j].desc_cksum); ++ swab32s(&buf[j].file_cksum); ++ } ++ } + break; ++ } + } + if (i == numslots) { + /* Didn't find it */ diff --git a/packages/linux/nslu2-kernel/2.6.14/defconfig b/packages/linux/nslu2-kernel/2.6.14/defconfig index 78261828f0..3a6c7777d3 100644 --- a/packages/linux/nslu2-kernel/2.6.14/defconfig +++ b/packages/linux/nslu2-kernel/2.6.14/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.14-rc3 -# Fri Oct 7 19:32:33 2005 +# Linux kernel version: 2.6.14-rc4 +# Tue Oct 18 21:53:12 2005 # CONFIG_ARM=y CONFIG_MMU=y @@ -559,6 +559,7 @@ CONFIG_SCSI_MULTI_LUN=y # CONFIG_SCSI_DPT_I2O is not set # CONFIG_MEGARAID_NEWGEN is not set # CONFIG_MEGARAID_LEGACY is not set +# CONFIG_MEGARAID_SAS is not set # CONFIG_SCSI_SATA is not set # CONFIG_SCSI_BUSLOGIC is not set # CONFIG_SCSI_DMX3191D is not set |