]> git.baikalelectronics.ru Git - kernel.git/commit
eeprom/at25: bugfix "not ready" timeout after write
authorSebastian Heutling <heutling@who-ing.de>
Wed, 29 Jul 2009 22:04:05 +0000 (15:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 30 Jul 2009 02:10:35 +0000 (19:10 -0700)
commit980c38b6e430c9e45fcf1ca5bdadb274d7b4e509
tree33d3f2fc1f8902c82f777f168eddce85660bb17a
parent9013c93d12375e6d68a01064a51d12c0813a7c58
eeprom/at25: bugfix "not ready" timeout after write

Under certain circumstances msleep(1) within the loop, which waits for the
EEPROM to be finished, might take longer than the timeout.  On the next
loop the status register might now return to be ready and therefore the
loop finishes.  The following check now tests if a timeout occurred and if
so returns an error although the device reported it was ready.

This fix replaces testing the occurrence of the timeout by testing the
"not ready" bit in the status register.

Signed-off-by: Sebastian Heutling <heutling@who-ing.de>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/misc/eeprom/at25.c