Skip to contentSkip to conversation

Preparation for sync with Linus.

DISCUSSION David Woodhouse 2 participants 3 messages Sep 19, 2001 – Sep 20, 2001 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

I'm preparing to send the latest code to Linus. I'm going to read through the patch for obvious bogosity, probably removing some of the changes which are only for portability, and do some basic testing tomorrow.

In the meantime, if there's anything you don't like about the current set of changes, now would be a good time to shout.

ftp.uk.linux.org:/pub/people/dwmw2/mtd/mtd-diff-against-2.4.9-pre12-v9

--
dwmw2

#1 lore raw
Quoted 2 lines

In the meantime, if there's anything you don't like about the current set of changes, now would be a good time to shout.

Hi David,

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?

Jarkko Lavinen

#2 lore raw
Quoted 6 lines · [email protected] 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 from:

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 user.

--
dwmw2