[PATCH v3] mtd: Fix the behavior of OTP write if there is not enough room for data

Christian Riesch christian.riesch at omicron.at
Mon Mar 10 06:29:40 EDT 2014


--On March 08, 2014 20:56 -0800 Brian Norris <computersforpeace at gmail.com> 
wrote:

> On Thu, Mar 06, 2014 at 12:42:37PM +0100, Christian Riesch wrote:
>> If a write to one time programmable memory (OTP) hits the end of this
>> memory area, no more data can be written. The count variable in
>> mtdchar_write() in drivers/mtd/mtdchar.c is not decreased anymore.
>> We are trapped in the loop forever, mtdchar_write() will never return
>> in this case.
[...]
>> Signed-off-by: Christian Riesch <christian.riesch at omicron.at>
>> Cc: Brian Norris <computersforpeace at gmail.com>
>> ---
[...]
> Thanks for the update. Pushed to l2-mtd.git!

Thanks!
Based on this work I have now also reworked my patches for OTP support for 
drivers/mtd/chips/cfi_cmdset_0002.c. The discussion on earlier versions of 
this patchset led to the two fixes that you took into l2-mtd now. I am 
looking forward to your comments on v3 of the patchset [1].
Christian

[1] http://lists.infradead.org/pipermail/linux-mtd/2014-March/052422.html



More information about the linux-mtd mailing list