Flash left in a write mode

David Woodhouse dwmw2 at infradead.org
Fri Feb 8 20:19:47 EST 2002


On Thu, 7 Feb 2002, Allen Curtis wrote:

> I have observed a problem where the flash is left in a write mode even after
> the file-system is unmounted. (Intel Strata flash, cmdset_0001.c)
> 
> The problem is this: if the flash is written to and then the system is
> immediately rebooted, the flash is left in a write state. 

Define 'rebooted'? Hitting the reset button if you have one should reset 
the flash (although sometimes it doesn't - bogus f***wit points to whoever 
designed the Assabet for that one)

If you're implementing machine_restart() for your platform, then it should 
be ensuring that the hardware is in a state sufficiently close to the 
power-up state, for the benefit of the bootloader. That means turning off 
the MMU and jumping to the startup vector, at the very least. Often it 
means resetting bus controllers where we've moved around the physical 
memory map too - it could be argued that this preparation should include 
resetting the flash too.

I'm willing to entertain the notion that the flash driver should do this 
on close, or we should have a reboot notifier registered that calls a new 
method in the mtd_info to reset the flash. 

I'll consider if it a clean patch is presented - but I'm not going to go 
out of my way to fix it myself - I don't consider it particularly broken.

-- 
dwmw2





More information about the linux-mtd mailing list