Re: [PATCH v9 17/19] usb: resume (wakeup) child device when port is powered on

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

 



On Thu, 8 May 2014, Dan Williams wrote:

> > I don't understand this last part.  Why do we need to guarantee the
> > child device has recovered from power loss?  Why not proceed the same
> > way we do now when the child is suspended?
> 
> Two reasons I believe:
> 
> 1/ The child may be gone, and usb_port_resume() will mark it for disconnect
> 
> 2/ Currently port_event() knows how to handle suspended devices
> (USB_PORT_STAT_C_SUSPEND), but in the case of power loss recovery the
> status and change bits are different.  I figure why special case
> port_event()?  Just make it so it handles all the same cases that are
> presented when the port does not lose power.

How much special casing would really be needed?

> > If you take that stuff out, it seems that there won't be any need to
> > use wakeup_bits or usb_kick_khubd() for this purpose.
> 
> See 1/ I think we want to handle disconnects right away, hence the khubd kick.

If the child has been disconnected, pm_request_resume()'s callback
will determine that fact quickly enough.

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