spi: bcm2835: fallback to interrupt for polling timeouts exceeding 2 jiffies
authorMartin Sperl <kernel@martin.sperl.org>
Wed, 22 Apr 2015 07:33:03 +0000 (07:33 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 27 Apr 2015 14:45:50 +0000 (15:45 +0100)
commita750b124cfd27bae1a12df22318db5a2083dfb12
tree79be85d4598b85cc2f9ba5700dac7bd04d4083b7
parent76ee0235be5a24b34a63961189c8bafa9bcf2da3
spi: bcm2835: fallback to interrupt for polling timeouts exceeding 2 jiffies

The polling mode of the driver is designed for transfers that run
less than 30us - it will only execute under those circumstances.
So it should run comfortably without getting interrupted by the
scheduler.

But there are situations where the raspberry pi is so overloaded
that it can take up to 80 jiffies until the polling thread gets
rescheduled - this has been observed especially under heavy
IO situations.

In such a situation we now fall back to the interrupt handler and
log the situation at debug level.

Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-bcm2835.c