All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>,
	linux-usb@vger.kernel.org, Marcel Holtmann <marcel@holtmann.org>
Subject: Re: [PATCH v5] USB: core: skip unconfiguration if device doesn't support it
Date: Fri, 13 May 2022 16:46:35 +0200	[thread overview]
Message-ID: <Yn5vS3cA4qP3MXfV@kroah.com> (raw)
In-Reply-To: <Yn5qerFAcHP3scAZ@rowland.harvard.edu>

On Fri, May 13, 2022 at 10:26:02AM -0400, Alan Stern wrote:
> On Fri, May 13, 2022 at 04:13:07PM +0200, Greg KH wrote:
> > On Fri, May 13, 2022 at 10:09:26AM -0400, Alan Stern wrote:
> > > On Fri, May 13, 2022 at 11:50:26AM +0200, Jose Ignacio Tornos Martinez wrote:
> > > > Ok, I will try to identify the "bad" devices in some way.
> > > > 
> > > > Thanks
> > > > 
> > > > José Ignacio
> > > > 
> > > > 
> > > > On Thu, May 12, 2022 at 1:48 PM Greg KH <gregkh@linuxfoundation.org> wrote:
> > > > >
> > > > > I'll drop this for now as there are no in-kernel users for this quirk
> > > > > yet.  When there is a need for one, please resubmit it.
> > > 
> > > Hold on; Greg's comment doesn't seem fair.  There are no in-kernel 
> > > users for this quirk because it is meant to be a user API.  (Just as 
> > > there are no in-kernel users for read(2) -- it is there so that 
> > > userspace can call it).
> > 
> > True, but the kernel calls read(2) itself as well in places, it just
> > looks a bit different, kernel_read_file()  :)
> 
> Okay, but you get the point.  :-)
> 
> > > Jose does have users for the new quirk: Anybody with one of the bad 
> > > Bluetooth CSR knockoff chips.  Now I agree; it would be great if there 
> > > was some way to identify them automatically.  But if that's not 
> > > possible, the only alternative is to allow userspace to set the quirk 
> > > flag whenever it knows the quirk is needed.
> > 
> > Is that the case here that we know how to identify this?  I thought
> > Marcel said something else was happening here.
> > 
> > If the bluetooth developers/maintainers say this is needed for some
> > devices to work properly and they will be handled in userspace somehow
> > through a udev rule or the like, I will gladly add this.  But I thought
> > this thread died out as it was determined that this wasn't needed at
> > this point in time which is why I dropped it.
> 
> It's kind of an odd situation.  In ordinary usage the device works okay.  
> But it stops working after it has been exported over usbip; that is what 
> Jose wants to fix.
> 
> Come to think of it, maybe there is a simple workaround.  If userspace 
> resets the device after it is unconfigured, there's a good chance that 
> will get it to start working again.  Jose, can you try this?  There is a 
> usbreset program you can use, floating around on the web.  (Greg, did 
> that program or something like it ever get added to the usbutils 
> package?)

Yes, it is in the usbutils package.  I don't think many distros package
the prebuilt binary, but the .c file can be found here:
	https://github.com/gregkh/usbutils/blob/master/usbreset.c


  reply	other threads:[~2022-05-13 14:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-04 15:16 [PATCH v5] USB: core: skip unconfiguration if device doesn't support it Jose Ignacio Tornos Martinez
2022-05-04 17:54 ` Alan Stern
2022-05-12 11:47 ` Greg KH
2022-05-13  9:50   ` Jose Ignacio Tornos Martinez
2022-05-13 14:09     ` Alan Stern
2022-05-13 14:13       ` Greg KH
2022-05-13 14:26         ` Alan Stern
2022-05-13 14:46           ` Greg KH [this message]
2022-05-13 14:58             ` Jose Ignacio Tornos Martinez
2022-05-17 13:58               ` Jose Ignacio Tornos Martinez
2022-05-13 15:00           ` Bjørn Mork
2022-05-16  5:45             ` Jose Ignacio Tornos Martinez

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=Yn5vS3cA4qP3MXfV@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=jtornosm@redhat.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=stern@rowland.harvard.edu \
    /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.