From: Patrick DELAUNAY Date: Wed, 13 Jan 2021 11:14:02 +0100 Subject: [PATCH] arm: stm32mp: stm32prog: always flush DFU on start command for uart In-Reply-To: <20201211133612.1.I5168c97ed041354102af2ba6ba3f5b3e5d0b9a47@changeid> References: <20201211133612.1.I5168c97ed041354102af2ba6ba3f5b3e5d0b9a47@changeid> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On 12/11/20 1:36 PM, Patrick Delaunay wrote: > From: Patrick Delaunay > > Remove the test on data->dfu_seq, because dfu_seq=0 not only when > the DFU is not started (mask with 0xffff). This flush is mandatory > as the final treatment, common with USB, is done in DFU callback. > > This patch avoids issue if the received length is a multiple of > the DFU packet. > > For example if size of bootfs partition is egual to 0x4000000, > data->dfu_seq=0 at the end of the partition, the flush it not > requested and the phase is not increased in the callback. > U-Boot continue to request the bootfs in the next GetPhase command. > > Fixes: 468f0508b58b ("stm32mp: stm32prog: add serial link support") > Signed-off-by: Patrick Delaunay > Signed-off-by: Patrick Delaunay > --- > > .../mach-stm32mp/cmd_stm32prog/stm32prog_serial.c | 13 ++++++------- > 1 file changed, 6 insertions(+), 7 deletions(-) > Applied to u-boot-stm/master, thanks! Regards Patrick