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 19DFBC001DB for ; Fri, 4 Aug 2023 17:46:46 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1871C8691E; Fri, 4 Aug 2023 19:46:45 +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="I0yG6q7B"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EDE4586894; Fri, 4 Aug 2023 19:46:43 +0200 (CEST) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (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 D46EC8691E for ; Fri, 4 Aug 2023 19:46:40 +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 C7A8E240007; Fri, 4 Aug 2023 17:46:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1691171200; 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=uUXgJySEAhINgXbtoPCjkT0GdB+uyw3+PKm8SbbXKsM=; b=I0yG6q7Bz5URdCegxj8rovkCTtzUtIYT2xwbJa+SS4n8uAi75cH7yR9R9ek7CZeNAD+3df 3T0rmDbapcs6lAHdK4zv4ObmQrsISVToZhAfF+vTNIoA39Iw253Xu5PsAA9S2PsyeoVqCI eWiaym6ducce+3OG5d3cKceBph0UqYLJdRpjR9JIKNSU6C7vj1CIyN4dwzRAEywi6g9vWm VuQip18YUCqstcCCcqEDBOtCfN1Dnh8qkj6jR3iKaa8AZpJG4zoOZZ6JPUhVzx+KmWYuya 3rvtouaz0yCu2Oq1qY5enZO9CfaxJm/d+LQHuhEALzKRJ5FCSHJ0OyD2ST21PA== Date: Fri, 4 Aug 2023 19:46:38 +0200 From: Miquel Raynal To: Marek Vasut Cc: Tom Rini , 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: <20230804194638.21128f5e@xps-13> In-Reply-To: <72e90424-fadc-7213-7af9-2aace3577ff9@denx.de> 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> <20230804192409.45e650f8@xps-13> <72e90424-fadc-7213-7af9-2aace3577ff9@denx.de> 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 Fri, 4 Aug 2023 19:31:50 +0200: > On 8/4/23 19:24, Miquel Raynal wrote: >=20 > Hi, >=20 > >>>>>>> exit not allowed from main input shell. =20 > >>>>>>> =3D> unbind /ocp/usb@47400000/usb@47401000 usb_ether =20 > >>>>>> > >>>>>> Does =20 > >>>>>> >>>> =3D> unbind ethernet 0 =20 > >>>>>> > >>>>>> work ? > >>>>>> > >>>>>> If so, 1/4 in this series can be skipped altogether. > >>>>>> > >>>>>> You likely won't even need the rebinding of ti-musb-peripheral any= more. =20 > >> > >> Did you test this yet ? =20 > >=20 > > Unfortunately it does not work. Indeed it would be much simpler than > > using the node path. Any idea why? =20 >=20 > Since you provided literally zero information, no. >=20 > Console log would be a good starting point. Here it is, the unbind command itself does not complain has it seems to catch the regular Ethernet controller (there is one in the SoC, but it is not wired on the board). So the first time it does nothing, but the second time it works as the USB gadget get dropped! And after the second call, fastboot works without the bind call. =3D> dm tree misc 0 [ + ] ti-musb-wrapper | |-- usb@47400000 usb 0 [ + ] ti-musb-peripheral | | |-- usb@47401000 ethernet 1 [ + ] usb_ether | | | `-- usb_ether bootdev 3 [ ] eth_bootdev | | | `-- usb_eth= er.bootdev usb 0 [ ] ti-musb-host | | `-- usb@47401800 ethernet 0 [ + ] eth_cpsw | |-- ethernet@4a100000 bootdev 2 [ ] eth_bootdev | | `-- ethernet@4a1000= 00.bootdev =3D> unbind ethernet 0 =3D> dm tree misc 0 [ + ] ti-musb-wrapper | |-- usb@47400000 usb 0 [ + ] ti-musb-peripheral | | |-- usb@47401000 ethernet 0 [ + ] usb_ether | | | `-- usb_ether bootdev 2 [ ] eth_bootdev | | | `-- usb_eth= er.bootdev usb 0 [ ] ti-musb-host | | `-- usb@47401800 =3D> unbind ethernet 0 =3D> dm tree misc 0 [ + ] ti-musb-wrapper | |-- usb@47400000 usb 0 [ ] ti-musb-peripheral | | |-- usb@47401000 usb 0 [ ] ti-musb-host | | `-- usb@47401800 So actually the unbind works, but was not targeting the right controller, because it's listed as the second Ethernet controller on this board. Hence this actually works: =3D> unbind ethernet 1 =3D> fastboot usb 0 \o/ Thanks, Miqu=C3=A8l