]> git.karo-electronics.de Git - linux-beck.git/commit
greybus: fw-download: Replace timer with delayed-work
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 9 May 2016 05:29:01 +0000 (10:59 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 9 May 2016 06:48:10 +0000 (08:48 +0200)
commitc6cc8e73eb188156494e061bdb93966b0c7d9443
tree84e4e3ae611c37f7425dd57d17d3f81c4dac163c
parenta956d939af9e73d3375f52d5c5c63ab824e59c8b
greybus: fw-download: Replace timer with delayed-work

The timeout-handlers need to call routines that can sleep and those
can't be called from interrupt context. The timer-handler is called in
interrupt context and so will hit a BUG() in vmalloc.c.

This patch moves away from timers to delayed-work, whose timeout handler
gets called in process context and can call the sleep-able routines
safely.

Note that this issue wasn't hit earlier when the initial patch for
timeouts was implemented due to some issues in the build arche_420. But
with the new build arche_440, the BUG started crashing the phone on
timeouts and so this fix is required.

Tested on EVT 1.5 by triggering fake timeouts, by not sending
release-firmware request for example. This is tested with build
arche_440.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/fw-download.c