Re: [RFC PATCH 2/2] USB: Set usb port's DevicerRemovable according acpi information in EHCI

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

 



On Mon, 27 Aug 2012, Lan Tianyu wrote:

> > Now I see the problem.  The code you're adding to ehci-hub.c relies on
> > the hub driver knowing about the root hub's ports beforehand.  So
> > you've got a circular dependency:
> > 
> > 	ehci-hub.c depends on the hub driver knowing about the
> > 	root hub's ports;
> > 
> > 	The hub driver learns the root-hub port connectivity
> > 	information by asking ehci-hub.c.
> > 
> > The way to break this circle is to make ehci-hub.c use the ACPI 
> > information directly rather than going through the hub driver's data 
> > structures.
> But it's necessary to bind usb port with ACPI before using ACPI
> information. Otherwise there is no bright between usb port and it's ACPI
> information. Binding will be done during port's devices creating.

Why can't the binding be done earlier, such as when the root hub is
first created?  Yes, I realize the port devices won't exist at that
time.  So what?  The connection between the root hub and the ACPI
information should exist regardless of the port devices or the hub 
driver.

For example, it is possible for userspace to unbind the hub driver from
the root hub (which will destroy all the port devices) and then send a
Get-Hub-Descriptor request.  When this happens, the HCD should still
return correct information in its hub descriptor.

> Creating port's devices need port number of the root hub. So this must
> happen after first time of calling get_hub_descriptor.

That doesn't matter.  The link between ACPI and the root hub should 
exist whether or not the port devices exist.

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