[Linux-stm32] [PATCH 2/3] iio: stmpe-adc: Make wait_completion non interruptible

Jonathan Cameron jic23 at kernel.org
Sun May 5 15:44:09 UTC 2019


On Fri, 3 May 2019 15:58:38 +0000
Philippe Schenker <philippe.schenker at toradex.com> wrote:

> On Fri, 2019-05-03 at 14:39 +0000, David Laight wrote:
> > From: Philippe Schenker  
> > > Sent: 03 May 2019 14:57
> > > In some cases, the wait_completion got interrupted. This caused the
> > > error-handling to mutex_unlock the function. The before turned on
> > > interrupt then got called anyway. In the ISR then completion()
> > > was called causing problems.
> > > 
> > > Making this wait_completion non interruptible solves the problem.  
> > 
> > Won't the same thing happen if the interrupt occurs just after
> > the timeout?
> > 
> > 	David
> >  
> > 
> > -
> > Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT,
> > UK
> > Registration No: 1397386 (Wales)
> >   
> 
> You're of course right... Thanks for pointing this out. I will send a v2 with a
> better solution then.
> 

Isn't the timeout long enough that it should only happen if the hardware has
a fault? If that's the case, I wouldn't worry too much about possibility of
an interrupt causing confusion as long as it isn't catastrophic.
Always hard to paper over hardware faults...

> Philippe




More information about the Linux-stm32 mailing list