lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 10 Oct 2011 20:15:29 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Felipe Balbi <balbi@...com>
cc:	"Munegowda, Keshava" <keshava_mgowda@...com>,
	Paul Walmsley <paul@...an.com>, <linux-usb@...r.kernel.org>,
	<linux-omap@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<khilman@...com>, <b-cousson@...com>, <gadiyar@...com>,
	<sameo@...ux.intel.com>, <parthab@...ia.ti.com>,
	<tony@...mide.com>, <johnstul@...ibm.com>, <vishwanath.bs@...com>,
	Greg KH <greg@...ah.com>
Subject: Re: [PATCH 1/5 v13] arm: omap: usb: ehci and ohci hwmod structures
 for omap4

On Mon, 10 Oct 2011, Felipe Balbi wrote:

> > > > In fact we do already have sibling lists.  They are maintained as part 
> > > > of the device_private structure.  What we are missing is a 
> > > > device_for_each_sibling() routine.  It could be added pretty easily; it 
> > > > would be similar to device_for_each_child().
> > > 
> > > care to point out where is ?
> > > 
> > > 68 struct device_private {
> > > 69         struct klist klist_children;
> > > 70         struct klist_node knode_parent;
> > -------------^  Here.  The "parent" in the name refers to where the
> >                 head of the list is stored.
> > 
> > > 71         struct klist_node knode_driver;
> > > 72         struct klist_node knode_bus;
> > > 73         void *driver_data;
> > > 74         struct device *device;
> > > 75 };
> > 
> > From device_add():
> > 
> > 	if (parent)
> > 		klist_add_tail(&dev->p->knode_parent,
> > 			       &parent->p->klist_children);
> 
> that's a parent -> child relationship. What we have on this case is:
> 
>  --------------                ---------------
> |              |              |               |          |\
> |   UHH        |  clocks, etc |    USBTLL     |          | |
> |              | <==========> |               | <======> | | <====> ports
> |     -------  |              | (Transceiver- |          | |
> |    |  EHCI | |              | less Link)    |          |/
> |     -------  |              |               |         Port MUX
> |              |              |               |
> |     -------  |              |               |
> |    |  OHCI | |              |               |
> |     -------  |              |               |
> |              |              |               |
>  --------------                ---------------
> 
> It doesn't shown here, but the TLL link is completely optional. It's
> mainly used for modem integration, IIRC. Still, if we're using TLL, EHCI
> and OHCI will depend on a clock provided by the USBTLL block.
> 
> Clearly, USBTLL isn't either a parent of UHH, nor a parent of EHCI/OHCI
> blocks. We can, from a code perspective, make USBTLL into a parent of
> UHH to make things simpler, but this will mean that calling
> pm_runtime_get() will also unconditionaly turn on TLL clock, unless we
> add some nasty hacks to allow TLL know if *HCI port is in TLL mode.
> 
> That's why I decided for making TLL and UHH siblings, because that's a
> closer relationship than parent-child.
> 
> Can you see the problem now ?

Okay, now I understand better.  The word "sibling" implies that the two 
objects have the same parent, so a different word would describe this 
relationship better.  Something like "friend" or "associate".

Or maybe, following Paul's suggestion, the driver core doesn't have to 
be changed at all.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ