On Tue, 13 May 2014 12:51:18 +0400 Shire degener_trash@mail.ru wrote:
Thanks to The Raven and Stefan Tauner for bug report. I fix patch for correct write buffer calculation. Correct version of patch is attached.
Yes, that one looks correct. I came to the same conclusion like you: 1) the loop condition is wrong and 2) the offset used within the read buffer should start at 0 and not at the chip offset. I really wonder how this could have ever worked in my tests :)
My patch to solve the issue is a bit different though and I think it is slightly better readable. I'd be glad if you could test/review it.