public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Stefano Babic <stefano.babic@siemens.com>
To: linux-mtd@lists.infradead.org
Subject: Concurrency erase/write on the same AMD chip with not aligned words
Date: 05 Aug 2003 12:12:08 +0200	[thread overview]
Message-ID: <1060078328.1717.233.camel@mhw42463> (raw)

Hi all,

I have seen a problem when I am writing not-aligned words on AMD chips
while on the same chip another process starts an erase procedure for
other sectors or a different MTD device. 

I have tested with the cfi_cmdset_0002.c v.1.75 and I have found the
problem in the cfi_amstd_write() function.

In fact, when we want to write less that CFIDEV_BUSWIDTH bytes, the
function performs a read/modify/write on the flash with the
instructions:

        if (ofs & (CFIDEV_BUSWIDTH-1)) {
		.............
                map->copy_from(map, tmp_buf, ....

The flash is directly read using the copy_from() function. However, if
another process is currently erasing the same chip (even if it erases on
a different MTD device), we are not allowed to read from flash because
we are reading only the status of the internal state machine (DQ7, DQ6,
DQ5). The resulting read value is wrong and then the write function has
no success (a wrong value is written).

I set the check with the cfi status before the copy_from() as usual with
(mutex omissis):

        if (cfi->chips[chipnum].state != FL_READY) {
		.....

to be sure that the chip is not in FL_ERASING and everything is working
fine. 

Has anybody had the same problem ? 


stefano

-- 

             reply	other threads:[~2003-08-05 10:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-05 10:12 Stefano Babic [this message]
2003-08-07 10:36 ` Concurrency erase/write on the same AMD chip with not aligned words David Woodhouse
2003-08-08  6:42   ` Stefano Babic
2003-08-14 19:30     ` Thayne Harbaugh
2003-10-17 20:54 ` Thayne Harbaugh

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=1060078328.1717.233.camel@mhw42463 \
    --to=stefano.babic@siemens.com \
    --cc=linux-mtd@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox