[kernel] update to 2.6.34.5

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22768 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Florian Fainelli 2010-08-22 17:08:37 +00:00
parent 4b4be29af2
commit 7a32d5d9e3
25 changed files with 118 additions and 79 deletions

View File

@ -1,7 +1,7 @@
--- a/arch/mips/bcm47xx/nvram.c --- a/arch/mips/bcm47xx/nvram.c
+++ b/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c
@@ -92,3 +92,30 @@ int nvram_getenv(char *name, char *val, @@ -92,3 +92,30 @@ int nvram_getenv(char *name, char *val,
return -9; return NVRAM_ERR_ENVNOTFOUND;
} }
EXPORT_SYMBOL(nvram_getenv); EXPORT_SYMBOL(nvram_getenv);
+ +

View File

@ -16,13 +16,13 @@
/* Scan to find existance of the device */ /* Scan to find existance of the device */
- if (nand_scan(&data->mtd, pdata->chip.nr_chips)) { - if (nand_scan(&data->mtd, pdata->chip.nr_chips)) {
+ if (nand_scan_ident(&data->mtd, pdata->chip.nr_chips)) { + if (nand_scan_ident(&data->mtd, pdata->chip.nr_chips)) {
+ res = -ENXIO; + err = -ENXIO;
+ goto out; + goto out;
+ } + }
+ +
+ if (pdata->chip.chip_fixup) { + if (pdata->chip.chip_fixup) {
+ res = pdata->chip.chip_fixup(&data->mtd); + err = pdata->chip.chip_fixup(&data->mtd);
+ if (res) + if (err)
+ goto out; + goto out;
+ } + }
+ +

View File

@ -127,10 +127,11 @@
e = (struct ipt_entry *)(loc_cpu_entry + off); e = (struct ipt_entry *)(loc_cpu_entry + off);
if (copy_to_user(userptr + off if (copy_to_user(userptr + off
@@ -1001,6 +1041,14 @@ copy_entries_to_user(unsigned int total_ @@ -1000,6 +1040,14 @@ copy_entries_to_user(unsigned int total_
ret = -EFAULT;
goto free_counters; goto free_counters;
} }
+
+ flags = e->ip.flags & ~IPT_F_NO_DEF_MATCH; + flags = e->ip.flags & ~IPT_F_NO_DEF_MATCH;
+ if (copy_to_user(userptr + off + if (copy_to_user(userptr + off
+ + offsetof(struct ipt_entry, ip.flags), + + offsetof(struct ipt_entry, ip.flags),
@ -138,7 +139,6 @@
+ ret = -EFAULT; + ret = -EFAULT;
+ goto free_counters; + goto free_counters;
+ } + }
+
for (i = sizeof(struct ipt_entry); for (i = sizeof(struct ipt_entry);
i < e->target_offset; i < e->target_offset;
i += m->u.match_size) {

View File

@ -11038,14 +11038,14 @@
+ yaffs_UnpackTags2(tags, &pt); + yaffs_UnpackTags2(tags, &pt);
+ } + }
+ } + }
+
- if(tags && retval == -EBADMSG && tags->eccResult == YAFFS_ECC_RESULT_NO_ERROR)
- tags->eccResult = YAFFS_ECC_RESULT_UNFIXED;
+ if (localData) + if (localData)
+ yaffs_ReleaseTempBuffer(dev, data, __LINE__); + yaffs_ReleaseTempBuffer(dev, data, __LINE__);
- if(tags && retval == -EBADMSG && tags->eccResult == YAFFS_ECC_RESULT_NO_ERROR)
+ if (tags && retval == -EBADMSG && tags->eccResult == YAFFS_ECC_RESULT_NO_ERROR) + if (tags && retval == -EBADMSG && tags->eccResult == YAFFS_ECC_RESULT_NO_ERROR)
+ tags->eccResult = YAFFS_ECC_RESULT_UNFIXED; tags->eccResult = YAFFS_ECC_RESULT_UNFIXED;
-
if (retval == 0) if (retval == 0)
return YAFFS_OK; return YAFFS_OK;
else else

View File

@ -527,6 +527,35 @@
/* Helper to extract some _offset, which is one of the SSB_SPROM_XXX defines. */ /* Helper to extract some _offset, which is one of the SSB_SPROM_XXX defines. */
#define SPEX16(_outvar, _offset, _mask, _shift) \ #define SPEX16(_outvar, _offset, _mask, _shift) \
out->_outvar = ((in[SPOFF(_offset)] & (_mask)) >> (_shift)) out->_outvar = ((in[SPOFF(_offset)] & (_mask)) >> (_shift))
@@ -623,6 +623,28 @@ static int ssb_pci_sprom_get(struct ssb_
if (!ssb_is_sprom_available(bus)) {
ssb_printk(KERN_ERR PFX "No SPROM available!\n");
+ return -ENODEV;
+ }
+ if (bus->chipco.dev) { /* can be unavailible! */
+ /*
+ * get SPROM offset: SSB_SPROM_BASE1 except for
+ * chipcommon rev >= 31 or chip ID is 0x4312 and
+ * chipcommon status & 3 == 2
+ */
+ if (bus->chipco.dev->id.revision >= 31)
+ bus->sprom_offset = SSB_SPROM_BASE31;
+ else if (bus->chip_id == 0x4312 &&
+ (bus->chipco.status & 0x03) == 2)
+ bus->sprom_offset = SSB_SPROM_BASE31;
+ else
+ bus->sprom_offset = SSB_SPROM_BASE1;
+ } else {
+ bus->sprom_offset = SSB_SPROM_BASE1;
+ }
+ ssb_dprintk(KERN_INFO PFX "SPROM offset is 0x%x\n", bus->sprom_offset);
+
+ if (!ssb_is_sprom_available(bus)) {
+ ssb_printk(KERN_ERR PFX "No SPROM available!\n");
return -ENODEV;
}
if (bus->chipco.dev) { /* can be unavailible! */
--- a/include/linux/ssb/ssb.h --- a/include/linux/ssb/ssb.h
+++ b/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h
@@ -167,7 +167,7 @@ struct ssb_device { @@ -167,7 +167,7 @@ struct ssb_device {
@ -538,7 +567,17 @@
struct ssb_bus *bus; struct ssb_bus *bus;
struct ssb_device_id id; struct ssb_device_id id;
@@ -470,14 +470,6 @@ extern u32 ssb_dma_translation(struct ss @@ -398,6 +398,9 @@ extern void ssb_bus_unregister(struct ss
/* Does the device have an SPROM? */
extern bool ssb_is_sprom_available(struct ssb_bus *bus);
+/* Does the device have an SPROM? */
+extern bool ssb_is_sprom_available(struct ssb_bus *bus);
+
/* Set a fallback SPROM.
* See kdoc at the function definition for complete documentation. */
extern int ssb_arch_set_fallback_sprom(const struct ssb_sprom *sprom);
@@ -470,14 +473,6 @@ extern u32 ssb_dma_translation(struct ss
#define SSB_DMA_TRANSLATION_MASK 0xC0000000 #define SSB_DMA_TRANSLATION_MASK 0xC0000000
#define SSB_DMA_TRANSLATION_SHIFT 30 #define SSB_DMA_TRANSLATION_SHIFT 30
@ -553,7 +592,7 @@
static inline void __cold __ssb_dma_not_implemented(struct ssb_device *dev) static inline void __cold __ssb_dma_not_implemented(struct ssb_device *dev)
{ {
#ifdef CONFIG_SSB_DEBUG #ifdef CONFIG_SSB_DEBUG
@@ -486,155 +478,6 @@ static inline void __cold __ssb_dma_not_ @@ -486,155 +481,6 @@ static inline void __cold __ssb_dma_not_
#endif /* DEBUG */ #endif /* DEBUG */
} }

View File

@ -10,7 +10,7 @@
bool ssb_is_sprom_available(struct ssb_bus *bus) bool ssb_is_sprom_available(struct ssb_bus *bus)
--- a/include/linux/ssb/ssb.h --- a/include/linux/ssb/ssb.h
+++ b/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h
@@ -401,6 +401,7 @@ extern bool ssb_is_sprom_available(struc @@ -404,6 +404,7 @@ extern bool ssb_is_sprom_available(struc
/* Set a fallback SPROM. /* Set a fallback SPROM.
* See kdoc at the function definition for complete documentation. */ * See kdoc at the function definition for complete documentation. */
extern int ssb_arch_set_fallback_sprom(const struct ssb_sprom *sprom); extern int ssb_arch_set_fallback_sprom(const struct ssb_sprom *sprom);