Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5053579iob; Mon, 9 May 2022 07:44:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjo9x4Ev/D0YDO8LN3ROZR4E8dk8zC3Wpma14hRdhojnnZx6TZs+P/Xz9g+ApCehrOOUKD X-Received: by 2002:a05:6a00:1d8f:b0:510:9430:8021 with SMTP id z15-20020a056a001d8f00b0051094308021mr10294812pfw.55.1652107479092; Mon, 09 May 2022 07:44:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652107479; cv=none; d=google.com; s=arc-20160816; b=gOiUtiAhzgjEgXGq3lgFugGIl0kkesqtsSBTzshiFEto8kC00GaLaXtrFGZITdgD+F EGhdAMvMFaHMQM1zYIshImcfA851X60QuUkXqHLiAezBAT81yoVJ1MQeKMtdLoUTo4YP /Edc5j/gW1rmOBc7HPprozqEaXQG26opHD02MSbmj96XZGV9lby0JOsUxhw3KnxWJTJH GzatzLcABy+uDuZssE46pbDqOhRZdqAWDAyp9RpqeverZOGETvalHkUVLqYcmZs10LD7 URm3KFuwmjYc5P3lkMQSSDfFDytAty4F0KN1cxtj/ltFAaeYP/4GNubRx8IjLngV8LDM myAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=5+vqGfHPelFk9/33nSW7ABuV7vg2is0Y9SwNAQ6T9v4=; b=CpcXrbhBxKZnpo0xypbjct2N1Ikn7ylS5gpEjpf0fTCtWvskv+BdWbSfHolOwAt1NT uMhD25bKm6we41dYy7sTpKz542Kr2070uyBwDb/R5qLVrvpaIVbWaS1EYyXqoqgASXio pvqDOIY492Z1uMuMuYXx34lJkTrEu39CFxaTGHb09IwkSO9plRqamLYFhAGDfLovLey6 rMxKP/2mI8llyi8au/o1HgQ0/K/dua72ED5/OJNVAgwBE/bqC5OhjEQiFBGqhPabpTJM Qt5HkpCCpyVpCqO4ZLmmzFaEFe/PFKbtcFDCw9mydv5A7TkJ1jwyYypALzyGf9psxjy9 CGkA== 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 e6-20020a170902ef4600b00153b2d16510si10763543plx.280.2022.05.09.07.44.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 07:44:39 -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 EB16C1A811B; Mon, 9 May 2022 07:42:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237706AbiEIOq2 (ORCPT + 99 others); Mon, 9 May 2022 10:46:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237586AbiEIOqK (ORCPT ); Mon, 9 May 2022 10:46:10 -0400 Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E090D16549E; Mon, 9 May 2022 07:42:15 -0700 (PDT) Received: by mail-qv1-f42.google.com with SMTP id p3so9066600qvi.7; Mon, 09 May 2022 07:42:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5+vqGfHPelFk9/33nSW7ABuV7vg2is0Y9SwNAQ6T9v4=; b=DGT+neaCKSscwji9RnnyGFEHn7J2QQUOuNq6XDeNgrNygGU0iXUjOdfj+nLKuuhI3L oL6KQwVILpQYNKOfG2VuJcVRaIc1ayqiXIuFHHQJu2Mh+dc4on4D7lgxc7PTAxaA7TM9 +4yaSLcDU9QLAgJgzcdOKNda/XnyDJ/pDcAb8eSLf3PDvZcBmWfAx/cmtXimLarnEsjz nSUHsSGqvC3PUISqoqP2OCxdsaXdmH+rDK5fVDtXtpcW+pjSl9pSEdnw33nt/z8i3/RJ yI5wteJbSptHoWfiPIP9e/a+j16d3PZjgcENCXMAqqYDdCYHwZUlL13gYEQhViJuU7WC fTyQ== X-Gm-Message-State: AOAM533jzNOHWi3g4UXU5rQkQzAYXmg3fRjWpdJhHnjg/xCo2A5ArcqE fs65a1DFIwDEIzkS/clv2Ivy89rEp5l2Wg== X-Received: by 2002:a05:6214:411d:b0:45a:8012:d45c with SMTP id kc29-20020a056214411d00b0045a8012d45cmr13722396qvb.38.1652107334683; Mon, 09 May 2022 07:42:14 -0700 (PDT) Received: from mail-yw1-f178.google.com (mail-yw1-f178.google.com. [209.85.128.178]) by smtp.gmail.com with ESMTPSA id n78-20020a372751000000b0069fc13ce228sm7059971qkn.89.2022.05.09.07.42.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 May 2022 07:42:14 -0700 (PDT) Received: by mail-yw1-f178.google.com with SMTP id 00721157ae682-2f7d7e3b5bfso146902677b3.5; Mon, 09 May 2022 07:42:14 -0700 (PDT) X-Received: by 2002:a0d:d953:0:b0:2f7:d5ce:f204 with SMTP id b80-20020a0dd953000000b002f7d5cef204mr14325486ywe.502.1652107333940; Mon, 09 May 2022 07:42:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Geert Uytterhoeven Date: Mon, 9 May 2022 16:42:01 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/4] USB: gadget: Add a new bus for gadgets To: Alan Stern Cc: Felipe Balbi , Greg KH , USB mailing list , Linux-Renesas , Linux Kernel Mailing List , Yoshihiro Shimoda Content-Type: text/plain; charset="UTF-8" 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 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 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds