aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2015-12-16 09:37:16 +0000
committerRafał Miłecki <zajec5@gmail.com>2015-12-16 09:37:16 +0000
commit797c50546adc1171d1bfd2ed99c047981286aff2 (patch)
tree66191379a6757b6bc45d636069f3ef5bf94293ea /target
parent60312cff17f66cb5080ed3e3944e8afb041cb1d9 (diff)
downloadmaster-187ad058-797c50546adc1171d1bfd2ed99c047981286aff2.tar.gz
master-187ad058-797c50546adc1171d1bfd2ed99c047981286aff2.tar.bz2
master-187ad058-797c50546adc1171d1bfd2ed99c047981286aff2.zip
bcm53xx: print bcm47xxpart buf to debug R8000 UBI problem
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47896 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r--target/linux/bcm53xx/patches-4.1/902-mtd-bcm47xxpart-print-buffer-used-for-determining-pa.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/target/linux/bcm53xx/patches-4.1/902-mtd-bcm47xxpart-print-buffer-used-for-determining-pa.patch b/target/linux/bcm53xx/patches-4.1/902-mtd-bcm47xxpart-print-buffer-used-for-determining-pa.patch
new file mode 100644
index 0000000000..2731c6dde5
--- /dev/null
+++ b/target/linux/bcm53xx/patches-4.1/902-mtd-bcm47xxpart-print-buffer-used-for-determining-pa.patch
@@ -0,0 +1,40 @@
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
+Date: Wed, 16 Dec 2015 10:16:14 +0100
+Subject: [PATCH] mtd: bcm47xxpart: print buffer used for determining part name
+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 | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+--- a/drivers/mtd/bcm47xxpart.c
++++ b/drivers/mtd/bcm47xxpart.c
+@@ -67,19 +67,22 @@ static void bcm47xxpart_add_part(struct
+ static const char *bcm47xxpart_trx_data_part_name(struct mtd_info *master,
+ size_t offset)
+ {
+- uint32_t buf;
++ uint32_t buf[8];
+ size_t bytes_read;
+ int err;
+
+ err = mtd_read(master, offset, sizeof(buf), &bytes_read,
+- (uint8_t *)&buf);
++ (uint8_t *)buf);
+ if (err && !mtd_is_bitflip(err)) {
+ pr_err("mtd_read error while parsing (offset: 0x%X): %d\n",
+ offset, err);
+ goto out_default;
+ }
+
+- if (buf == UBI_EC_MAGIC)
++ pr_info("%012zx: %08x %08x %08x %08x\n", offset + 0x00, buf[0], buf[1], buf[2], buf[3]);
++ pr_info("%012zx: %08x %08x %08x %08x\n", offset + 0x10, buf[4], buf[5], buf[6], buf[7]);
++
++ if (buf[0] == UBI_EC_MAGIC)
+ return "ubi";
+
+ out_default: