https://github.com/torvalds/linux
Revision f0d83679a8d471dc8b646919f70595d6fe8c9606 authored by Sebastian Heutling on 29 July 2009, 22:04:05 UTC, committed by Linus Torvalds on 30 July 2009, 02:10:35 UTC
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>
1 parent 096b7fe
Raw File
Tip revision: f0d83679a8d471dc8b646919f70595d6fe8c9606 authored by Sebastian Heutling on 29 July 2009, 22:04:05 UTC
eeprom/at25: bugfix "not ready" timeout after write
Tip revision: f0d8367
.gitignore
#
# NOTE! Don't add files that are generated in specific
# subdirectories here. Add them in the ".gitignore" file
# in that subdirectory instead.
#
# NOTE! Please use 'git ls-files -i --exclude-standard'
# command after changing this file, to see if there are
# any tracked files which get ignored after the change.
#
# Normal rules
#
.*
*.o
*.o.*
*.a
*.s
*.ko
*.so
*.so.dbg
*.mod.c
*.i
*.lst
*.symtypes
*.order
*.elf
*.bin
*.gz
*.lzma
*.patch
*.gcno

#
# Top-level generic files
#
tags
TAGS
vmlinux
System.map
Module.markers
Module.symvers
!.gitignore
!.mailmap

#
# Generated include files
#
include/asm
include/asm-*/asm-offsets.h
include/config
include/linux/autoconf.h
include/linux/compile.h
include/linux/version.h
include/linux/utsrelease.h
include/linux/bounds.h
include/generated

# stgit generated dirs
patches-*

# quilt's files
patches
series

# cscope files
cscope.*
ncscope.*

# gnu global files
GPATH
GRTAGS
GSYMS
GTAGS

*.orig
*~
\#*#
back to top