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: <146477144362.1485.3331887341591876278@sboyd-linaro>
Date:	Wed, 01 Jun 2016 01:57:23 -0700
From:	Stephen Boyd <stephen.boyd@...aro.org>
To:	Krzysztof Kozlowski <k.kozlowski@...sung.com>
Cc:	"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
	"Bartlomiej Zolnierkiewicz" <b.zolnierkie@...sung.com>,
	hzpeterchen@...il.com, "Ulf Hansson" <ulf.hansson@...aro.org>,
	"Sebastian Reichel" <sre@...nel.org>,
	"Dmitry Eremin-Solenikov" <dbaryshkov@...il.com>,
	"David Woodhouse" <dwmw2@...radead.org>,
	"Krzysztof Kozlowski" <k.kozlowski@...sung.com>,
	"Javier Martinez Canillas" <javier@....samsung.com>,
	linux-kernel@...r.kernel.org, linux-mmc@...r.kernel.org,
	linux-pm@...r.kernel.or, "Alan Stern" <stern@...land.harvard.edu>,
	linux-usb@...r.kernel.org, "Rob Herring" <robh+dt@...nel.org>,
	"Pawel Moll" <pawel.moll@....com>,
	"Mark Rutland" <mark.rutland@....com>,
	"Ian Campbell" <ijc+devicetree@...lion.org.uk>,
	"Kumar Gala" <galak@...eaurora.org>,
	"Kukjin Kim" <kgene@...nel.org>, devicetree@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-samsung-soc@...r.kernel.org
Subject: Re: [PATCH v3 09/12] EXAMPLE CODE: usb: port: Parse pwrseq phandle from
 Device Tree

Quoting Krzysztof Kozlowski (2016-06-01 01:02:18)
> Parse usb-pwrseq property from Device Tree to get the phandle to pwrseq
> device.  The pwrseq device will be used by USB hub to cycle the power
> before activating ports.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@...sung.com>

Drive by review comment.

I was hoping this would help me with a problem I'm having where I have a
hub (smsc4604) that needs to be taken out of reset before my HSIC
controller sends a USB reset to it, but it seems this is more about
doing some sort of power on sequence after enumeration?

> diff --git a/drivers/usb/core/port.c b/drivers/usb/core/port.c
> index 460c855be0d0..89b9bdfc7061 100644
> --- a/drivers/usb/core/port.c
> +++ b/drivers/usb/core/port.c
> @@ -18,6 +18,8 @@
>  
>  #include <linux/slab.h>
>  #include <linux/pm_qos.h>
> +#include <linux/pwrseq.h>
> +#include <linux/usb/of.h>
>  
>  #include "hub.h"
>  
> @@ -526,6 +528,14 @@ int usb_hub_create_port_device(struct usb_hub *hub, int port1)
>                 return retval;
>         }
>  
> +       port_dev->dev.of_node = usb_of_get_child_node(hdev->dev.parent->of_node,
> +                                                     port1);
> +       port_dev->pwrseq = pwrseq_alloc(&port_dev->dev, "usb-pwrseq");
> +       if (IS_ERR(port_dev->pwrseq)) {
> +               device_unregister(&port_dev->dev);
> +               return PTR_ERR(port_dev->pwrseq);

Are we certain that port_dev hasn't been freed at this point? We just
called device_unregister() on it, so it seems safer to save away the
return value before calling device_unregister() here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ