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: <559A7A6F.6040107@topic.nl>
Date:	Mon, 06 Jul 2015 14:54:07 +0200
From:	Mike Looijmans <mike.looijmans@...ic.nl>
To:	David Laight <David.Laight@...LAB.COM>,
	"'Peter Chen'" <peter.chen@...escale.com>
CC:	"lars@...afoo.de" <lars@...afoo.de>,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] usb: chipidea: Reduce ULPI PHY reset pulse to datasheet
 spec of 1us

On 02-07-15 11:39, David Laight wrote:
> From: Peter Chen
>> Sent: 30 June 2015 03:06
>> On Fri, Jun 26, 2015 at 03:47:03PM +0200, Mike Looijmans wrote:
>>> The datasheet for the 334x PHY mentions that a reset can be performed:
>>> "... by bringing the pin low for a minimum of 1 microsecond and
>>> then high."
>>> A delay of 5ms to implement that seems overly long, so reduce it to
>>> just 1us.
>>> As for the delay after reset, the datasheet only mentioned that the
>>> chip will assert the DIR output. 1ms seems like a safe time to wait
>>> for that to happen, so no change there.
>>>
>>> Signed-off-by: Mike Looijmans <mike.looijmans@...ic.nl>
>>> ---
>>>   drivers/usb/chipidea/core.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
>>> index e970863..c865abe 100644
>>> --- a/drivers/usb/chipidea/core.c
>>> +++ b/drivers/usb/chipidea/core.c
>>> @@ -664,7 +664,7 @@ static int ci_hdrc_create_ulpi_phy(struct device *dev, struct ci_hdrc *ci)
>>>   			dev_err(dev, "Failed to request ULPI reset gpio: %d\n", ret);
>>>   			return ret;
>>>   		}
>>> -		msleep(5);
>>> +		udelay(1);
>
> If the spec says 1us I'd delay for longer just to make sure.
> And add a comment saying that the reset needs to be 1us long.

Why? It's not as if the chip would reset any "better" if you pull the line 
longer. For some of these USB PHYs, the internal regulators and other analog 
parts will be disabled as well and the longer you keep it in reset, the longer 
it will take the device to start back up again.
The 1us value already takes into account a generous compensation for 
temperature and other factors, and probably the reset will work just fine even 
if you only use half the time.
Even if I'd agree with you here, I think you'll also have to admit that 5000x 
the value in the datasheet might be a bit over the top.

M.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ