From: Huang Shijie Date: Fri, 12 Apr 2013 07:33:11 +0000 (+0800) Subject: ENGR00258733 WEIM-NOR: mtd: cfi_cmdset_0002: Do not release the mutex lock X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=54a30eeae9b663df8c551a275041d4f3d2b35db3;p=karo-tx-linux.git ENGR00258733 WEIM-NOR: mtd: cfi_cmdset_0002: Do not release the mutex lock The NOR(M29W256GL7AN6E) may suffers a write-buffer timeout during the bonnie++/ubifs stress test. Micron has confirmed that it is a silicon bug in the Nor. This patch is just a workaround to fix this issue for this NOR. With this patch, the read/write/erase will do in the synchronous way. Signed-off-by: Huang Shijie --- diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index fff665d59a0d..b4e8832eb4fa 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c @@ -1058,17 +1058,13 @@ static void __xipram xip_udelay(struct map_info *map, struct flchip *chip, #define UDELAY(map, chip, adr, usec) \ do { \ - mutex_unlock(&chip->mutex); \ cfi_udelay(usec); \ - mutex_lock(&chip->mutex); \ } while (0) #define INVALIDATE_CACHE_UDELAY(map, chip, adr, len, usec) \ do { \ - mutex_unlock(&chip->mutex); \ INVALIDATE_CACHED_RANGE(map, adr, len); \ cfi_udelay(usec); \ - mutex_lock(&chip->mutex); \ } while (0) #endif