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: <979ae7cd-2648-c516-1465-3a1507d5fefb@ti.com>
Date:   Mon, 27 Apr 2020 18:10:17 +0530
From:   Kishon Vijay Abraham I <kishon@...com>
To:     Jonathan Bakker <xc-racer2@...e.ca>,
        <linux-kernel@...r.kernel.org>, <s.nawrocki@...sung.com>,
        <kamil@...as.org>, <krzk@...nel.org>,
        <linux-samsung-soc@...r.kernel.org>
Subject: Re: [PATCH] phy: samsung: s5pv210-usb2: Add delay after reset

Hi Jonathan,

On 4/25/2020 11:06 PM, Jonathan Bakker wrote:
> The USB phy takes some time to reset, so make sure we give it to it. The
> delay length was taken from the 4x12 phy driver.
> 
> This manifested in issues with the DWC2 driver since commit fe369e1826b3
> ("usb: dwc2: Make dwc2_readl/writel functions endianness-agnostic.")
> where the endianness check would read the DWC ID as 0 due to the phy still
> resetting, resulting in the wrong endian mode being chosen.
> 
> Signed-off-by: Jonathan Bakker <xc-racer2@...e.ca>
> ---
>  drivers/phy/samsung/phy-s5pv210-usb2.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/phy/samsung/phy-s5pv210-usb2.c b/drivers/phy/samsung/phy-s5pv210-usb2.c
> index 56a5083fe6f9..32be62e49804 100644
> --- a/drivers/phy/samsung/phy-s5pv210-usb2.c
> +++ b/drivers/phy/samsung/phy-s5pv210-usb2.c
> @@ -139,6 +139,10 @@ static void s5pv210_phy_pwr(struct samsung_usb2_phy_instance *inst, bool on)
>  		udelay(10);
>  		rst &= ~rstbits;
>  		writel(rst, drv->reg_phy + S5PV210_UPHYRST);
> +		/* The following delay is necessary for the reset sequence to be
> +		 * completed
> +		 */
> +		udelay(80);

Please fix the following checkpatch check error.
CHECK: usleep_range is preferred over udelay; see
Documentation/timers/timers-howto.rst
#151: FILE: drivers/phy/samsung/phy-s5pv210-usb2.c:145:
+               udelay(80);

total: 0 errors, 0 warnings, 1 checks, 10 lines checked

Thanks
Kishon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ