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:	Thu, 19 Jun 2014 20:59:14 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	prashant@...adcom.com
Cc:	netdev@...r.kernel.org, mchan@...adcom.com
Subject: Re: [PATCH net]tg3: Change nvram command timeout value to 50ms

From: Prashant Sreedharan <prashant@...adcom.com>
Date: Wed, 18 Jun 2014 18:38:42 -0700

> Commit 506724c463fcd63477a5e404728a980b71f80bb7 "tg3: Override clock,
> link aware and link idle mode during NVRAM dump" changed the timeout
> value for nvram command execution from 100ms to 1ms. But the 1ms
> timeout value was only sufficient for nvram read operations but not
> write operations for most of the devices supported by tg3 driver.
> This patch sets the MAX to 50ms. Also to avoid busy waiting for a long
> time, the driver will udelay for 1ms and msleep for the remaining time.
> 
> Signed-off-by: Prashant Sreedharan <prashant@...adcom.com>
> Signed-off-by: Michael Chan <mchan@...adcom.com>

Please don't have this conditional type of busy waiting.

Perhaps use something like usleep_range() for every loop iteation.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ