[PATCH] nand wait timeout fix

Artem Bityutskiy dedekind1 at gmail.com
Sat Nov 13 07:13:59 EST 2010


Matthieu,

On Wed, 2010-11-03 at 12:38 +0100, Matthieu CASTET wrote:
> nand_wait_ready timeout should not depends of HZ value.
> panic_nand_wait take an relative timeout, not a absolute one.
> warn if nand_wait exit while the nand is still busy.
> 
> Signed-off-by: Matthieu CASTET <matthieu.castet at parrot.com>

could you please improve commit message so that it would explain why you
do each of the changes, which problem you solve?

...

> @@ -874,7 +874,7 @@ static int nand_wait(struct mtd_info *mtd, struct nand_chip *chip)
>  		chip->cmdfunc(mtd, NAND_CMD_STATUS, -1, -1);
>  
>  	if (in_interrupt() || oops_in_progress)
> -		panic_nand_wait(mtd, chip, timeo);
> +		panic_nand_wait(mtd, chip, 400);
>  	else {
>  		while (time_before(jiffies, timeo)) {
>  			if (chip->dev_ready) {

In this cas timeo variable and its calculation can be moved to this
inner block, I suppose?

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)




More information about the linux-mtd mailing list