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: <87k1z2sdgn.fsf@linux.intel.com>
Date:   Tue, 07 Nov 2017 10:24:56 +0200
From:   Felipe Balbi <balbi@...nel.org>
To:     Ran Wang <ran.wang_1@....com>, linux-kernel@...r.kernel.org,
        linux-usb@...r.kernel.org, devicetree@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org
Cc:     robh+dt@...nel.org, mark.rutland@....com, kishon@...com,
        catalin.marinas@....com, will.deacon@....com,
        stern@...land.harvard.edu, pku.leo@...il.com,
        mathias.nyman@...el.com, gregkh@...uxfoundation.org,
        suresh.gupta@....com, Shawn Guo <shawnguo@...nel.org>,
        Sriram Dash <sriram.dash@....com>,
        Li Yang <leoyang.li@....com>,
        Hongtao Jia <hongtao.jia@....com>,
        Ran Wang <ran.wang_1@....com>
Subject: Re: [PATCH v2 3/3] usb: dwc3: Enable USB 3.0 phy driver


Hi,

Ran Wang <ran.wang_1@....com> writes:
> Adds entry point at dwc3 core init function to enable
> USB 3.0 PHY driver.
>
> Signed-off-by: Ran Wang <ran.wang_1@....com>
> ---
> Change in v2:
> 	- New file
>
>  drivers/usb/dwc3/core.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 03474d3575ab..a9df03c64a7b 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -746,6 +746,8 @@ static int dwc3_core_init(struct dwc3 *dwc)
>  {
>  	u32			reg;
>  	int			ret;
> +	int			retval;
> +	struct phy *phy;
>  
>  	if (!dwc3_core_is_valid(dwc)) {
>  		dev_err(dwc->dev, "this is not a DesignWare USB3 DRD Core\n");
> @@ -770,6 +772,19 @@ static int dwc3_core_init(struct dwc3 *dwc)
>  	if (ret)
>  		goto err0;
>  
> +	phy = phy_get(dwc->dev, "usb-phy");
> +	if (IS_ERR(phy)) {
> +		retval = PTR_ERR(phy);
> +		if (retval == -EPROBE_DEFER)
> +			dev_dbg(dwc->dev, "usb-phy no found\n");
> +	} else {
> +		retval = phy_init(phy);
> +		if (retval) {
> +			phy_put(phy);
> +		    dev_dbg(dwc->dev, "phy_init() error!\n");
> +		}
> +	}
> +

what???? We already do this. See dwc3_core_get_phy().

-- 
balbi

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ