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]
Date:	Mon, 13 May 2013 10:15:32 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	linux fddl <fddllinux@...il.com>
cc:	linux-usb@...r.kernel.org, <gregkh@...uxfoundation.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: usb: why we need a msleep(5) in ehci_bus_suspend/resume

On Mon, 13 May 2013, linux fddl wrote:

> Hi,
> 
>   From the ehci-hub.c, I find that ehci_bus_suspend/resume have some
> code like this:
> 
> if (time_before(jiffies, ehci->netx_statechange))
>     msleep(5);
> ...
> ehci->next_statechange = jiffies + msec_to_jiffies(10);
> 
> and
> 
> if (time_before(jiffies, ehci->netx_statechange))
>     msleep(5);
> ...
> ehci->next_statechange = jiffies + msec_to_jiffies(5);
> 
> but I don't know why such a short sleep is needed, and why one is
> [ehci->next_statechange = jiffies + msec_to_jiffies(10)] and the other is
> [ehci->next_statechange = jiffies + msec_to_jiffies(5)],
> I googled for a long time, but it seems that there is no explanation.
> 
>   Anyone knows why and can give any explanation?

At this point I don't think anybody knows.  The person who originally
wrote that code died a few years ago.

Alan Stern

--
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