[linux-pm] Behavior of PCMCIA based HCD in the event of SUSPEND

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

 



On Mon, 17 Apr 2006 kaustav.majumdar@xxxxxxxxx wrote:

> Hi all,
> 
> I have the following queries regarding the power management on a PCMCIA
> based USB host controller driver.
> 
> 1. The SUSPEND event in the PCMCIA client driver is handled in the
> following way:
> 
> In the PCMCIA layer, on a SUSPEND event, the socket layer powers off the
> card. As the USB framework behavior is not allowed to suspend if lower
> nodes are not already suspended, we assume that the correct behavior for
> the above case should be to shut down the Host Controller.
> I want to confirm whether the assumed behavior is ok or should the
> behavior be something else?

The HCD's behavior should be to suspend the host controller, with the 
understanding that factors beyond the HCD's control (such as the 
behavior of the PCMCIA client driver) may cause the host controller to be 
shut down entirely.  The HCD should not shut down the host controller 
during a suspend event.

> 2. And if the correct behavior is what we had assumed, then to implement
> that we call usb_remove_hcd from the PCMCIA client driver. Is this the
> correct way to do so? 

No.  The PCMCIA client driver should not make any assumptions about its 
clients.  All it should do is check that all the clients have been 
suspended already before allowing itself to be suspended.

> The reason for the question is it can happen that after suspending the
> card, before resume card may be manually removed. In that case, there is
> a possibility of usb_remove_hcd being called twice consecutively which
> can cause error.
> Please suggest if any better way of implementing the above.

The PCMCIA client driver should not call usb_remove_hcd at all.  Only a
USB host controller driver is allowed to call that routine.

Alan Stern


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux