From: Alexey Korolev Date: Fri, 4 Apr 2008 21:30:01 +0000 (-0700) Subject: mtd: fix broken state in CFI driver caused by FL_SHUTDOWN X-Git-Tag: v2.6.25-rc9~64 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb6d080c6f75dfd7e23d5a3575334785aa8738eb;p=pandora-kernel.git mtd: fix broken state in CFI driver caused by FL_SHUTDOWN THe CFI driver in 2.6.24 kernel is broken. Not so intensive read/write operations cause incomplete writes which lead to kernel panics in JFFS2. We investigated the issue - it is caused by bug in FL_SHUTDOWN parsing code. Sometimes chip returns -EIO as if it is in FL_SHUTDOWN state when it should wait in FL_PONT (error in order of conditions). The following patch fixes the bug in state parsing code of CFI. Also I've added comments to notify developers if they want to add new case in future. Signed-off-by: Alexey Korolev Reviewed-by: Joern Engel Cc: David Woodhouse Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed