Re: USB Hardware Power Control, IOCTL_USB_HUB_CYCLE_PORT Equivalent

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

 



On Mon, Sep 14, 2020 at 09:14:44PM -0500, Sid Spry wrote:
> Hi, after a fair bit of looking I do not see a way to do a hard reset of
> a device. Windows seems to expose some functionality that hints these things
> are possible. Does anyone know if it is and is implemented in the Linux
> drivers?

As Greg mentioned, on many systems it is not possible.  On systems where 
it is possible, it can be performed by running a utility program.

> I only find reference to automatic power management in /sys.
> 
> The ioctl in the title (IOCTL_USB_HUB_CYCLE_PORT) is joined by others that seem
> to actually control the power to the port.

I don't understand this sentence.  What do you mean when you say that 
IOCTL_USB_HUB_CYCLE_PORT is joined by others?

And I don't see how there can be any ioctls that control power to a USB 
port when the hardware itself doesn't permit power to be turned off.

> I recently saw patches that would control hub power state via additional
> hardware.

URLs for these patches?

>  It would be good to have a uniform way for userspace to take
> advantage of this power control. Userspace may have further hints that can be
> applied to power consumption, and may need to decide to undertake device
> recovery.
> 
> What originally made me investigate this issue was a series of MCU development
> boards that crash needing power removed to recover. This seems to be impossible
> to do on most hardware. Why?

Indeed, it is impossible on a lot of hardware.  But how come you are 
asking us why?  You should be asking the hardware designers.

>  There's no good reason to remove a complete power
> down from the spec. There are also instances where a hard reset for PCIe, e.g.
> cards malfunctioning when used with VFIO-VGA would have saved hardware from
> being hopelessly broken. So if you are involved in hardware design please
> consider these things.

We are involved in software design, not hardware design.

Alan Stern



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

  Powered by Linux