Skip to content

Commit

Permalink
[MTD] OneNAND: Return an error if a read timeout occurs
Browse files Browse the repository at this point in the history
If OneNAND is operating within specification, all operations should easily be
completed within the 20 millisecond timeout.
This patch faithlessly adds a check for the timeout and returns an error in
that case.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
  • Loading branch information
Adrian Hunter authored and Kyungmin Park committed Jan 18, 2007
1 parent 10b7a2b commit 9d03280
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/mtd/onenand/onenand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,9 @@ static int onenand_wait(struct mtd_info *mtd, int state)
} else if (ecc & ONENAND_ECC_1BIT_ALL)
mtd->ecc_stats.corrected++;
}
} else if (state == FL_READING) {
printk(KERN_ERR "onenand_wait: read timeout! ctrl=0x%04x intr=0x%04x\n", ctrl, interrupt);
return -EIO;
}

return 0;
Expand Down

0 comments on commit 9d03280

Please sign in to comment.