Re: lockdep warning in urb.c:363 usb_submit_urb

From: Rafael J. Wysocki
Date: Sun Mar 29 2020 - 09:56:56 EST


On Sun, Mar 29, 2020 at 11:16 AM Rafael J. Wysocki <rafael@xxxxxxxxxx> wrote:
>

[cut]

> >
> > But if SMART_SUSPEND is set and the device is runtime-suspended, why
> > issue the ->suspend callback?
>
> The driver itself or the middle-layer may want to resume the device.
>
> Arguably, it may do that in ->prepare() too,

Not really.

The problem is that that device_prepare() is executed synchronously
for all devices, so if multiple devices needed to be resumed, the
latency would accumulate if that happened in device_prepare().

Cheers!