From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0F5BDC001DF for ; Mon, 31 Jul 2023 13:36:16 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2FC618690D; Mon, 31 Jul 2023 15:36:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=bootlin.com header.i=@bootlin.com header.b="XAXZr2cX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 74EC7866F4; Mon, 31 Jul 2023 15:36:13 +0200 (CEST) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D4A0C86A6A for ; Mon, 31 Jul 2023 15:36:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=miquel.raynal@bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 9E4E620009; Mon, 31 Jul 2023 13:36:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1690810569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NxnnsN6bQqGmGfd1qGMZ1ZtGP846zT0tZpN7DTSDpJQ=; b=XAXZr2cXT5BCxCPrjS8OZU+hzI24A7WGCx289GHUiRoSXROpgGuiLp0iumAEKoEgStwqN1 PbiTwmreT9ul6Apj0R+0aeVmyrctI6+L0uM1L9ZTY8ECF9UVIbpMND4cEb/AAwasrAQBXd b3SQRoxvGtYhMd1DUnZVQN5XhMajv0TXZyIpU8VGj2nxaetJZAr2kNXZ6xM5sgbWMvy7KZ WlwUw+6GYQUdSOkewNBXGDRAQc/yd0+uDIaopiS99lWfu59WdvcuiGY3jrUlpVNl/LbfW5 7SJpzpK67mAxUewaqes1sDAqVi+2kyi1OXCVM29BL/DBF5kojurNUP02QEwGJw== Date: Mon, 31 Jul 2023 15:36:07 +0200 From: Miquel Raynal To: Marek Vasut Cc: u-boot@lists.denx.de, Kevin Hilman , Lukasz Majewski , Simon Glass Subject: Re: [PATCH v3 1/4] cmd: bind: Add unbind command with driver filter Message-ID: <20230731153607.6210e92f@xps-13> In-Reply-To: References: <20230729145712.213945-1-marex@denx.de> <20230731113159.26e710aa@xps-13> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean 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, > >=20 > > marex@denx.de wrote on Sat, 29 Jul 2023 16:57:09 +0200: > > =20 > >> 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 > >> --- =20 > >=20 > > 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. > >=20 > > One last remaining request on my side is the need for using fastboot as > > well which does no longer work as-is: > > =20 > > =3D> fastboot usb 0 =20 > > couldn't find an available UDC > > g_dnl_register: failed!, error: -19 > > exit not allowed from main input shell. > >=20 > > Can you advise what bind/unbind command would be necessary here? =20 >=20 > Either 'unbind usb_ether' or run 'dm tree' -> look up the path to usb_eth= er in the tree (it will be hanging under usb_peripheral or some such), and = then use 'unbind '. Nice `dm tree` command, never used it before. Even when I unbind usb_ether I still get the same error: =3D> unbind /ocp/usb@47400000/usb@47401000 =3D> 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=C3=A8l