From 8f1aa901ec3701776f975d036e4f9826fc61ca50 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Feb 16 2017 10:00:34 +0000 Subject: Add patch to work around crash on RPi3 --- 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 0000000..4d4f0cb --- /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 +Date: Wed, 15 Feb 2017 11:57:57 -0800 +Subject: [PATCH] i2c-bcm2835: Debug test for curr_msg + +Signed-off-by: Eric Anholt +--- + 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 e89eaef..1739354 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 - Enable PWRSEQ_SIMPLE module (fixes rhbz 1377816) +- Add patch to work around crash on RPi3 * Tue Feb 14 2017 Justin M. Forbes - 4.10.0-0.rc8.git0.2 - Reenable debugging options.