mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 00:41:17 +00:00
9e1530b2a3
* Refreshed patches. * Removed patches: - target/linux/ar71xx/patches-4.9/103-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch superseded by upstream - target/linux/ar71xx/patches-4.9/403-mtd_fix_cfi_cmdset_0002_status_check.patch superseded by upstream - target/linux/brcm63xx/patches-4.9/001-4.11-01-mtd-m25p80-consider-max-message-size-in-m25p80_read.patch accepted upstream - target/linux/brcm63xx/patches-4.9/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch accepted upstream - target/linux/brcm63xx/patches-4.9/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch accepted upstream - target/linux/generic/pending-4.9/900-gen_stats-fix-netlink-stats-padding.patch * New backported patch to address ext4 breakage, introduced in 4.9.112: - backport-4.9/500-ext4-fix-check-to-prevent-initializing-reserved-inod.patch Also add ARM64_SSBD symbol to ARM64 targets still running kernel 4.9 Thanks to Koen Vandeputte for pointing out the need to add the ARM64_SSBD symbol, and the ext4 patch. Compile-tested on: ar71xx Run-tested on: ar71xx Signed-off-by: Stijn Segers <foss@volatilesystems.org>
35 lines
1.0 KiB
Diff
35 lines
1.0 KiB
Diff
--- a/drivers/mtd/bcm47xxpart.c
|
|
+++ b/drivers/mtd/bcm47xxpart.c
|
|
@@ -103,6 +103,7 @@ static int bcm47xxpart_parse(struct mtd_
|
|
int trx_num = 0; /* Number of found TRX partitions */
|
|
int possible_nvram_sizes[] = { 0x8000, 0xF000, 0x10000, };
|
|
int err;
|
|
+ bool found_nvram = false;
|
|
|
|
/*
|
|
* Some really old flashes (like AT45DB*) had smaller erasesize-s, but
|
|
@@ -284,12 +285,23 @@ static int bcm47xxpart_parse(struct mtd_
|
|
if (buf[0] == NVRAM_HEADER) {
|
|
bcm47xxpart_add_part(&parts[curr_part++], "nvram",
|
|
master->size - blocksize, 0);
|
|
+ found_nvram = true;
|
|
break;
|
|
}
|
|
}
|
|
|
|
kfree(buf);
|
|
|
|
+ if (!found_nvram) {
|
|
+ pr_err("can not find a nvram partition reserve last block\n");
|
|
+ bcm47xxpart_add_part(&parts[curr_part++], "nvram_guess",
|
|
+ master->size - blocksize * 2, MTD_WRITEABLE);
|
|
+ for (i = 0; i < curr_part; i++) {
|
|
+ if (parts[i].size + parts[i].offset == master->size)
|
|
+ parts[i].offset -= blocksize * 2;
|
|
+ }
|
|
+ }
|
|
+
|
|
/*
|
|
* Assume that partitions end at the beginning of the one they are
|
|
* followed by.
|