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] [day] [month] [year] [list]
Message-ID: <20140513075133.GA16873@lukather>
Date:	Tue, 13 May 2014 09:51:33 +0200
From:	Maxime Ripard <maxime.ripard@...e-electrons.com>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	Emilio Lopez <emilio@...pez.com.ar>,
	Mike Turquette <mturquette@...aro.org>, kishon@...com,
	hdegoede@...hat.com, Boris Brezillon <boris@...e-electrons.com>,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-usb@...r.kernel.org, kevin.z.m.zh@...il.com,
	sunny@...winnertech.com, shuge@...winnertech.com,
	zhuzhenhua@...winnertech.com, linux-sunxi@...glegroups.com,
	Boris BREZILLON <boris.brezillon@...e-electrons.com>
Subject: Re: [PATCH v3 5/8] usb: ehci-platform: add optional reset controller
 retrieval

On Mon, May 12, 2014 at 04:06:16PM -0400, Alan Stern wrote:
> On Mon, 12 May 2014, Maxime Ripard wrote:
> 
> > From: Boris BREZILLON <boris.brezillon@...e-electrons.com>
> > 
> > On the Allwinner's A31 SoC the reset line connected to the EHCI IP has to
> > be deasserted for the EHCI block to be usable.
> > 
> > Add support for an optional reset controller that will be deasserted on
> > power off and asserted on power on.
> > 
> > Signed-off-by: Boris BREZILLON <boris.brezillon@...e-electrons.com>
> > Signed-off-by: Maxime Ripard <maxime.ripard@...e-electrons.com>
> > Reviewed-by: Hans de Goede <hdegoede@...hat.com>
> 
> ...
> 
> > @@ -208,6 +210,18 @@ static int ehci_platform_probe(struct platform_device *dev)
> >  		}
> >  	}
> >  
> > +	priv->rst = devm_reset_control_get_optional(&dev->dev, NULL);
> > +	if (IS_ERR(priv->rst)) {
> > +		err = PTR_ERR(priv->rst);
> > +		if (err == -EPROBE_DEFER)
> > +			goto err_put_clks;
> > +		priv->rst = NULL;
> > +	} else {
> > +		err = reset_control_deassert(priv->rst);
> > +		if (err)
> > +			goto err_put_clks;
> > +	}
> > +
> >  	if (pdata->big_endian_desc)
> >  		ehci->big_endian_desc = 1;
> >  	if (pdata->big_endian_mmio)
> 
> You don't re-assert the reset control if an error happens later on 
> during probe.  Was that intentional?

No, it wasn't. I'll resubmit another version.

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ