All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Oliver Kühlert" <oliver.kuehlert@sysgo.com>
To: linux-mtd@lists.infradead.org
Cc: mag@sysgo.com, rof@sysgo.com, acs@sysgo.com
Subject: chip driver mar_ram.c never sets MTD_ERASE_DONE state
Date: Thu, 17 Jun 2004 15:51:46 +0200	[thread overview]
Message-ID: <40D1A1F2.1000103@sysgo.com> (raw)



Hello,

trying to erase on an mtd devices using the map_ram.c driver
blocks the current process and never wakes up. (see mtdchar.c, ioctl func)

I believe, that this can be fixed by adding the marked line in map_ram.c:


static int mapram_erase (struct mtd_info *mtd, struct erase_info *instr)
{
         /* Yeah, it's inefficient. Who cares? It's faster than a _real_
            flash erase. */
         struct map_info *map = (struct map_info *)mtd->priv;
         unsigned long i;

         for (i=0; i<instr->len; i++)
                 map_write8(map, 0xFF, instr->addr + i);

!!!!!!---->   instr->state = MTD_ERASE_DONE;   <----- !!!!!!

         if (instr->callback)
                 instr->callback(instr);

         return 0;
}

Best regards, Oliver Kühlert


-- 
Dr. Oliver Kuehlert          SYSGO Real-Time Solutions AG
oliver.kuehlert@sysgo.com
Software Engineering     Embedded and Real-Time Software    www.sysgo.de
Voice: +49-6136-9948-0   Am Pfaffenstein 14                 www.osek.de
FAX:   +49-6136-9948-10  55270 Klein-Winternheim, Germany   www.elinos.com

             reply	other threads:[~2004-06-17 13:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-17 13:51 Oliver Kühlert [this message]
2004-06-17 14:08 ` chip driver mar_ram.c never sets MTD_ERASE_DONE state Thomas Gleixner
2004-06-17 14:43 ` Ian Campbell

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=40D1A1F2.1000103@sysgo.com \
    --to=oliver.kuehlert@sysgo.com \
    --cc=acs@sysgo.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mag@sysgo.com \
    --cc=rof@sysgo.com \
    /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.