From: Stefan Bigler <stefan.bigler@keymile.com>
To: Michael Cashwell <mboards@prograde.net>
Cc: Holger brunck <holger.brunck@keymile.com>,
linux-mtd@lists.infradead.org,
Joakim Tjernlund <joakim.tjernlund@transmode.se>
Subject: Re: Numonyx NOR and chip->mutex bug?
Date: Mon, 07 Feb 2011 18:08:55 +0100 [thread overview]
Message-ID: <4D502727.5010208@keymile.com> (raw)
In-Reply-To: <3FD201B7-C633-4D5D-A5D5-42952E6FFC28@prograde.net>
Hi Mike
I attached a patch for you adding some printk, with those already the
creation of the first ubivolume goes wrong.
Is this also the case in your setup?
Regards Stefan
Subject: [PATCH 2/2] MTD: cfi_cmdset_0001 driver add tracing
This tracing force in my case a race condition. When I create
a ubivolume.
Signed-off-by: Stefan Bigler <stefan.bigler@keymile.com>
---
drivers/mtd/chips/cfi_cmdset_0001.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c
b/drivers/mtd/chips/cfi_cmdset_0001.c
index d3b2cd3..ea59726 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -37,6 +37,8 @@
#include <linux/mtd/compatmac.h>
#include <linux/mtd/cfi.h>
+#include <linux/syscalls.h>
+
/* #define CMDSET0001_DISABLE_ERASE_SUSPEND_ON_WRITE */
/* #define CMDSET0001_DISABLE_WRITE_SUSPEND */
@@ -799,6 +801,8 @@ static int chip_ready (struct map_info *map, struct
flchip *chip, unsigned long
/* Erase suspend */
map_write(map, CMD(0xB0), adr);
+ printk("[%10u][%04ld] erase suspend 1 adr=0x%08lx\n",
+ jiffies_to_usecs(jiffies)/1000, sys_gettid(), adr);
/* If the flash has finished erasing, then 'erase suspend'
* appears to make some (28F320) flash devices switch to
@@ -1012,6 +1016,10 @@ static void put_chip(struct map_info *map, struct
flchip *chip, unsigned long ad
do. */
map_write(map, CMD(0xd0), adr);
map_write(map, CMD(0x70), adr);
+
+ printk("[%10u][%04ld] erase resumed 2b adr=0x%08lx\n",
+ jiffies_to_usecs(jiffies)/1000, sys_gettid(), adr);
+
chip->oldstate = FL_READY;
chip->state = FL_ERASING;
break;
@@ -1884,6 +1892,10 @@ static int __xipram do_erase_oneblock(struct
map_info *map, struct flchip *chip,
retry:
mutex_lock(&chip->mutex);
ret = get_chip(map, chip, adr, FL_ERASING);
+
+ printk("[%10u][%04ld] do_erase_oneblock start adr=0x%08lx len=0x%x\n",
+ jiffies_to_usecs(jiffies)/1000, sys_gettid(), adr, len);
+
if (ret) {
mutex_unlock(&chip->mutex);
return ret;
@@ -1953,6 +1965,9 @@ static int __xipram do_erase_oneblock(struct
map_info *map, struct flchip *chip,
xip_enable(map, chip, adr);
out: put_chip(map, chip, adr);
+ printk("[%10u][%04ld] do_erase_oneblock end adr=0x%08lx len=0x%x
\n",
+ jiffies_to_usecs(jiffies)/1000, sys_gettid(), adr, len);
+
mutex_unlock(&chip->mutex);
return ret;
}
--
1.7.0.5
Am 02/07/2011 05:46 PM, schrieb Michael Cashwell:
> On Feb 7, 2011, at 11:22 AM, Joakim Tjernlund wrote:
>
>> Michael Cashwell<mboards@prograde.net> wrote on 2011/02/07 16:46:22:
>>
>>> My current workaround from my problem is to do a throw-away status read "(void) map_read(map, addr);" after that 0x50, 0xd0, 0x70 sequence. Since no one else is seeing my problem I expect it's some issue with my specific batch of chips. Ugh.
>>
>> Possibly, or an accident waiting to happen to the rest of us.
>
> That does worry me too.
>
>> The map_read will probably force some HW completion. Perhaps some sync() op. will do the same? Just to nail it down.
>
> Once your patch is handled I will continue to try to fully explain my issue. I'm not giving up yet.
>
>> BTW, do you have CONFIG_MTD_COMPLEX_MAPPINGS=y ? I do
>
> Interesting. I have used that on a different platform where some of the high-order address lines were GPIOs.
>
> But no, I'm not using that in this case. Just a simple linear mapping of the whole part.
>
> -Mike
>
next prev parent reply other threads:[~2011-02-07 17:09 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-25 18:14 Numonyx NOR and chip->mutex bug? Michael Cashwell
2011-01-25 18:56 ` Joakim Tjernlund
2011-01-25 22:03 ` Michael Cashwell
2011-01-25 23:09 ` Joakim Tjernlund
2011-02-02 16:20 ` Michael Cashwell
2011-02-02 17:37 ` Stefan Bigler
2011-02-02 20:12 ` Joakim Tjernlund
2011-02-02 21:19 ` Michael Cashwell
2011-02-03 8:11 ` Joakim Tjernlund
2011-02-03 9:50 ` Joakim Tjernlund
2011-02-03 15:24 ` Michael Cashwell
2011-02-03 16:38 ` Stefan Bigler
2011-02-03 23:18 ` Stefan Bigler
2011-02-04 10:47 ` Joakim Tjernlund
2011-02-04 11:04 ` Stefan Bigler
2011-02-04 12:26 ` Joakim Tjernlund
2011-02-04 12:35 ` Joakim Tjernlund
2011-02-04 12:42 ` Joakim Tjernlund
2011-02-04 13:05 ` Joakim Tjernlund
2011-02-04 13:25 ` Joakim Tjernlund
2011-02-04 16:45 ` Stefan Bigler
2011-02-04 16:55 ` Joakim Tjernlund
2011-02-04 17:09 ` Michael Cashwell
[not found] ` <OF42EF<F66AF016-8A2B-4116-BE49-CE05B91BE50F@prograde.net>
[not found] ` <OF42EF <F66AF016-8A2B-4116-BE49-CE05B91BE50F@prograde.net>
2011-02-05 10:29 ` Joakim Tjernlund
2011-02-05 19:19 ` Michael Cashwell
2011-02-05 21:47 ` Michael Cashwell
2011-02-06 9:46 ` Joakim Tjernlund
2011-02-06 15:49 ` Michael Cashwell
2011-02-06 17:29 ` Joakim Tjernlund
2011-02-06 21:13 ` Michael Cashwell
[not found] ` <OF2C1ABD39<4D5005E4.1040506@keymile.com>
[not found] ` <OFFF2C6D34.91E5D6C3-ONC1257<96BD3889-E8AD-408D-8275-ED1A5FD55F1B@prograde.net>
[not found] ` <OF9738D658.F46<4C117A67-5057-4ACD-8EBE-04E9C782570C@prograde.net>
[not found] ` <OF6D40AC82.1008D3DD-ONC1 <4D53E660.4020305@users.sourceforge.net>
[not found] ` <OF2C1ABD39 <4D5005E4.1040506@keymile.com>
[not found] ` <OFFF2C6D34.91E5D6C3-ONC1257 <96BD3889-E8AD-408D-8275-ED1A5FD55F1B@prograde.net>
2011-02-06 21:20 ` Joakim Tjernlund
2011-02-07 14:47 ` Stefan Bigler
2011-02-07 15:01 ` Joakim Tjernlund
2011-02-07 15:46 ` Michael Cashwell
2011-02-07 15:52 ` Stefan Bigler
2011-02-07 16:22 ` Joakim Tjernlund
2011-02-07 16:46 ` Michael Cashwell
2011-02-07 17:08 ` Stefan Bigler [this message]
2011-02-07 19:04 ` Michael Cashwell
2011-02-09 19:52 ` Michael Cashwell
2011-02-09 20:13 ` Joakim Tjernlund
2011-02-09 21:59 ` Michael Cashwell
2011-02-10 13:21 ` Anders Grafström
2011-02-10 14:04 ` Joakim Tjernlund
2011-02-10 15:04 ` Joakim Tjernlund
2011-02-10 15:59 ` Michael Cashwell
2011-02-10 16:05 ` Joakim Tjernlund
2011-02-10 16:41 ` Michael Cashwell
2011-02-10 16:46 ` Joakim Tjernlund
2011-02-10 17:02 ` Joakim Tjernlund
2011-02-10 17:10 ` Michael Cashwell
2011-02-10 17:20 ` Joakim Tjernlund
2011-02-10 17:47 ` Joakim Tjernlund
2011-02-10 18:26 ` Joakim Tjernlund
2011-02-11 18:03 ` Michael Cashwell
2011-02-12 10:47 ` Joakim Tjernlund
2011-02-14 15:59 ` Michael Cashwell
2011-02-14 15:44 ` Michael Cashwell
2011-02-10 16:43 ` Michael Cashwell
2011-02-10 17:54 ` Anders Grafström
2011-02-11 15:05 ` Michael Cashwell
2011-02-11 15:39 ` Joakim Tjernlund
2011-02-14 16:15 ` Michael Cashwell
2011-02-11 17:00 ` Joakim Tjernlund
2011-02-10 15:43 ` Michael Cashwell
2011-02-10 15:51 ` Joakim Tjernlund
2011-02-24 10:50 ` Joakim Tjernlund
2011-02-24 11:36 ` Joakim Tjernlund
2011-02-24 14:28 ` Michael Cashwell
2011-02-10 14:53 ` Joakim Tjernlund
2011-02-06 9:40 ` Joakim Tjernlund
2011-02-06 14:55 ` Michael Cashwell
2011-02-07 15:10 ` Michael Cashwell
2011-02-07 15:48 ` Joakim Tjernlund
2011-02-03 13:24 ` Michael Cashwell
2011-02-03 14:01 ` Joakim Tjernlund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D502727.5010208@keymile.com \
--to=stefan.bigler@keymile.com \
--cc=holger.brunck@keymile.com \
--cc=joakim.tjernlund@transmode.se \
--cc=linux-mtd@lists.infradead.org \
--cc=mboards@prograde.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.