On Mon, Apr 16, 2001, johan verrept <[EMAIL PROTECTED]> wrote:
>       When a hub interrupt urb completes hub_irq() checks whether the
> waitqueue is active (if the hub thread is sleeping). If it isn't sleeping,
> the hub never gets scheduled for event processing.
>       It causes a problem with the uml hcd. When a hub is detected,
> during it's configuration, just after the interrupt urb has been
> submitted, the hcd code completes the interrupt urb to indicate that
> there are more devices attached. Because the hub thread is still
> configuring the device, it is not sleeping and the event is missed. 
>       I see no reason why this cannot happen with a real hcd, for
> example when plugging in a device in a hub while the system is polling
> another hub.
> 
> The only reason I see for this is that the list spinlock is held during
> the entire usb_hub_events() call and that would cause hub_irq() to block.
> The locking on the eventlist could be made finer (releasing the spinlock
> as soon as the event has been dequeued) and done irqsave. The check to
> see if the waitqueue is active in hub_irq() can be removed.
> Is this correct and/or desirable?

You are right, this is a bug. I think the correct fix is to move the
waitqueue_active check to after we add the hub to the event list. The
hub must be added to the event list regardless so it can be processed.

I'll submit a patch along those lines.

JE


_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to