summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Robinson <pbrobinson@gmail.com>2017-02-16 10:00:34 +0000
committerPeter Robinson <pbrobinson@gmail.com>2017-02-16 10:00:34 +0000
commit8f1aa901ec3701776f975d036e4f9826fc61ca50 (patch)
tree1a79bd4052f88dcd5e6c8f9ec296569d2a22f9b4
parentf43646ce1aae0ecb06518dcdcb267398c9303427 (diff)
downloadkernel-8f1aa901ec3701776f975d036e4f9826fc61ca50.tar.gz
kernel-8f1aa901ec3701776f975d036e4f9826fc61ca50.tar.xz
kernel-8f1aa901ec3701776f975d036e4f9826fc61ca50.zip
Add patch to work around crash on RPi3
-rw-r--r--0001-i2c-bcm2835-Debug-test-for-curr_msg.patch29
-rw-r--r--kernel.spec5
2 files changed, 34 insertions, 0 deletions
diff --git a/0001-i2c-bcm2835-Debug-test-for-curr_msg.patch b/0001-i2c-bcm2835-Debug-test-for-curr_msg.patch
new file mode 100644
index 000000000..4d4f0cb0f
--- /dev/null
+++ b/0001-i2c-bcm2835-Debug-test-for-curr_msg.patch
@@ -0,0 +1,29 @@
+From 81c53729ee7c7f721c357ed3b531ebc97ca44051 Mon Sep 17 00:00:00 2001
+From: Eric Anholt <eric@anholt.net>
+Date: Wed, 15 Feb 2017 11:57:57 -0800
+Subject: [PATCH] i2c-bcm2835: Debug test for curr_msg
+
+Signed-off-by: Eric Anholt <eric@anholt.net>
+---
+ drivers/i2c/busses/i2c-bcm2835.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c
+index c3436f627028..a75fab4dd660 100644
+--- a/drivers/i2c/busses/i2c-bcm2835.c
++++ b/drivers/i2c/busses/i2c-bcm2835.c
+@@ -195,7 +195,10 @@ static irqreturn_t bcm2835_i2c_isr(int this_irq, void *data)
+ }
+
+ if (val & BCM2835_I2C_S_DONE) {
+- if (i2c_dev->curr_msg->flags & I2C_M_RD) {
++ if (!i2c_dev->curr_msg) {
++ dev_info(i2c_dev->dev,
++ "Processing DONE interrupt with no msg\n");
++ } else if (i2c_dev->curr_msg->flags & I2C_M_RD) {
+ bcm2835_drain_rxfifo(i2c_dev);
+ val = bcm2835_i2c_readl(i2c_dev, BCM2835_I2C_S);
+ }
+--
+2.11.0
+
diff --git a/kernel.spec b/kernel.spec
index e89eaef53..17393540f 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -530,6 +530,10 @@ Patch432: bcm283x-VEC.patch
# http://www.spinics.net/lists/dri-devel/msg132235.html
Patch433: drm-vc4-Fix-OOPSes-from-trying-to-cache-a-partially-constructed-BO..patch
+# Fix RPi3 from crashing. Nowhere near a final fix but provides breathing room while that is sorted
+# https://github.com/anholt/linux/issues/89
+Patch434: 0001-i2c-bcm2835-Debug-test-for-curr_msg.patch
+
# http://www.spinics.net/lists/arm-kernel/msg552554.html
Patch438: arm-imx6-hummingboard2.patch
@@ -2174,6 +2178,7 @@ fi
%changelog
* Wed Feb 15 2017 Peter Robinson <pbrobinson@fedoraproject.org>
- Enable PWRSEQ_SIMPLE module (fixes rhbz 1377816)
+- Add patch to work around crash on RPi3
* Tue Feb 14 2017 Justin M. Forbes <jforbes@fedoraproject.org> - 4.10.0-0.rc8.git0.2
- Reenable debugging options.