summaryrefslogtreecommitdiff
path: root/target/linux/mediatek/patches/1016-nand-controller-busy.patch
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2018-09-15 00:01:17 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2018-09-15 00:01:17 +0200
commitde1230ab3be91cea8e4a51211b0d1ce24cc85d81 (patch)
tree55bef6971635f54b8e73663c438a45859653589d /target/linux/mediatek/patches/1016-nand-controller-busy.patch
parentefb1b35fe9e904d64ba5d5b1886199a2c968ae37 (diff)
downloadmtk-20170518-de1230ab3be91cea8e4a51211b0d1ce24cc85d81.zip
mtk-20170518-de1230ab3be91cea8e4a51211b0d1ce24cc85d81.tar.gz
mtk-20170518-de1230ab3be91cea8e4a51211b0d1ce24cc85d81.tar.bz2
target/linux/mediatek: add all other patches
Diffstat (limited to 'target/linux/mediatek/patches/1016-nand-controller-busy.patch')
-rw-r--r--target/linux/mediatek/patches/1016-nand-controller-busy.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/target/linux/mediatek/patches/1016-nand-controller-busy.patch b/target/linux/mediatek/patches/1016-nand-controller-busy.patch
new file mode 100644
index 0000000..9ffca2e
--- /dev/null
+++ b/target/linux/mediatek/patches/1016-nand-controller-busy.patch
@@ -0,0 +1,38 @@
+Index: linux-3.10.20/drivers/mtd/ralink/ralink_nand.c
+===================================================================
+--- linux-3.10.20.orig/drivers/mtd/ralink/ralink_nand.c
++++ linux-3.10.20/drivers/mtd/ralink/ralink_nand.c
+@@ -377,7 +377,10 @@ static int nfc_check_wp(void)
+ int ret;
+
+ ret = _nfc_read_status(&result);
+- //FIXME, if ret < 0
++ if (ret) {
++ printk(KERN_WARNING "unable to tell WP. default FALSE.\n");
++ return 0;
++ }
+
+ return !(result & NAND_STATUS_WP);
+ #endif
+@@ -1332,10 +1335,9 @@ nand_get_device(struct ra_nand_chip *ra,
+ int ret = 0;
+
+ #if !defined (__UBOOT__)
+- ret = mutex_lock_interruptible(ra->controller);
++ mutex_lock(ra->controller);
+ #endif ///
+- if (!ret)
+- ra->state = new_state;
++ ra->state = new_state;
+
+ return ret;
+
+@@ -2881,7 +2883,7 @@ static int ramtd_nand_writeoob(struct mt
+
+ ra_dbg("%s: \n", __func__);
+
+- nand_get_device(ra, FL_READING);
++ nand_get_device(ra, FL_WRITING);
+
+ ret = nand_do_write_ops(ra, to, ops);
+