From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Wed, 25 May 2016 08:21:57 +0200 Subject: [U-Boot] [PATCH v1 6/7] dfu, nand, ubi: fix erasing after write finish In-Reply-To: References: <1464152832-11200-1-git-send-email-hs@denx.de> <1464152832-11200-7-git-send-email-hs@denx.de> Message-ID: <57454485.1080601@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Scott, Am 25.05.2016 um 07:33 schrieb Scott Wood: > On 05/25/2016 12:07 AM, Heiko Schocher wrote: >> writting to ubi nand partitions need after write ends an erase >> of the remaining sectors. This fail, if dfu write size was not >> a multiple of erasesize, example log: >> >> Failure erase: -1 >> >> Fix this error. >> >> Signed-off-by: Heiko Schocher > > Why don't you just erase the whole partition up front? Good question ... I think the reason is that if we erase a big partition at once on dfu start, dfu-util rans into timeout ... but may I am wrong ... IIRC at the end of a DFU transfer DFU protocol sends a "flush" to the device ... where we currently erase the remaining sectors ... we need this on an ubi partition, else there may remain old used UBI sectors ... (BTW: we need an "ubi format" command ...) @Lukasz? Am I correct? Or could we simple erase before writting? bye, Heiko -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany