From: Paul Zimmerman <pauldzim@gmail.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg KH <greg@kroah.com>,
David Heinzelmann <heinzelmann.david@gmail.com>,
USB list <linux-usb@vger.kernel.org>
Subject: Re: [PATCH] USB: hub: Don't record a connect-change event during reset-resume
Date: Fri, 31 Jan 2020 12:36:53 -0700 [thread overview]
Message-ID: <20200131123653.2ef373e4@EliteBook> (raw)
In-Reply-To: <Pine.LNX.4.44L0.2001311037460.1577-100000@iolanthe.rowland.org>
On Fri, 31 Jan 2020 10:39:26 -0500 (EST)
Alan Stern <stern@rowland.harvard.edu> wrote:
> Paul Zimmerman reports that his USB Bluetooth adapter sometimes
> crashes following system resume, when it receives a
> Get-Device-Descriptor request while it is busy doing something else.
>
> Such a request was added by commit a4f55d8b8c14 ("usb: hub: Check
> device descriptor before resusciation"). It gets sent when the hub
> driver's work thread checks whether a connect-change event on an
> enabled port really indicates a new device has been connected, as
> opposed to an old device momentarily disconnecting and then
> reconnecting (which can happen with xHCI host controllers, since they
> automatically enable connected ports).
< snip >
> Note that performing the unnecessary check is not actually a bug.
> Devices are supposed to be able to send descriptors back to the host
> even when they are busy doing something else. The underlying cause of
> Paul's problem lies in his Bluetooth adapter. Nevertheless, we
> shouldn't perform the same check twice in a row -- and as a nice side
> benefit, removing the extra check allows the Bluetooth adapter to work
> more reliably.
Actually, at the time the failure happens, the bluetooth driver is putting
the device into a "manufacturer mode" and downloading a firmware patch to
the device. So I don't think we can fault the device for not responding to
a get-descriptor request at that point. Probably there should be some kind
of locking in the driver while that is being done.
Nevertheless, your patch makes everything work again, so I think it's
"good enough" :)
Thanks,
Paul
next prev parent reply other threads:[~2020-01-31 19:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-31 15:39 [PATCH] USB: hub: Don't record a connect-change event during reset-resume Alan Stern
2020-01-31 19:36 ` Paul Zimmerman [this message]
2020-01-31 21:04 ` 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=20200131123653.2ef373e4@EliteBook \
--to=pauldzim@gmail.com \
--cc=greg@kroah.com \
--cc=heinzelmann.david@gmail.com \
--cc=linux-usb@vger.kernel.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.