Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5033834iob; Mon, 9 May 2022 07:19:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8cwKS3aoO0eSWCg3FrstaixZLsdl7VFnHfoNDvM4MS/6LunZloCIvmW8HdEfmif7ddrZv X-Received: by 2002:a17:902:d482:b0:15e:a06a:db0a with SMTP id c2-20020a170902d48200b0015ea06adb0amr16580872plg.38.1652105970336; Mon, 09 May 2022 07:19:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652105970; cv=none; d=google.com; s=arc-20160816; b=ENN4Ou2aMs1TuJQaBB+nmg0Rafepl7XHaqiipXSDLliX5/0giL8mFQxLvObh4bHvyd LL0dB1wV/giC4geffyTnxGLbuhOrxFWtjw1rSZjJdGp1hRoJbCZGArNjIJ+zbq4l56+/ paEL2urwu9VGfMpDRmFVjso/eaJ/xxm9RPcOKbez0zE/qX7TDuDSy7QVY+B4sgh+uU25 7HL83cbMIIhjgY1LTOJjjkd3yBVWcYpgX0cpyLv6rhWwDd9VjBPAEAnpOqr7jm0/zUB/ cBF8yDC3Qk40zuYPopzCQxudQW0Sk0Vpt4t+YBh2hTeC+BWORAdsxQdwT/sWXowGWP6K KTbg== 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=P1GJ+Vl6LXgpVOBtuSAFFemG98DecTNJSamCNcZ7CAI=; b=zfLxECmyP+gUwvoXV3KgtXCm7YpjCAG3YV3cHQwU8RlU9WKk39u68wW/fR4v57M7Mk eNqoW5AeuOKcedtThfEC8jbRP0Er53bji/4+5uAskAGsPdiCIN4S9zN8mOEEYiOeXVoC m1CHslWzUhKQl/uRvBwkGD9WcGgm0E5KzutM72WZNI53Wp0Aet2TWh0ezbBCvd07wW5W Vj1GbaIatlnRJc2iMM0r3c3cb5LP6FufXkXriEF4NJhk+906OBN+HaJq9cL9XqrajJxx 4Ty1kv0OIUfRPdScpYhkYTxGpQtZK/Q5eyJ64+cAqDuUyceQyXhEND9pWORQ6KSZ/dBt lI3A== 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 l194-20020a633ecb000000b003aa57185726si15040146pga.681.2022.05.09.07.19.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 07:19:30 -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 A028D8232C; Mon, 9 May 2022 07:15:16 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237056AbiEIOS6 (ORCPT + 99 others); Mon, 9 May 2022 10:18:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237011AbiEIOS4 (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 48E082B275E 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: 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 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