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 421CDC77B7C for ; Mon, 1 May 2023 21:19:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0E9B2862E8; Mon, 1 May 2023 23:18:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="AwiovFUU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D2152862E8; Mon, 1 May 2023 23:18:56 +0200 (CEST) Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3CB6E8625C for ; Mon, 1 May 2023 23:18:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-55a14807e4cso33362747b3.1 for ; Mon, 01 May 2023 14:18:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1682975933; x=1685567933; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Aco7+nKzJfwxftbp1PjKbGFw1HkFzI3YE2Vas1+W8Pc=; b=AwiovFUU4WyzzoS5fTOLwvA8r8j05taw/BcmLgQEqKsqZKDEs8m3jhOiGqvxEoB7H+ NgNtwmHZ8POlQxZgTdyXiAoIDi3TZ1ZgwwLsb+Br7dc2rLXIKbVmJgn++rNO4kHEjkZa Th3s4OCHuBuxslNiesTm7Zg6M7ahSpP3+0Ccg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682975933; x=1685567933; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Aco7+nKzJfwxftbp1PjKbGFw1HkFzI3YE2Vas1+W8Pc=; b=gxWtDsba8sfghamtE3c+rQJDklha972kLK7ajSXxCapo3BDXOfqziVqe/wXJeH8uI4 Kx8+VXTkrsngG9lW+u/Mh3ZfZsuv8mAzQwIZ4Zj+7wD03DMBiehacxrr6HddLKUhu55+ Xz2nKaaeHG0s6ErtnOTASDUEs2vmHz7g9Bz2TS6x1Jg0bZas9p6luwAHecxikj78dhQK rzOX6DRXf0VVkbMdqVsDtID9gHXvSjKF4g/T7iIt/Xzgo+sl+P8XuPohQ4JI3H+zDmm2 FKAyz67X7KUCtvCMLePiX+mMx64mdjU7SBJlFbQT+uqJFS/dogpGqIeuunQBS02pwoZv Bhdw== X-Gm-Message-State: AC+VfDxvveZxlv2tJhJ4UB4PvwcdBWiuIXP43yje7oBpNyyRvcPLc/O0 labVg45WyHpnVwcKm/Rgl3OE6A== X-Google-Smtp-Source: ACHHUZ7QQXLi2TiigthzQTVz/7XIdUipmzOunt53EsZG1upCxVjrUifSsc7YEtyQEAaLht6OZ+tUMQ== X-Received: by 2002:a81:4654:0:b0:556:c776:96a2 with SMTP id t81-20020a814654000000b00556c77696a2mr13045284ywa.44.1682975932793; Mon, 01 May 2023 14:18:52 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-8ea4-e068-797c-a854.res6.spectrum.com. [2603:6081:7b00:6400:8ea4:e068:797c:a854]) by smtp.gmail.com with ESMTPSA id u188-20020a8160c5000000b00556aa81f615sm4967903ywb.68.2023.05.01.14.18.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 May 2023 14:18:52 -0700 (PDT) Date: Mon, 1 May 2023 17:18:49 -0400 From: Tom Rini To: Marek Vasut Cc: u-boot@lists.denx.de, Lukasz Majewski Subject: Re: [PATCH] usb: gadget: Compile USB ethernet gadget only if NET is enabled Message-ID: <20230501211849.GH1134230@bill-the-cat> References: <20230430212035.379838-1-marex@denx.de> <20230501134756.GX1134230@bill-the-cat> <20230501172333.GE1134230@bill-the-cat> <9eef63ed-ccdd-77bf-8255-b5c8a19dad41@denx.de> <20230501185348.GF1134230@bill-the-cat> <8bcea380-94ec-db01-254f-e2f41d4aa4b9@denx.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="P/GOFQcFt8soDtnH" Content-Disposition: inline In-Reply-To: <8bcea380-94ec-db01-254f-e2f41d4aa4b9@denx.de> X-Clacks-Overhead: GNU Terry Pratchett 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 --P/GOFQcFt8soDtnH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 01, 2023 at 10:49:37PM +0200, Marek Vasut wrote: > On 5/1/23 20:53, Tom Rini wrote: > > On Mon, May 01, 2023 at 07:40:57PM +0200, Marek Vasut wrote: > > > On 5/1/23 19:23, Tom Rini wrote: > > > > On Mon, May 01, 2023 at 06:53:52PM +0200, Marek Vasut wrote: > > > > > On 5/1/23 15:47, Tom Rini wrote: > > > > > > On Sun, Apr 30, 2023 at 11:20:35PM +0200, Marek Vasut wrote: > > > > > >=20 > > > > > > > In case NET networking is not enabled, it is not possible to = compile > > > > > > > the USB ethernet gadget. Protect the symbols in Makefile to a= void build > > > > > > > failure. Such build failure may occur e.g. in case NET and US= B ethernet > > > > > > > gadget is enabled in U-Boot proper, but not in SPL. > > > > > > >=20 > > > > > > > Signed-off-by: Marek Vasut > > > > > > > --- > > > > > > > Cc: Lukasz Majewski > > > > > > > --- > > > > > > > drivers/usb/gadget/Makefile | 2 ++ > > > > > > > 1 file changed, 2 insertions(+) > > > > > > >=20 > > > > > > > diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget= /Makefile > > > > > > > index 6cfe0f3a041..36f65e7eb95 100644 > > > > > > > --- a/drivers/usb/gadget/Makefile > > > > > > > +++ b/drivers/usb/gadget/Makefile > > > > > > > @@ -34,8 +34,10 @@ endif > > > > > > > obj-$(CONFIG_CI_UDC) +=3D ci_udc.o > > > > > > > +ifeq ($(CONFIG_$(SPL_TPL_)NET),y) > > > > > > > obj-$(CONFIG_USB_ETHER) +=3D ether.o > > > > > > > obj-$(CONFIG_USB_ETH_RNDIS) +=3D rndis.o > > > > > > > +endif > > > > > > > # Devices not related to the new gadget layer depend on C= ONFIG_USB_DEVICE > > > > > > > # This is really only N900 and USBTTY now. > > > > > >=20 > > > > > > Why can't we just enforce this via Kconfig? > > > > >=20 > > > > > Because there is no SPL/TPL USB_ETHER Kconfig . > > > > > Do we want to grow the Kconfig file with those instead ? > > > >=20 > > > > Ah right. Yes, we have SPL_USB_ETHER today > > >=20 > > > This is exactly the opposite of what I wrote. > > >=20 > > > And no, we do NOT have this symbol, see: > > >=20 > > > $ git grep SPL_USB_ETHER drivers/usb | wc -l > > > 0 > >=20 > > Yes, it resides in common/spl/Kconfig >=20 > Uhhhhh, such USB symbol is not supposed to be there in the first place. There's long running debate on where some symbols should be for a better overall experience of enabling features. > However, looking at the meaning of that symbol, it seems it governs > something else -- USB ethernet device(s) (like the USB-ethernet adapter > which you plug into USB host port). So, the SPL_USB_ETHER symbol name is > incorrectly named too and should be renamed to something else first I thi= nk > ? >=20 > Do I read it right ? >=20 > And if so, then, back to my original reply -- there is no SPL_USB_ETHER > symbol. Does it make more sense to really add one (not misnamed one) or n= ot > ? We should re-work things as needed so that we have more Kconfig symbols, as needed. There's some overlap / overloading of things today as platforms have been able to (and I think am335x_evm is still one that builds for) supporting making a USB RNDIS gadget device happen in SPL, so that we can then be fed the next stage of U-Boot. --=20 Tom --P/GOFQcFt8soDtnH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmRQLLIACgkQFHw5/5Y0 tywGiwwAgJeQ/ZjtSU0A1gXpaKilyKB/gWdoBw6L+7brr5szVecd5gwEIzfOULs/ jmXgFocGg8O2RXnKKMKPKHcPe3yJ+o/WrXVq0oml903eh8GGwyDvMywCKQVYTuga /CdE/uB66Nq7pu+HCcCgpv+MODxN2mAwp56kyBbodH/a/KWLoJoqZpIEMs07ewV0 KwKb+KW6NMjNYUet4iNPEIvkFCagyfXKtFo1GgUy76BRctAjxgrZ5yHAOuJXjBIM OfM05djELZFMhl4IQzfO67Kv8QRBZp+nYuAe494VFxUh/0N9PExyleMoLUrbMGYX MmBGBdywcGPZgv+NR0HlqIM7rG3sVE8VixOP/BP1jbyJzluYRRd4061/Ta+VD5Ym eTZyclvpKhHzLeyhTeU5hH0abntcvevLLa+5y9krMx/kQcy+RBcsw9rPvKF/nU6u qm8iOohhjgT6jLGFXDeVrAXpVmss12yQBJxxGqzT/ePWr1mpGkDoEX+wRdbcH2s9 sctsmr8Z =hfp3 -----END PGP SIGNATURE----- --P/GOFQcFt8soDtnH--