Bug 14102
Summary: | mtdoops panic dump to a device without panic_write() function doesn't work. | ||
---|---|---|---|
Product: | Drivers | Reporter: | Matthew Lear (matt) |
Component: | Flash/Memory Technology Devices | Assignee: | David Woodhouse (dwmw2) |
Status: | CLOSED OBSOLETE | ||
Severity: | normal | CC: | alan, matt, rich.g.nht |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.29 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Matthew Lear
2009-09-01 10:38:43 UTC
Just wondered if there were any thoughts on this? Don't mean to be rude but I expected to hear something within 3 months... We've revamped the mtdoops code recently; it's worth retesting with 2.6.33-rc2.
But...
> The mtd driver I'm using does not have a panic_write() function...
> The only way I can get 100% reliable writes to flash upon panic...
I suspect you'll just hit:
/* Panics must be written immediately */
if (reason != KMSG_DUMP_OOPS) {
if (!cxt->mtd->panic_write)
printk(KERN_ERR "mtdoops: Cannot write from panic without panic_write\n");
Surely the way to get reliable writes to flash upon panic is to provide a panic_write() function? Perhaps I'm being dim, but I'm kind of missing the point about why the behaviour you describe is at all unexpected.
(In reply to comment #2) > Surely the way to get reliable writes to flash upon panic is to provide a > panic_write() function? Perhaps I'm being dim, but I'm kind of missing the > point about why the behaviour you describe is at all unexpected. Yes, absolutely fair enough :-) Unfortunately it's not possible for me to test with 2.6.33-rc2 at the current time... That said, the code that I was running was written in a way which seemed that reliable writes to flash without a panic_write() function could still be performed. As I reported, this wasn't the case. The only way to absolutely guarantee that flash could be written to upon panic was to have a panic_write() function as you say. Given the fact that it seemed like it may or may not work even if there was no panic_write() function seemed wrong to me, though. Logically, I'd have thought that if you want to write to flash upon panic then you must install/have a panic_write() function. If not, then perhaps it would be better to indicate an error at mtdoops initialisation..? I suppose it keeps things flexible, though... I've not looked at the current source so my comments may well be totally irrelevant and/or superfluous now... |