Re: [PATCH v4 05/14] usb: defer suspension of superspeed port while peer is powered

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

 



On Fri, 7 Feb 2014, Dan Williams wrote:

> >> You know, I believe these races would go away if we could delay port
> >> pm runtime activation until after the initial discovery of the entire
> >> hub topology.  One potential way of solving this is to proceed with
> >> converting khubd to a workqueue.  Then, we could use a properly placed
> >> drain_workqueue() to flush the chain of khubd discovery events to
> >> completion.
> >
> > Heh.  Strictly speaking, we _never_ discover the entire hub topology.
> > A new hub can be plugged in at any time.
> 
> Sometimes I feel like I'm talking to a mathematician ;-)

Indeed.

> > Of course, we don't care about new hubs being plugged in.  It would be
> > good enough to wait for only the hubs that were connected when the root
> > hubs were registered.  I doubt this would be worth the effort, though.
> 
> Right, once one drain_workqueue() event has completed we assume that
> everything plugged in at hcd registration has had a chance to be
> discovered.  At least this is the same guarantee that libsas makes, it
> has a similar problem determining when it has completed initial domain
> discovery / expander enumeration.  For tier-mismatch we only care
> about internal hubs, barring some internal switching those should
> always be part of the initial scan.

Assuming the manufacturers follow the spec (tier mismatch is limited to
a single integrated hub on each non-SuperSpeed external port), it
should work.

> I don't think it's too much to add.  I'll take a stab at it (after we
> settle on this current set) and if you think it's too onerous feel
> free to nak it.

Fair 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