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 15A58C001DE for ; Fri, 4 Aug 2023 17:04:39 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2175F86915; Fri, 4 Aug 2023 19:04:37 +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="dQV5Zy0M"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 66BC186930; Fri, 4 Aug 2023 19:04:36 +0200 (CEST) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::225]) (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 5EBCC868D9 for ; Fri, 4 Aug 2023 19:04:34 +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 EDFD11C0006; Fri, 4 Aug 2023 17:04:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1691168674; 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=j3nxM/QSFM8agyxVJT0kZ6UNAIX5XuYYOt/Zh8lAx2k=; b=dQV5Zy0M4Z5mGvZwpLPEG1XOtdjWwU96qr3+ZVH8xg2fPvUQAGoc2Z2qoKJToVMCL0HFuo I9th+k/4roE2rceluGMDoDh5YIN+BNFACR/44gUsijLnIdZQny3d/3EhWMyIqadWi6QEOn J08orptMlpDEK8bzXdultnlWc2RoFcONUi7egIb4zmgjMB/dFvlKbHvpPtqJq6Xgt8+C3Y xPyY3Uw/rKwVSsqPDUPrvQLW6jcEyBpsKYwfXGZglgm8EKAzjML1BX8IpThw4gmZVgL0ao ShvxHz4Azk/Ups1E1nL5gDexUBxMs+YOcMS/GiXpbsg7Fz3DhJ2ebElTHLerlA== Date: Fri, 4 Aug 2023 19:04:31 +0200 From: Miquel Raynal To: Tom Rini Cc: Marek Vasut , u-boot@lists.denx.de, Kevin Hilman , Lukasz Majewski , Simon Glass Subject: Re: [PATCH v4 1/4] cmd: bind: Add unbind command with driver filter Message-ID: <20230804190431.6f21efd8@xps-13> In-Reply-To: <20230804163757.GS3630934@bill-the-cat> References: <20230802124657.31184-1-marex@denx.de> <20230804090028.70aa780d@xps-13> <4833722f-18ab-e885-291a-988115fe39f8@denx.de> <20230804150100.GN3630934@bill-the-cat> <8902cf54-acba-cfb4-571b-09ba807e7a89@denx.de> <20230804171206.07faade4@xps-13> <0eb7f3fe-42da-6252-3b77-50eb3276f2ee@denx.de> <20230804180012.79c4f9ec@xps-13> <20230804163757.GS3630934@bill-the-cat> 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 Tom, > > > >>>>> Cannot find a device with path /ocp/usb@47400000/usb@47401000 = =20 > > > >>>>> =3D> unbind /ocp/usb@47400000/usb@47401000 > > > >>>>> =3D> dm tree =20 > > > >>>>> misc 0 [ + ] ti-musb-wrapper | |-- usb@= 47400000 > > > >>>>> usb 0 [ ] ti-musb-host | | `-- = usb@47401800 =20 > > > >>>>> =3D> fastboot usb 0 > > > >>>>> =3D> bind /ocp/usb@47400000/usb@47401000 ti-musb-peripheral > > > >>>>> =3D> dm tree =20 > > > >>>>> misc 0 [ + ] ti-musb-wrapper | |-- usb@= 47400000 > > > >>>>> usb 0 [ ] ti-musb-host | | |-- = usb@47401800 > > > >>>>> usb 0 [ ] ti-musb-peripheral | | `-- = usb@47401000 =20 > > > >>>>> =3D> fastboot usb 0 =20 > > > >>>>> musb-hdrc: peripheral reset irq lost! > > > >>>>> # works! (the irq-related line above as always been there) > > > >>>>> > > > >>>>> So now, how do we make this process easy/understandable? =20 > > > >>>> > > > >>>> What would be your proposal ? =20 > > > >=20 > > > > At least I would appreciate: > > > > - to select CMD_BIND "by default" when relevant > > > > - to make the fastboot error more readable for the regular user = =20 > > >=20 > > > Since with this 'unbind ethernet 0' this is orthogonal to this series= , send separate patches, thanks. =20 > >=20 > > This is not orthogonal, I am sorry. > >=20 > > version X: > > - tftp works "out of the box" > > - fastboot works "out of the box" > > version X+1: > > - tftp works "out of the box" > > - fastboot returns an obscure error > >=20 > > 1/ If we now *need* the bind/unbind commands, the series must take care > > of it. > > 2/ Without proper error message you just break fastboot for most > > regular users (basically everyone but few U-Boot devs). =20 >=20 > You're missing the class of users that will be impacted here. In order > for there to be a change here, you have to already be in the case where > you have CONFIG_USB_ETHER=3Dy and gadget ethernet device isn't just > enabled but also initialized by default by calling usb_ether_init(). > That's a very small list. It's basically am33xx, two mediatek reference > platforms and xilinx_zynqmp_virt. Given that am33xx defconfigs also > setup DFU, I'm not really sure just how many people use gadget ethernet. > The normal flow on modern devices is to be calling bind/unbind here > already. Can we make this behavior explicit to the user? I am sorry, maybe it is the normal flow for you, but I am a regular U-Boot user and I totally missed that requirement. Typical situation: one needs to use but none is bound to the UDC (or another is bound), could we make the error messages more explicit if we decide not to unbind/bind the right one automatically because it is too "costly"? Thanks, Miqu=C3=A8l