mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2 0/4] usb: gadget: dfu: Fix timeout on erase when using big partition
@ 2020-03-26 18:33 Jules Maselbas
  2020-03-26 18:33 ` [PATCH v2 1/4] usb: gadget: dfu: Reset global variables on unbind Jules Maselbas
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Jules Maselbas @ 2020-03-26 18:33 UTC (permalink / raw)
  To: barebox; +Cc: Jules Maselbas

Hi,

The two first patch are focused on two fixes for an issue I encountered
when trying to use the DFU gadget on big flash partition (2MB).

You can find more information in each patch, but here is a short summary
of the issue:

When downloading a firmware into a big flash partition the erase
operation can take a long time to be complete from few seconds to
minutes in extreme cases. During the erase the DFU gadget does not
respond to any USB setup request, the host only see a stalled USB
endpoint and cannot get responses from DFU_GETSTATE nor DFU_GETSTATUS.


The last patch is a small fix that allow to use the dfu gadget after
being unbind, such as:
  barebox:/ usbgadget -D /foo(foo)
  barebox:/ usbgadget -d
  barebox:/ usbgadget -D /bar(bar)


Best regards,
Jules

change in v2:
 - reorder commits
 - reset global variables for progressive erase in dfu_cleanup
   this is to allow multi partition update without restart
 - add missing error check on erase and remove erase on non mtd device
 - add a new commit that fix a bug when exposing multiple partitions at once

---

Jules Maselbas (4):
  usb: gadget: dfu: Reset global variables on unbind
  usb: gadget: dfu: Add manifestation phase
  usb: gadget: dfu: Progressive erase if file is a mtd
  usb: gadget: dfu: Fix DFU mode interface descriptor

 drivers/usb/gadget/dfu.c | 207 +++++++++++++++++++++++++++++----------
 1 file changed, 155 insertions(+), 52 deletions(-)

-- 
2.21.0.196.g041f5ea


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-03-31  5:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 18:33 [PATCH v2 0/4] usb: gadget: dfu: Fix timeout on erase when using big partition Jules Maselbas
2020-03-26 18:33 ` [PATCH v2 1/4] usb: gadget: dfu: Reset global variables on unbind Jules Maselbas
2020-03-26 18:33 ` [PATCH v2 2/4] usb: gadget: dfu: Add manifestation phase Jules Maselbas
2020-03-26 18:33 ` [PATCH v2 3/4] usb: gadget: dfu: Progressive erase if file is a mtd Jules Maselbas
2020-03-26 18:33 ` [PATCH v2 4/4] usb: gadget: dfu: Fix DFU mode interface descriptor Jules Maselbas
2020-03-30  5:26   ` Sascha Hauer
2020-03-30  9:13     ` Jules Maselbas
2020-03-31  5:13 ` [PATCH v2 0/4] usb: gadget: dfu: Fix timeout on erase when using big partition Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox