]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00258733 WEIM-NOR: mtd: cfi_cmdset_0002: Do not release the mutex lock
authorHuang Shijie <b32955@freescale.com>
Fri, 12 Apr 2013 07:33:11 +0000 (15:33 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:36:03 +0000 (08:36 +0200)
The NOR may suffers a write-buffer timeout during the bonnie++/ubifs stress
test. This patch is just a workaround to fix this issue.

With this patch, the read/write/erase will do in the synchronous way.

Signed-off-by: Huang Shijie <b32955@freescale.com>
drivers/mtd/chips/cfi_cmdset_0002.c

index a35416cbdbb4231176ae276adce2802483d7405b..f3626b0d7b1113f47a689175d359356a5c2e4578 100644 (file)
@@ -1040,17 +1040,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