Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5076508iob; Mon, 9 May 2022 08:09:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+3i00A4di0chSxQiYwUH093WT3tOyBlgHTeXp8enl1GmpDZ4djynCNY9S3Ea2is/H1/gT X-Received: by 2002:a17:90b:1a8c:b0:1dc:1c62:2c0c with SMTP id ng12-20020a17090b1a8c00b001dc1c622c0cmr26901394pjb.140.1652108979597; Mon, 09 May 2022 08:09:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652108979; cv=none; d=google.com; s=arc-20160816; b=nEc4TunHwaRD1jqps7VmmKNW4Y5p4ExfFALFVCpJljJBAMj+gjlvaWG25DnT4+1rXQ EFGjoH9YpDddl03zfVojzVLxJpXyetuMRrFS2s0D+wOcJ9ko1bj/vGmTI0PVa9xhYNt7 jZm1jn3D0hnzZ+B7H1MO1c9ypEJGeVbjxhj0yDG9ak3IRwVEULry7xRyIpQeM95qn8XV 2DVqUJPllRwse2UGVLHwaI3ljwgsp3//1Jdpy5IQj6AxTL4cFB5xKPpFv9xiWn2qqQxF y1FHCnnIM7qaI7D2Wnr6ZHWH7la2VTyXCq+EuMGwNgQ2MUxzqutxbopfQ4T3g43eRGbR jzgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=bRQlyo4XmqR1nolS7NgdQ7DzPsKW9tCvdhHjutfYHJA=; b=q7jBRhBSjnuZtQPM35jBDKxvfOgEFFoWuwEI05DS7rgpY29YInf0IC66Hm7avm8Dj/ +RM6Cq8aU733315MPZGtuXdPje6mDMZ1nOA1GwYVOKobRRHZhAV0SklR1QID1Wd6tt0v JNsqynx6+HSwjf48uMkrYe3h1WqjVyvag8Z5Lr+CmKpOwT9TzUawe6UI2tK5GiYexGLM lPR347EHV/ovitI7FJA3f3aUD9C33RsjbG0zzg+s1JzBHqIeGTV+RBbjj/EqE+Y0ayhb Fe+FzHaZM6xxRaQ7I0TfJVTmQ8jhDdgSiN0RNGh3ami63Ngbwiee7pbUBHopNYXJ9P/g 8bNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id w5-20020a170902d70500b00158dd229950si11488975ply.573.2022.05.09.08.09.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 08:09:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 79A2D24BB22; Mon, 9 May 2022 08:05:21 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237922AbiEIPJH (ORCPT + 99 others); Mon, 9 May 2022 11:09:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237917AbiEIPJB (ORCPT ); Mon, 9 May 2022 11:09:01 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id A4BCE201E8E for ; Mon, 9 May 2022 08:05:07 -0700 (PDT) Received: (qmail 126511 invoked by uid 1000); 9 May 2022 11:05:06 -0400 Date: Mon, 9 May 2022 11:05:06 -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: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 09, 2022 at 04:42:01PM +0200, Geert Uytterhoeven wrote: > Hi Alan, > > On Mon, May 9, 2022 at 4:15 PM Alan Stern wrote: > > 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? > > Oh, you mean the "gadget.N" subdirs, which are the targets of the > symlinks above? These were indeed named "gadget" before. > > Would it be possible to append the ".N" suffixes only to the actual > symlinks, while keeping the target directory names unchanged? > E.g. /sys/bus/gadget/devices/gadget.0 -> > ../../../devices/platform/soc/e659c000.usb/gadget No, it's not possible. Or at least, not without significant changes to the driver core. Besides, people expect these names to be the same. Alan Stern