public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Marek Vasut <marex@denx.de>
Cc: u-boot@lists.denx.de, Kevin Hilman <khilman@baylibre.com>,
	Lukasz Majewski <lukma@denx.de>, Simon Glass <sjg@chromium.org>
Subject: Re: [PATCH v3 1/4] cmd: bind: Add unbind command with driver filter
Date: Mon, 31 Jul 2023 15:36:07 +0200	[thread overview]
Message-ID: <20230731153607.6210e92f@xps-13> (raw)
In-Reply-To: <b9dcd42c-83bb-e9db-6285-fabce159d82f@denx.de>

Hi Marek,

marex@denx.de wrote on Mon, 31 Jul 2023 13:44:25 +0200:

> On 7/31/23 11:31, Miquel Raynal wrote:
> > Hi Marek,
> > 
> > marex@denx.de wrote on Sat, 29 Jul 2023 16:57:09 +0200:
> >   
> >> Extend the driver core to perform lookup by both OF node and driver
> >> bound to the node. Use this to look up specific device instances to
> >> unbind from nodes in the unbind command. One example where this is
> >> needed is USB peripheral controller, which may have multiple gadget
> >> drivers bound to it. The unbind command has to select that specific
> >> gadget driver instance to unbind from the controller, not unbind the
> >> controller driver itself from the controller.
> >>
> >> USB ethernet gadget usage looks as follows with this change. Notice
> >> the extra 'usb_ether' addition in the 'unbind' command at the end.
> >> "
> >> bind /soc/usb-otg@49000000 usb_ether
> >> setenv ethact usb_ether
> >> setenv loadaddr 0xc2000000
> >> setenv ipaddr 10.0.0.2
> >> setenv serverip 10.0.0.1
> >> setenv netmask 255.255.255.0
> >> tftpboot 0xc2000000 10.0.0.1:test.file
> >> unbind /soc/usb-otg@49000000 usb_ether
> >> "
> >>
> >> Signed-off-by: Marek Vasut <marex@denx.de>
> >> ---  
> > 
> > I am no longer getting wrong pointer dereferences, the SPL is working in
> > recovery mode, TFTP "File not found" errors are no longer a problem and
> > I did not experience any reset while tftp'ing regular files.
> > 
> > One last remaining request on my side is the need for using fastboot as
> > well which does no longer work as-is:
> >   
> > => fastboot usb 0  
> > couldn't find an available UDC
> > g_dnl_register: failed!, error: -19
> > exit not allowed from main input shell.
> > 
> > Can you advise what bind/unbind command would be necessary here?  
> 
> Either 'unbind usb_ether' or run 'dm tree' -> look up the path to usb_ether in the tree (it will be hanging under usb_peripheral or some such), and then use 'unbind <that path>'.

Nice `dm tree` command, never used it before.

Even when I unbind usb_ether I still get the same error:

=> unbind /ocp/usb@47400000/usb@47401000
=> fastboot usb 0
couldn't find an available UDC
g_dnl_register: failed!, error: -19
exit not allowed from main input shell.

Is there a specific gadget driver which I should bind again manually?

Thanks,
Miquèl

  reply	other threads:[~2023-07-31 13:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-29 14:57 [PATCH v3 1/4] cmd: bind: Add unbind command with driver filter Marek Vasut
2023-07-29 14:57 ` [PATCH v3 2/4] usb: gadget: ether: Inline functions used once Marek Vasut
2023-07-29 14:57 ` [PATCH v3 3/4] usb: gadget: ether: Move probe function above driver structure Marek Vasut
2023-07-29 14:57 ` [PATCH v3 4/4] usb: gadget: ether: Handle gadget driver registration in probe and remove Marek Vasut
2023-07-31  9:31 ` [PATCH v3 1/4] cmd: bind: Add unbind command with driver filter Miquel Raynal
2023-07-31 11:44   ` Marek Vasut
2023-07-31 13:36     ` Miquel Raynal [this message]
2023-07-31 13:50       ` Marek Vasut
2023-07-31 13:58         ` Miquel Raynal
2023-07-31 14:08           ` Marek Vasut
2023-07-31 14:25             ` Miquel Raynal
2023-07-31 14:40               ` Marek Vasut
2023-08-01 18:53                 ` Miquel Raynal
2023-08-01 23:07                   ` Marek Vasut
2023-08-02  7:48                     ` Miquel Raynal
2023-08-02 14:38                       ` Marek Vasut
2023-08-02 14:42                         ` Miquel Raynal

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=20230731153607.6210e92f@xps-13 \
    --to=miquel.raynal@bootlin.com \
    --cc=khilman@baylibre.com \
    --cc=lukma@denx.de \
    --cc=marex@denx.de \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.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