kernel/3.18: update to version 3.18.25
[openwrt/openwrt.git] / target / linux / generic / patches-4.1 / 143-mtd-bcm47xxpart-limit-scanned-flash-area-on-BCM47XX-.patch
1 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
2 Date: Sat, 5 Dec 2015 02:03:32 +0100
3 Subject: [PATCH] mtd: bcm47xxpart: limit scanned flash area on BCM47XX (MIPS)
4 only
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 We allowed using bcm47xxpart on BCM5301X arch with commit:
10 9e3afa5f5c7 ("mtd: bcm47xxpart: allow enabling on ARCH_BCM_5301X")
11
12 BCM5301X devices may contain some partitions in higher memory, e.g.
13 Netgear R8000 has board_data at 0x2600000. To detect them we should
14 use size limit on MIPS only.
15
16 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
17 ---
18 drivers/mtd/bcm47xxpart.c | 4 ++--
19 1 file changed, 2 insertions(+), 2 deletions(-)
20
21 --- a/drivers/mtd/bcm47xxpart.c
22 +++ b/drivers/mtd/bcm47xxpart.c
23 @@ -118,8 +118,8 @@ static int bcm47xxpart_parse(struct mtd_
24 /* Parse block by block looking for magics */
25 for (offset = 0; offset <= master->size - blocksize;
26 offset += blocksize) {
27 - /* Nothing more in higher memory */
28 - if (offset >= 0x2000000)
29 + /* Nothing more in higher memory on BCM47XX (MIPS) */
30 + if (config_enabled(CONFIG_BCM47XX) && offset >= 0x2000000)
31 break;
32
33 if (curr_part >= BCM47XXPART_MAX_PARTS) {