Re: Re-entrancy of flash erase/write

David Woodhouse
2002-02-25T16:56:22Z

rob@sysgo.de said:
> [David, OK to apply this ?]

I'd rather it was done in the map driver's set_vpp function itself.
Sometimes you have more than one map driver, because you have different
regions of flash - but they all share the same Vpp control. In which case
you need to do the counting in the map driver anyway.

> I looked into this a little further: it seems that the erase
> functions in cfi_cmdset_000?.c and amd_flash.c temporarily release the
> chip->mutex while VPP is on. Won't that allow other threads to get
> hold of the mutex and fiddle with VPP, possibly turning it off ?

I see the possibility, but surely that would only _actually_ happen if we
started to support writes during erase suspend? Otherwise, the only thing
that should happen during an erase is a _read_, which doesn't set and clear
vpp.

--
dwmw2