On Sun, 7 Nov 2004 20:41:31 +0100
Oliver Neukum <[EMAIL PROTECTED]> wrote:

> Am Sonntag, 7. November 2004 20:47 schrieb Luca Risolia:
> > On Sun, 7 Nov 2004 19:24:04 +0100
> > Oliver Neukum <[EMAIL PROTECTED]> wrote:
> > 
> > > Am Sonntag, 7. November 2004 20:19 schrieb Luca Risolia:
> > > > On Sun, 7 Nov 2004 13:45:49 +0100
> > > > Oliver Neukum <[EMAIL PROTECTED]> wrote:
> > > > 
> > > > > Am Sonntag, 7. November 2004 14:25 schrieb Luca Risolia:
> > > > > > +int sn9c102_stream_interrupt(struct sn9c102_device* cam)
> > > > > > +{
> > > > > > +       int err = 0;
> > > > > > +
> > > > > > +       cam->stream = STREAM_INTERRUPT;
> > > > > > +       err = wait_event_interruptible(cam->wait_stream, 
> > > > > > +                                      (cam->stream == STREAM_OFF) 
> > > > > > ||
> > > > > > +                                      (cam->state & 
> > > > > > DEV_DISCONNECTED));
> > > > > > +       if (err) {
> > > > > > +               cam->state |= DEV_MISCONFIGURED;
> > > > > 
> > > > > This looks odd. Why would it be misconfigured?
> > > > > Couldn't something harmless happen, like a timer going off or a
> > > > > window resize?
> > > > 
> > > > I don't understand your question.
> > 
> >  
> > > > It is likely that the device is in a stall or unknown condition if
> > > > the completion handler can not wake_up() before the process sleeping
> > > > on the event is killed (for example).
> >                            ^^^^^^^^^^^^^
> >  
> > > wait_event_interruptible is interrupted for _any_ signal, even those
> > > that occur regularly under some conditions.
> > 
> > > You cannot take that to indicate an error.
> > 
> > It depends on the context where the above function is used, which is not
> > evident from the patch.
> 
> Is it used within a kernel thread?
> If not, any signal can arrive at any time through the kill syscall.

I meant to say "cirmustances" by "context": in these cases, if a signal has
arrived, the proper behaviour of the low-level driver is to let the upper layer
of the kernel (videodev) handle the event. For this reason, the driver returns
"err" (-ERESTARTSYS) to the caller. 

Regards,
        Luca Risolia


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id065&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to