* put_chip() called with oldstate 1!! (linux 2.6.0-rmk2)
@ 2004-01-08 11:04 Lothar Wassmann
2004-01-08 21:12 ` Dan Post
0 siblings, 1 reply; 3+ messages in thread
From: Lothar Wassmann @ 2004-01-08 11:04 UTC (permalink / raw)
To: linux-mtd
Hi,
I'm using the MTD driver with Intel flash chips on a PXA255 platform
with Redboot partitions. Whenever I write data to the flash and
subsequently unmount and remount the modified partition I get several
messages: 'put_chip() called with oldstate 1!!'.
The put_chip() routine has this switch statement:
| switch(chip->oldstate) {
| case FL_ERASING:
| chip->state = chip->oldstate;
| /* What if one interleaved chip has finished and the
| other hasn't? The old code would leave the finished
| one in READY mode. That's bad, and caused -EROFS
| errors to be returned from do_erase_oneblock because
| that's the only bit it checked for at the time.
| As the state machine appears to explicitly allow
| sending the 0x70 (Read Status) command to an erasing
| chip and expecting it to be ignored, that's what we
| do. */
| cfi_write(map, CMD(0xd0), adr);
| cfi_write(map, CMD(0x70), adr);
| chip->oldstate = FL_READY;
| chip->state = FL_ERASING;
| break;
|
| case FL_READY:
| /* We should really make set_vpp() count, rather than doing this */
| DISABLE_VPP(map);
| break;
| default:
| printk(KERN_ERR "put_chip() called with oldstate %d!!\n", chip->oldstate);
| }
Since I'm not familiar with the details of flash programming, I don't
know what to do with this error message. Should the case FL_STATUS:
(oldstate == 1) be added to the switch to silently ignore this case,
or is there something wrong with the driver or my flash chips?
Lothar Wassmann
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: put_chip() called with oldstate 1!! (linux 2.6.0-rmk2)
2004-01-08 11:04 put_chip() called with oldstate 1!! (linux 2.6.0-rmk2) Lothar Wassmann
@ 2004-01-08 21:12 ` Dan Post
2004-01-09 12:56 ` Lothar Wassmann
0 siblings, 1 reply; 3+ messages in thread
From: Dan Post @ 2004-01-08 21:12 UTC (permalink / raw)
To: Lothar Wassmann; +Cc: linux-mtd
On Thu, 8 Jan 2004 12:04:32 +0100, Lothar Wassmann wrote
> I'm using the MTD driver with Intel flash chips on a PXA255 platform
> with Redboot partitions. Whenever I write data to the flash and
> subsequently unmount and remount the modified partition I get several
> messages: 'put_chip() called with oldstate 1!!'.
Hmmm, strange.
Actually, looking at include/linux/mtd/flashchip.h, 1 == FL_STATUS. (That
holds true for older versions as well.)
Looking at the CVS version of cfi_cmdset_0001.c,
chip->state = FL_ERASING;
break;
case FL_READY:
+ case FL_STATUS:
/* We should really make set_vpp() count, rather than doing
this */
DISABLE_VPP(map);
break;
default:
printk(KERN_ERR "put_chip() called with oldstate %d!!\n",
chip->oldstate);
}
Note the line with the "+" at the front. That was added in version 1.127 of
that file (thanks, CVSweb!), on Wed Jul 2 2003, by acurtis.
The comment: "Added FL_STATUS to the FL_READY case in put_chip(). (Eliminate
noise)"
Given my knowledge of flash chips and the driver, that looks like the
appropriate behavior... you may want to upgrade your file or at least add that
line. There have been some other nice changes since then. From a quick
glance, I can't find any mailing list activity from that timeperiod on this
fix though...
Dan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: put_chip() called with oldstate 1!! (linux 2.6.0-rmk2)
2004-01-08 21:12 ` Dan Post
@ 2004-01-09 12:56 ` Lothar Wassmann
0 siblings, 0 replies; 3+ messages in thread
From: Lothar Wassmann @ 2004-01-09 12:56 UTC (permalink / raw)
To: Dan Post; +Cc: linux-mtd
Hi,
> Looking at the CVS version of cfi_cmdset_0001.c,
> chip->state = FL_ERASING;
> break;
>
> case FL_READY:
> + case FL_STATUS:
> /* We should really make set_vpp() count, rather than doing
> this */
> DISABLE_VPP(map);
> break;
>
But obviously this change didn't make it into the mainline 2.6.0
kernel. :(
Lothar Wassmann
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-01-09 12:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-08 11:04 put_chip() called with oldstate 1!! (linux 2.6.0-rmk2) Lothar Wassmann
2004-01-08 21:12 ` Dan Post
2004-01-09 12:56 ` Lothar Wassmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox