Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5162747iob; Mon, 9 May 2022 09:55:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBtvayOsJ0hGsLFE6SiDTR+N1+Ss6zfBIzujuMDcjZQM0nMylObVeNefP1JRF9Lqs+C62y X-Received: by 2002:a05:6830:33d0:b0:5cf:bb0a:6d4a with SMTP id q16-20020a05683033d000b005cfbb0a6d4amr6232227ott.28.1652115358992; Mon, 09 May 2022 09:55:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652115358; cv=none; d=google.com; s=arc-20160816; b=KfNTfyAFiFv3Hpi+XTtJqmOZQ7NFrNsWSAh0a2/8vo+iiLVoF8TVcaa4oFgePmODq7 vxNLth6AyqdbGO/TcuSCa7+rwLsvHnq3wnc7zqlsxuZeNe9ZKh0Y9+OXGKjPrCvtEcP/ jLTQumXbP8riBfYMG/cTrFGHmP2XY8x/1CW3XiJxK0NVgqJdE7/nESWa8tR0NqoY57qt /iOyIpxcjC8AUajh6Syps2QyftagjbHiOMxNd4CmVaLEh+HV6sC/QzM5DG+EzJi5LZg2 STdF4OcMy4PJ8iOMJ3M1COF+1zorCKL28fW5vRxqTylYzzMTZYCHiWs35y4QGdYZywa0 ryGQ== 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=0xdAiaEae9Al8UnhDwYxGRnclAzI/arJdomnavJIIhU=; b=b2U1RUqzuQY2LrZMlfqZQud+IyWj7hwoMXpyLwje4HMHgQ9XWs5Q1P97CHM9/L5Ku3 igrBDw3msbRJdukDFVYvNq/CVodHv/BUyqvYilJZXnlBQSZmmITk7rMCOrDU8iZLai47 8Msy/UQOpwyrfH1L000VJj9+Y2dinF1PyRS33JN2u0hAKmg9r9AhUl8FPsNpX3ljnUPq 2rYDlsMchzpcSewOPCeycBlxXeO4avUCdH6pXt12BCmhesUd9GDp9pgFhmX3V+TiZVkD 67/HDRBQHi+yhc6/FWbqr/LzEbNb1XRpjC2XgCqTKL+9whUG1m4vPN1eOvZXhdsTYaoy cxiw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id r2-20020a056830120200b0060614e6f168si11385884otp.135.2022.05.09.09.55.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 09:55:58 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 DE85D22A2CB; Mon, 9 May 2022 09:47:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239369AbiEIQvT (ORCPT + 99 others); Mon, 9 May 2022 12:51:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239365AbiEIQvP (ORCPT ); Mon, 9 May 2022 12:51:15 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 28CC8223088 for ; Mon, 9 May 2022 09:47:19 -0700 (PDT) Received: (qmail 131135 invoked by uid 1000); 9 May 2022 12:47:19 -0400 Date: Mon, 9 May 2022 12:47:19 -0400 From: Alan Stern To: Greg KH Cc: Geert Uytterhoeven , Felipe Balbi , 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 06:23:31PM +0200, Greg KH wrote: > On Mon, May 09, 2022 at 11:05:06AM -0400, Alan Stern wrote: > > 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. > > It should always be ok to change the names of devices as those are not > going to be persistent / determinisitic. It's the attributes of devices > that are supposed to be used to determine those types of things. > > So I think let's start out with the .N suffix for everything for now. > I'll be glad to submit the fixed patch to the Android kernel build > system to see what their testing comes back with to see if they happened > to make any name assumptions as that's the largest user of this > codebase. Okay. Do you need me to send it as a proper patch before you try it out? Alan Stern