Re: [RFC 3/8] xHCI: Clear all USB 2.0 change bits on port disable.

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

 



On Tue, Nov 27, 2012 at 04:36:41PM -0500, Alan Stern wrote:
> On Tue, 27 Nov 2012, Sarah Sharp wrote:
> 
> > Do I need to stop the polling when the host controller is suspended and
> > restart it when it's resumed?  It seems like OHCI does that, but I can't
> > tell if it's host-specific.  Or will the USB core just take care of
> > stopping and restarting the hub timer?
> 
> It is driver-specific.  (For example, under certain rare conditions 
> uhci-hcd needs to poll for wakeup events while the controller is 
> suspended.)  The USB core does not automatically stop polling when the 
> root hub is suspended; you have to stop it yourself.  There's a race 
> here; if you really want to make sure no polls occur while the hardware 
> is stopped then you have to call del_timer_sync(&hcd->rh_timer).

In thinking about this more, if the USB core polls the roothub when it's
suspended, there's a chance the host controller will be in D3cold.  That
means all the port registers will read as all f's.  So I don't think we
can allow port polling when the host is suspended.

Or does the USB core resume the roothub before polling the ports?  It
doesn't look like it from the code in rh_timer_func or
usb_hcd_poll_rh_status.

An alternative would be to refuse to suspend the host controller if any
of the port status change bits are set.

Sarah Sharp
--
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