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]
Message-ID: <AM4PR04MB2130F9E9E9E304D47C44AC46891D0@AM4PR04MB2130.eurprd04.prod.outlook.com>
Date:	Wed, 10 Aug 2016 09:00:15 +0000
From:	Jun Li <jun.li@....com>
To:	Peter Chen <hzpeterchen@...il.com>,
	Stephen Boyd <stephen.boyd@...aro.org>
CC:	Peter Chen <peter.chen@....com>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"stern@...land.harvard.edu" <stern@...land.harvard.edu>,
	"ulf.hansson@...aro.org" <ulf.hansson@...aro.org>,
	"broonie@...nel.org" <broonie@...nel.org>,
	"sre@...nel.org" <sre@...nel.org>,
	"robh+dt@...nel.org" <robh+dt@...nel.org>,
	"shawnguo@...nel.org" <shawnguo@...nel.org>,
	"dbaryshkov@...il.com" <dbaryshkov@...il.com>,
	"dwmw3@...radead.org" <dwmw3@...radead.org>,
	"k.kozlowski@...sung.com" <k.kozlowski@...sung.com>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"pawel.moll@....com" <pawel.moll@....com>,
	"mark.rutland@....com" <mark.rutland@....com>,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	"arnd@...db.de" <arnd@...db.de>,
	"s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
	"mail@...iej.szmigiero.name" <mail@...iej.szmigiero.name>,
	"troy.kisky@...ndarydevices.com" <troy.kisky@...ndarydevices.com>,
	"festevam@...il.com" <festevam@...il.com>,
	"oscar@...andei.net" <oscar@...andei.net>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	"stillcompiling@...il.com" <stillcompiling@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"mka@...omium.org" <mka@...omium.org>,
	Peter Chen <peter.chen@...escale.com>
Subject: RE: [PATCH v5 5/6] usb: chipidea: let chipidea core device of_node
 equal's glue layer device of_node

Hi, Peter

> -----Original Message-----
> From: linux-usb-owner@...r.kernel.org [mailto:linux-usb-
> owner@...r.kernel.org] On Behalf Of Peter Chen
> Sent: Wednesday, August 10, 2016 11:12 AM
> To: Stephen Boyd <stephen.boyd@...aro.org>
> Cc: Peter Chen <peter.chen@....com>; gregkh@...uxfoundation.org;
> stern@...land.harvard.edu; ulf.hansson@...aro.org; broonie@...nel.org;
> sre@...nel.org; robh+dt@...nel.org; shawnguo@...nel.org;
> dbaryshkov@...il.com; dwmw3@...radead.org; k.kozlowski@...sung.com; linux-
> arm-kernel@...ts.infradead.org; p.zabel@...gutronix.de;
> devicetree@...r.kernel.org; pawel.moll@....com; mark.rutland@....com;
> linux-usb@...r.kernel.org; arnd@...db.de; s.hauer@...gutronix.de;
> mail@...iej.szmigiero.name; troy.kisky@...ndarydevices.com;
> festevam@...il.com; oscar@...andei.net; linux-pm@...r.kernel.org;
> stillcompiling@...il.com; linux-kernel@...r.kernel.org; mka@...omium.org;
> Peter Chen <peter.chen@...escale.com>
> Subject: Re: [PATCH v5 5/6] usb: chipidea: let chipidea core device
> of_node equal's glue layer device of_node
> 
> On Tue, Aug 09, 2016 at 05:15:36PM -0700, Stephen Boyd wrote:
> > Quoting Peter Chen (2016-08-08 01:52:10)
> > > From: Peter Chen <peter.chen@...escale.com>
> > >
> > > At device tree, we have no device node for chipidea core, the glue
> > > layer's node is the parent node for host and udc device. But in
> > > related driver, the parent device is chipidea core. So, in order to
> > > let the common driver get parent's node, we let the core's device
> > > node equals glue layer device node.
> > >
> > > Signed-off-by: Peter Chen <peter.chen@...escale.com>
> > > Tested-by: Maciej S. Szmigiero <mail@...iej.szmigiero.name>
> > > Tested-by Joshua Clayton <stillcompiling@...il.com>
> > > ---
> > >  drivers/usb/chipidea/core.c | 11 +++++++++++
> > >  1 file changed, 11 insertions(+)
> > >
> > > diff --git a/drivers/usb/chipidea/core.c
> > > b/drivers/usb/chipidea/core.c index 69426e6..b189dc7 100644
> > > --- a/drivers/usb/chipidea/core.c
> > > +++ b/drivers/usb/chipidea/core.c
> > > @@ -954,6 +954,15 @@ static int ci_hdrc_probe(struct platform_device
> *pdev)
> > >                 dev_err(dev, "unable to init phy: %d\n", ret);
> > >                 return ret;
> > >         }
> > > +       /*
> > > +        * At device tree, we have no device node for chipidea core,
> > > +        * the glue layer's node is the parent node for host and udc
> > > +        * device. But in related driver, the parent device is
> chipidea
> > > +        * core. So, in order to let the common driver get parent's
> node,
> > > +        * we let the core's device node equals glue layer's node.
> > > +        */
> > > +       if (dev->parent && dev->parent->of_node)
> > > +               dev->of_node = dev->parent->of_node;
> >
> > Can this be done earlier? Perhaps after hw_device_init() in this probe
> > routine? That would allow me to remove the awkward parent searching in
> > my ULPI DT awareness patch.
> 
> The reason why I locate it there is to avoid "goto label" for error path
> during PHY's get and initialization operation.
> 
> Ok, to simplify your work, I will change it at next version.

As iommu need this to be done even more earlier, will you consider to
put it before adding the core's platform device?

Li Jun 
> 
> --
> 
> Best Regards,
> Peter Chen
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@...r.kernel.org More majordomo info at
> http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ