Re: usb_acpi_set_power_state() and usb_queue_reset_device()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 5 Sep 2014, Oliver Neukum wrote:

> Hi,
> 
> looking at your patch for resetting HID devices
> it occurred to me that there's a race between
> a queued reset and a port power switch. Switching
> a port's power state implies to a reset for for
> all interfaces of the device connected to that port.
> 
> As a reset is quite disruptive it seems to me that
> no calling off a queued reset is a bug.
> What do you think?

There shouldn't be a race.  We never power-off a port unless the
attached device is already runtime suspended.  A runtime-suspended
device shouldn't have any pending resets.

And even if there is a pending reset, all that will happen is the reset 
will cause the port to power up again, and then the reset will occur.

If you think it would help, the runtime suspend code could be changed
to prevent suspends if any queued resets are pending.

Alan Stern

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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux