diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2019-03-25 15:29:06 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2019-05-03 22:41:38 +0200 |
commit | 1325e74e0c2f9ebdafe05b1492cec77a60059920 (patch) | |
tree | af21c4890a4ae5c08dc08ee7cabdc14a651f33ad /target/linux/generic/pending-3.18/431-mtd-bcm47xxpart-check-for-bad-blocks-when-calculatin.patch | |
parent | 675832de79ec14ddc1183a66d1084aff7a856289 (diff) | |
download | upstream-1325e74e0c2f9ebdafe05b1492cec77a60059920.tar.gz upstream-1325e74e0c2f9ebdafe05b1492cec77a60059920.tar.bz2 upstream-1325e74e0c2f9ebdafe05b1492cec77a60059920.zip |
kernel: Remove support for kernel 3.18
No target is using kernel 3.18 anymore, remove all the generic
support for kernel 3.18.
The removed packages are depending on kernel 3.18 only and are not used on
any recent kernel.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'target/linux/generic/pending-3.18/431-mtd-bcm47xxpart-check-for-bad-blocks-when-calculatin.patch')
-rw-r--r-- | target/linux/generic/pending-3.18/431-mtd-bcm47xxpart-check-for-bad-blocks-when-calculatin.patch | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/target/linux/generic/pending-3.18/431-mtd-bcm47xxpart-check-for-bad-blocks-when-calculatin.patch b/target/linux/generic/pending-3.18/431-mtd-bcm47xxpart-check-for-bad-blocks-when-calculatin.patch deleted file mode 100644 index 5ad82f1f51..0000000000 --- a/target/linux/generic/pending-3.18/431-mtd-bcm47xxpart-check-for-bad-blocks-when-calculatin.patch +++ /dev/null @@ -1,100 +0,0 @@ -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com> -Date: Sat, 2 Jan 2016 01:04:52 +0100 -Subject: [PATCH] mtd: bcm47xxpart: check for bad blocks when calculating - offsets -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Rafał Miłecki <zajec5@gmail.com> ---- - drivers/mtd/bcm47xxpart.c | 50 +++++++++++++++++++++++++++++++++++++---------- - 1 file changed, 40 insertions(+), 10 deletions(-) - ---- a/drivers/mtd/bcm47xxpart.c -+++ b/drivers/mtd/bcm47xxpart.c -@@ -61,6 +61,34 @@ static void bcm47xxpart_add_part(struct - part->mask_flags = mask_flags; - } - -+/* -+ * Calculate real end offset (address) for a given amount of data. It checks -+ * all blocks skipping bad ones. -+ */ -+static size_t bcm47xxpart_real_offset(struct mtd_info *master, size_t offset, -+ size_t bytes) -+{ -+ size_t real_offset = offset; -+ -+ if (mtd_block_isbad(master, real_offset)) -+ pr_warn("Base offset shouldn't be at bad block"); -+ -+ while (bytes >= master->erasesize) { -+ bytes -= master->erasesize; -+ real_offset += master->erasesize; -+ while (mtd_block_isbad(master, real_offset)) { -+ real_offset += master->erasesize; -+ -+ if (real_offset >= master->size) -+ return real_offset - master->erasesize; -+ } -+ } -+ -+ real_offset += bytes; -+ -+ return real_offset; -+} -+ - static const char *bcm47xxpart_trx_data_part_name(struct mtd_info *master, - size_t offset) - { -@@ -182,6 +210,8 @@ static int bcm47xxpart_parse(struct mtd_ - - /* TRX */ - if (buf[0x000 / 4] == TRX_MAGIC) { -+ uint32_t tmp; -+ - if (BCM47XXPART_MAX_PARTS - curr_part < 4) { - pr_warn("Not enough partitions left to register trx, scanning stopped!\n"); - break; -@@ -196,18 +226,18 @@ static int bcm47xxpart_parse(struct mtd_ - i = 0; - /* We have LZMA loader if offset[2] points to sth */ - if (trx->offset[2]) { -+ tmp = bcm47xxpart_real_offset(master, offset, -+ trx->offset[i]); - bcm47xxpart_add_part(&parts[curr_part++], -- "loader", -- offset + trx->offset[i], -- 0); -+ "loader", tmp, 0); - i++; - } - - if (trx->offset[i]) { -+ tmp = bcm47xxpart_real_offset(master, offset, -+ trx->offset[i]); - bcm47xxpart_add_part(&parts[curr_part++], -- "linux", -- offset + trx->offset[i], -- 0); -+ "linux", tmp, 0); - i++; - } - -@@ -219,11 +249,11 @@ static int bcm47xxpart_parse(struct mtd_ - if (trx->offset[i]) { - const char *name; - -- name = bcm47xxpart_trx_data_part_name(master, offset + trx->offset[i]); -+ tmp = bcm47xxpart_real_offset(master, offset, -+ trx->offset[i]); -+ name = bcm47xxpart_trx_data_part_name(master, tmp); - bcm47xxpart_add_part(&parts[curr_part++], -- name, -- offset + trx->offset[i], -- 0); -+ name, tmp, 0); - i++; - } - |