Received: by 10.192.165.148 with SMTP id m20csp4221512imm; Mon, 30 Apr 2018 14:09:24 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqd/5Lg0UvBH3TdRXsJxkK+Z74rffkzV/oJn803CUJSAV07Q+Uc4NmaWA6Ufuj5YnwMXAq7 X-Received: by 2002:a17:902:9686:: with SMTP id n6-v6mr13473648plp.136.1525122564342; Mon, 30 Apr 2018 14:09:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525122564; cv=none; d=google.com; s=arc-20160816; b=ubgTYaVyWvBoknV/GAQ56iIoxXzDPfMzagSPlnRl+2Fvd/tuUqwSKUG4VGuKWKqqKF +BQOKLMlK9/x0iQt6Cg0xcy3ugVuGdKS4YiLulB5/wnQFGGmcs90jt5h6cLFi0tMVJAH EXtA87YBkFGODURgVwCvJpWNZniaPy5RT/r1ugQ+DjxbRU7hiWC9CsYbcSgfn7pWXXtf f8pIb4/wHD0aBN7llxXEcefnETZ/TLSP8OjbzZyTo/pG30KfrrK4bc0pK6e29iTiQ27P d5tan3nmJIPr/8/8GfnSKlGIDDZHMsVO3gHBKS5nwWyDBKdHbMYylP2pmCJ2Frgvpb/K ubmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to:date :cc:to:from:subject:message-id:arc-authentication-results; bh=4OZ8g7F+Av2N6tkT07lIpcrzfeSa6XJjOVCen5HL+Is=; b=TL0Y1Cw+ENc3G7m/EALHaWLKI4dE20lRhSGhutb/x/v5VKPB0HW9fhxJ4lk+qaCuMr b07FKtw5Hw487mTPiVKDRBVQC6FlvpUXWAoy3lFO1Z4+HuXOj+jDmsqi8HharBEZm+L3 MsmsYbTgF7Jb3zZ1OYIV3MLVnvNaX/zB+4ma3lXMPwoUc3fW1W6jDfVpOBplU+ut/Ifs VOYWGHy/eaWAnfq/OGn6WhC4PYEbJ7DUmYTiOKKDZ8Nep09gPxfCyaxIBzJIPp99EHXp JLbQx3NMp2lzrncboxG6Z3e0UHL9gMWizm74TL0isohyYUm1AI9HYMM4eLeLE0rCWiu5 Oiiw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 90-v6si8203489plf.340.2018.04.30.14.09.08; Mon, 30 Apr 2018 14:09:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755214AbeD3VIw (ORCPT + 99 others); Mon, 30 Apr 2018 17:08:52 -0400 Received: from leonov.paulk.fr ([185.233.101.22]:42120 "EHLO leonov.paulk.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753522AbeD3VIu (ORCPT ); Mon, 30 Apr 2018 17:08:50 -0400 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id CFDCAC0000; Mon, 30 Apr 2018 23:08:48 +0200 (CEST) Received: by gagarine.paulk.fr (Postfix, from userid 114) id C2EE6C0D5C; Mon, 30 Apr 2018 23:08:47 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on gagarine.paulk.fr X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT autolearn=disabled version=3.4.1 Received: from collins (unknown [192.168.1.1]) by gagarine.paulk.fr (Postfix) with ESMTPSA id 44323C0D47; Mon, 30 Apr 2018 23:08:44 +0200 (CEST) Message-ID: Subject: Re: [PATCH] usb: musb: Support gadget mode when the port is set to dual role From: Paul Kocialkowski To: Bin Liu Cc: Paul Kocialkowski , Maxime Ripard , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Greg Kroah-Hartman , Chen-Yu Tsai Date: Mon, 30 Apr 2018 23:08:42 +0200 In-Reply-To: <20180421143426.GA10632@LTA0271908.dhcp.ti.com> References: <20180328215213.29538-1-contact@paulk.fr> <20180329092326.dayuccomq5zrywqo@flea> <1522324644.1746.19.camel@bootlin.com> <20180420142524.GB29011@uda0271908> <2db056d6f65ecbcdc4f31a37fe2e1b1ddfb93c87.camel@paulk.fr> <20180421143426.GA10632@LTA0271908.dhcp.ti.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-5NtbenmJn7WABbHNuZ0P" X-Mailer: Evolution 3.28.1 Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-5NtbenmJn7WABbHNuZ0P Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Le samedi 21 avril 2018 =C3=A0 09:34 -0500, Bin Liu a =C3=A9crit : > Okay, this came down to an argument that whether we should require > loading a gadget driver on a dual-role port to work in host mode, > which is currently required on musb since a long long time ago. >=20 > I understand the requirement is kinda unnecessary, but since it > already > exists on musb stack for a long time, I don't plan to change it. > Because I > cannot think of a use case in real products that doesn't automatically > load a gadget function on the dual-role port. >=20 > If you can explain a use case in real world (not a engineering lab) > that the gadget driver will not be loaded at linux booting up, but > later based on user's input, I will reconsider my decision. To remove > this requirement from musb stack, the work is more than this patch. My use case here is to support common GNU/Linux-based distributions, not use-case-specific varieties of GNU/Linux-based rootfs. So my point here would be that most distros will (and probably should) ship g_ether as a module but without any particular reason to autoload it, or any other gadget module in particular, since the system is general-purpose. Then, imagine a user wants to plug a USB device through OTG (say, because it's the only USB port available at all on the tablet they're using), it simply won't work. It won't be obvious to that user that this is because no gadget is loaded, since what they want to do does not involve using gadget mode at any point. Do you think this is a valid use case? It surely is a common one and perfectly depicts my situation. Note that in addition to Allwinner devices, I also have omap3/4/5 devices for testing things. I don't think I have other MUSB-enabled devices in my collection though, but I would be willing to test fixes to this issue on the ones I have. Cheers, --=20 Paul Kocialkowski, developer of free digital technology and hardware support. Website: https://www.paulk.fr/ Coding blog: https://code.paulk.fr/ Git repositories: https://git.paulk.fr/ https://git.code.paulk.fr/ --=-5NtbenmJn7WABbHNuZ0P Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEAbcMXZQMtj1fphLChP3B6o/ulQwFAlrnhdsACgkQhP3B6o/u lQxOIA//flqKQ30a/MiSGkr4vZSWWEoJsfcgxCC0w7J2Z41vtVBHZXh5mD/36uDn k1D9uV8+QeJ45kZRPg0auqgENlu9hK/5EszhTYZt+nIIlVR2/wRTslidJQ9T758j IsyNsUkaiVHFVGs/h/GORIHd4Mes1V4y/wPg14eBj/JAm0JirQTFVaJ8Are262HR +FFCMgW0lkAwNTpC2+MFIMkbEdHPy8LKr6wVLFqIJ0skziBE49GQvep31u/43PmO CEgf4YLYb/DQjk/uKJUfDuUNRPlh/MPcEzErDwBW1gLjnbOh74UTeoFGrZwHv+mk 6ay52VefGcwnY2s81LA78GpVCPpU9hM1173BUDgtzHnD6VoQwz7AvELNDdg4iXbs l+AXBmomfkQr/7dkk2GVtUwZxTHkwxSd6W2uzB2nPCxH5kYXDDElaLrDUU1ORszP WJDb804pbXO7I/oDeO2mStfHhxV/6hY8vcSqik8ZOANrzyjeM1bXXcMxIr/ORsPc jd0jioyI7e6BlbLCMmLWcCfjbrZp2wLuXVXGGx9DIMmDs2+IVXT6myx+k8WYflgB VCmxWv77hAmHm+rUTyg0X9LiVAycGDvxGYNgG5RBYEvzHGrhnLo6Hna2iEP4j8X9 IUtEgmRpcLbQi6G2Qlp4heuYYRP+rX5XquZtHWkp1mQ6Cc6pHtE= =rkAO -----END PGP SIGNATURE----- --=-5NtbenmJn7WABbHNuZ0P--