On Sun, Aug 18, 2013 at 10:44 PM, Alan Stern <st...@rowland.harvard.edu> wrote:
> On Sun, 18 Aug 2013, Ming Lei wrote:
>
>> > As far as I can see, these don't need to disable interrupts.  All they
>> > protect against is the code in usb_sg_wait() and usb_sg_cancel(), which
>> > both run in process context.
>>
>> Yes.
>>
>> > But will lockdep complain if they don't disable interrupts?
>>
>> Looks lockdep won't complain because the lock can't be held in
>> another hardirq context.
>
> Don't be so sure.  Suppose you have two mass-storage devices, one
> connected by EHCI and one connected by UHCI.  The one using UHCI _will_
> invoke the completion handler in hardirq context, because uhci-hcd
> doesn't support tasklets.
>
> Have you tested this?

It can't be triggered since we don't enable local interrupts yet before calling
completion handler.

Also uhci-hcd/ohci-hcd should support tasklet later, even for xhci-hcd,
there is only little performance loss with tasklet.

>
>> As I mentioned in 00/50, the patchset is basically a mechanical
>> change, so one patch can be dropped if anyone reviews and
>> concludes it isn't needed.
>
> I'm afraid that it might be needed to keep lockdep happy, not to
> prevent real problems.

Right, so the patch should be kept.

Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to