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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1450EC4332F for ; Mon, 9 May 2022 14:15:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236931AbiEIOS5 (ORCPT ); Mon, 9 May 2022 10:18:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237012AbiEIOS4 (ORCPT ); Mon, 9 May 2022 10:18:56 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 48DB32B275D for ; Mon, 9 May 2022 07:15:02 -0700 (PDT) Received: (qmail 124832 invoked by uid 1000); 9 May 2022 10:15:01 -0400 Date: Mon, 9 May 2022 10:15:01 -0400 From: Alan Stern To: Geert Uytterhoeven Cc: Felipe Balbi , Greg KH , USB mailing list , Linux-Renesas , Linux Kernel Mailing List , Yoshihiro Shimoda Subject: Re: [PATCH 4/4] USB: gadget: Add a new bus for gadgets Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Mon, May 09, 2022 at 09:46:25AM +0200, Geert Uytterhoeven wrote: > > Geert: > > > > Can you test the patch below? It ought to fix the problem (although it > > Thanks! > > root@h3-salvator-xs:~# ls -l /sys/bus/gadget/devices/ > total 0 > lrwxrwxrwx 1 root root 0 Feb 14 2019 gadget.0 -> > ../../../devices/platform/soc/e659c000.usb/gadget.0 > lrwxrwxrwx 1 root root 0 Feb 14 2019 gadget.1 -> > ../../../devices/platform/soc/ee020000.usb/gadget.1 > lrwxrwxrwx 1 root root 0 Feb 14 2019 gadget.2 -> > ../../../devices/platform/soc/e6590000.usb/gadget.2 > > Tested-by: Geert Uytterhoeven > > LGTM, so > Reviewed-by: Geert Uytterhoeven Thanks! > > might end up causing other problems down the line...) > > Can you please elaborate? I'm not too familiar with UBS gadgets. I was concerned about the fact that changing the name of a file, directory, or symbolic link in sysfs means changing a user API, and so it might cause some existing programs to fail. That would be a regression. Perhaps the best way to work around the problem is to leave the name set to "gadget" if the ID number is 0, while adding the ID number on to the name if the value is > 0. What do you think? Alan Stern