Preparation for sync with Linus.

David Woodhouse dwmw2 at
Thu Sep 20 05:58:42 EDT 2001

jlavi at said:
>  if the chip has sectors locked after cold boot, currently I have to
> either  run unlock command or add a call to unlock function into the
> map driver.

> Should chip driver unlock sectors if chip is detected and the sectors
> are  suspected to be locked? 

There are two possible types of mishap which the locking can protect us 

1. Kernel bugs where misdirected memory accesses could write to or erase
	parts of the flash.
2. User error leading to the erasure of important flash partitions, like
	mounting the boot loader partition as JFFS2.

If we care primarily about #1, we should keep the sectors locked at all 
times and unlock them only when we want to access them. 

If we care primarily about #2, then we should unlock sectors _only_ when 
explicitly requested to do so by the user.

I think that the facility to switch Vpp off while the chip is idle, coupled
with the complexity of the sequence of writes necessary to actually write to
a flash chip, makes it unlikely that #1 is a serious concern - so we
currently unlock sectors only when explicitly requested to do so by the


More information about the linux-mtd mailing list