[i2c] [PATCH] i2c-pxa: fix scheduling while atomic in i2c_pxa_abort()
dbaryshkov at gmail.com
Thu Aug 7 12:12:54 CEST 2008
Ben Dooks wrote:
> On Tue, Aug 05, 2008 at 03:17:11PM +0400, Dmitry Baryshkov wrote:
>> i2c_pxa_abort can be called from the atomic context. Change it to use
>> mdelay and counted loop.
> if this can be called from an atomic context, is there a distinct
> possibility you are going to stop execution of the entire cpu for the
> time it takes to sort this out? Is it possible to disable the interrupt
> request, fire a work-struct to deal with this and then re-enabled the
> controller once it is finished?
If the bus isn't stalled by some hanged device, the reset will happen very
fast, so I don't see a reason to take that route.
However I'd implement the suggestion by Eric to choose mdelay or msleep
based on the atomicity of the context.
>> Signed-off-by: Dmitry Baryshkov
>> <dbaryshkov at gmail.com>
With best wishes
More information about the i2c