mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jules Maselbas <jmaselbas@kalray.eu>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2 4/4] usb: gadget: dfu: Fix DFU mode interface descriptor
Date: Mon, 30 Mar 2020 11:13:31 +0200	[thread overview]
Message-ID: <20200330091331.y6jau77fimagy2ig@tellis.lin.mbt.kalray.eu> (raw)
In-Reply-To: <20200330052629.GT27288@pengutronix.de>

Hi Sascha,

On Mon, Mar 30, 2020 at 07:26:30AM +0200, Sascha Hauer wrote:
> DFU stopped working for me quite a while ago and I tracked it down to
> this dfu-util commit:
> 
> | commit 377f6f136d3369529f44578acaeee82d7c7d7af9
> | Author: Paul Fertser <fercerpav@gmail.com>
> | Date:   Sun Aug 10 14:26:05 2014 +0400
> | 
> |     dfu_util: Ignore alt_index/alt_name specification in runtime mode
> |     
> |     When the device is in runtime mode it needs to be reset first into DFU
> |     mode for the list of alternate settings to appear, so unless it is
> |     already in the right mode, matching on alt setting number or name
> |     should be skipped.
> |     
> |     Fixes regression on OpenMoko Freerunner.
> |     
> |     Signed-off-by: Paul Fertser <fercerpav@gmail.com>
> 
> Are you using a recent dfu-util version? Is your patch the fix for this
> commit?
Yes, I am using dfu-util version 0.9. I didn't search in dfu-util
commit history but yeah my patch seems to be a fix for this commit.

The current DFU gadget do not handle USB reset and thus cannot change
mode, it cannot go from runtime to DFU mode. The solution is to always
be in the DFU ready mode.

Thanks for sharing this commit, it explain well what I was experiencing:
dfu-util was correctly listing partitions but failed to found a device
when trying to update a partition that is still in runtime mode.

Jules

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

  reply	other threads:[~2020-03-30  9:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2020-03-31  5:13 ` [PATCH v2 0/4] usb: gadget: dfu: Fix timeout on erase when using big partition Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200330091331.y6jau77fimagy2ig@tellis.lin.mbt.kalray.eu \
    --to=jmaselbas@kalray.eu \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox