All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Felipe Balbi <balbi@kernel.org>,
	USB mailing list <linux-usb@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Subject: Re: [PATCH 4/4] USB: gadget: Add a new bus for gadgets
Date: Mon, 9 May 2022 12:47:19 -0400	[thread overview]
Message-ID: <YnlFl0M0FRzhxwpK@rowland.harvard.edu> (raw)
In-Reply-To: <YnlAAxT5Lq0NvxX0@kroah.com>

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 <stern@rowland.harvard.edu> 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 <geert+renesas@glider.be>
> > > > >
> > > > > LGTM, so
> > > > > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > >
> > > > 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

  reply	other threads:[~2022-05-09 16:47 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-20 19:45 [RFC PATCH 0/4] USB: gadget: Create a bus for gadgets Alan Stern
2022-03-20 19:47 ` [RFC PATCH 1/4] USB: gadget: Rename usb_gadget_probe_driver() Alan Stern
2022-03-20 19:48   ` [RFC PATCH 2/4] USB: gadget: Register udc before gadget Alan Stern
2022-03-20 19:50     ` [RFC PATCH 3/4] USB: gadget: Fix mistakes in UDC core kerneldoc Alan Stern
2022-03-20 19:51       ` [RFC PATCH 4/4] USB: gadget: Add a new bus for gadgets Alan Stern
2022-03-23  6:55         ` Pavan Kondeti
2022-03-23 13:14           ` Alan Stern
2022-03-22 12:57   ` [RFC PATCH 1/4] USB: gadget: Rename usb_gadget_probe_driver() Jun Li
2022-03-22 14:37     ` Alan Stern
2022-04-22 13:30 ` [RFC PATCH 0/4] USB: gadget: Create a bus for gadgets Greg KH
2022-04-24  0:42   ` [PATCH 1/4] USB: gadget: Rename usb_gadget_probe_driver() Alan Stern
2022-04-24  1:33     ` [PATCH 2/4] USB: gadget: Register udc before gadget Alan Stern
2022-04-24  1:34       ` [PATCH 3/4] USB: gadget: Fix mistakes in UDC core kerneldoc Alan Stern
2022-04-24  1:35         ` [PATCH 4/4] USB: gadget: Add a new bus for gadgets Alan Stern
2022-05-03 10:14           ` Geert Uytterhoeven
2022-05-03 14:54             ` Alan Stern
2022-05-03 15:27               ` Geert Uytterhoeven
2022-05-03 15:48                 ` Alan Stern
2022-05-04 14:40                   ` Greg KH
2022-05-07 15:36                   ` Alan Stern
2022-05-09  7:46                     ` Geert Uytterhoeven
2022-05-09 14:15                       ` Alan Stern
2022-05-09 14:42                         ` Geert Uytterhoeven
2022-05-09 15:05                           ` Alan Stern
2022-05-09 16:23                             ` Greg KH
2022-05-09 16:47                               ` Alan Stern [this message]
2022-05-10  7:52                                 ` Greg KH
2022-05-10 15:51                                   ` [PATCH] USB: gadget: Add ID numbers to gadget names Alan Stern
2022-05-11 15:17                                     ` Greg KH
2022-05-11 16:58                                       ` Greg KH
2022-04-24  1:40   ` [RFC PATCH 0/4] USB: gadget: Create a bus for gadgets Alan Stern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YnlFl0M0FRzhxwpK@rowland.harvard.edu \
    --to=stern@rowland.harvard.edu \
    --cc=balbi@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.