[PATCH] nand_wait_ready() timeout scaling

Trent Piepho xyzzy at speakeasy.org
Wed Apr 30 16:19:34 EDT 2008


On Wed, 30 Apr 2008, Andrew E. Mileski wrote:
> Andrew E. Mileski wrote:
>> The nand_wait_ready() timeout was hardcoded to 2 jiffies, which does not
>> scale with the system timer frequency.  Using a guess of a 250 Hz system
>> timer frequency, I believe the timeout was meant to be 8 ms.  This patch
>> sets an 8 ms timeout that scales with the system timer frequency.
>>
>> Tested with a 1000 Hz system timer frequency and with a device requiring
>> at least a 3 ms timeout.
>
> Just realized that 100 Hz systems would have a problem with this patch
> since (100 * 8) / 1000 = 0.  Guess the simple solution is to make the
> timeout 10 ms.

msecs_to_jiffies() is what you want to use.



More information about the linux-mtd mailing list