Re: [PATCH v3 2/3] mtd: spi-nor: add 4bit block protection support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday, February 10, 2020 11:47:23 AM EET Tudor Ambarus wrote:
> > btw. we should catch the two special cases:
> > - lock none -> 0 (that was already the case)
> > - lock all -> all BP bits
> > 
> > The latter is important if "bp_slots_needed < bp_slots_available"
> > because there
> > are multiple settings for protect all. Most flashes will define any
> > remaining
> > setting for "protect all", but I've also seen flashes where the
> > in-between ones
> > were undefined (not mentioned) and only the "all bit set" was protect
> > all.

I re-read this. Do you have such an example of flash? Aren't the BP bits in 
this case marked with "X", i.e. don't care? If not, probably we can mask out 
those undefined slots.
> 
> This case is addressed by using bp_slot_count and bp_slots_available. We're
> in the else case from above. From bp_slot_count up to the
> bp_slots_available, those slots are "protect all".




______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux