All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-bluetooth@vger.kernel.org,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Marcel Holtmann" <marcel@holtmann.org>,
	"Kay Sievers" <kay.sievers@vrfy.org>,
	"Zbigniew Jędrzejewski-Szmek" <zbyszek@in.waw.pl>,
	systemd-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 BlueZ] hid2hci: Fix udev rules for linux-4.14+
Date: Tue, 23 Apr 2019 18:41:17 +0300	[thread overview]
Message-ID: <20190423154117.GV1747@intel.com> (raw)
In-Reply-To: <20181205194916.GA20809@kroah.com>

On Wed, Dec 05, 2018 at 08:49:16PM +0100, Greg Kroah-Hartman wrote:
> On Wed, Dec 05, 2018 at 09:40:51PM +0200, Ville Syrjälä wrote:
> > On Wed, Dec 05, 2018 at 08:20:36PM +0100, Greg Kroah-Hartman wrote:
> > > On Wed, Dec 05, 2018 at 05:40:32PM +0200, Ville Syrjälä wrote:
> > > > On Wed, Dec 05, 2018 at 08:06:21AM +0100, Greg Kroah-Hartman wrote:
> > > > > On Tue, Dec 04, 2018 at 10:41:17PM +0200, Ville Syrjala wrote:
> > > > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > > > 
> > > > > > Since commit 1455cf8dbfd0 ("driver core: emit uevents when
> > > > > > device is bound to a driver") the kernel started emitting
> > > > > > "bind" and "unbind" uevents which confuse the hid2hci
> > > > > > udev rules.
> > > > > > 
> > > > > > The symptoms on an affected machine (Dell E5400 in my case)
> > > > > > include bluetooth devices not appearing and udev hogging
> > > > > > the cpu as it's busy processing a constant stream of these
> > > > > > "bind"+"unbind" uevents.
> > > > > 
> > > > > What is causing a "stream" of bind and unbind events?  This only happens
> > > > > when a device is attached to a driver or removed from a driver, which is
> > > > > caused by something else happening.
> > > > 
> > > > Not sure if it's just due to this thing causing devices to
> > > > appear/disappear during bind/unbind events or what.
> > > 
> > > Someone has to be telling the kernel to bind/unbind from a driver to
> > > a device, it doesn't do it on its own.  Look at your other rules/scripts
> > > for that.
> > > 
> > > Also note that the kernel has been doing this for over a year now (since
> > > 4.l4), what just happened in 4.19 to cause this to be an issue?
> > 
> > It became an issue for me after I got a machine that suffers from
> > this. The regression has been present ever since commit 1455cf8dbfd0
> > ("driver core: emit uevents when device is bound to a driver").
> > 
> > You need a Dell E5400 or something similar to see it since those
> > have these magic bluetooth devices or whatever.
> 
> What does the kernel log say is going on?  Is the device "bouncing" from
> being added/removed from the system all the time?

I totally forgot about this until another bluez update happened
and the CPU hog came back.

I had another look at this and I suppose the problem is caused by
USBFS_IOCTL_DISCONNECT being called for every bind/unbind event.
So I think this patch is still the right way to go.

I did find a few more bugs in hid2hci but those don't actually make
any real difference here. I'll send separate patches for those anyway.

-- 
Ville Syrjälä
Intel

      reply	other threads:[~2019-04-23 15:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-07 13:06 [PATCH bluez] hid2hci: Fix udev rules for linux-4.14+ Ville Syrjala
2018-05-07 17:44 ` [systemd-devel] " Zbigniew Jędrzejewski-Szmek
2018-06-20 16:46   ` Ville Syrjälä
2018-06-20 16:42 ` [PATCH v2] " Ville Syrjala
2018-11-05 17:54   ` Ville Syrjälä
2018-12-04 20:41   ` [PATCH v2 BlueZ] " Ville Syrjala
2018-12-05  7:06     ` Greg Kroah-Hartman
2018-12-05 15:40       ` Ville Syrjälä
2018-12-05 19:09         ` Dag B
2018-12-05 19:21           ` Greg Kroah-Hartman
2018-12-05 19:20         ` Greg Kroah-Hartman
2018-12-05 19:40           ` Ville Syrjälä
2018-12-05 19:49             ` Greg Kroah-Hartman
2019-04-23 15:41               ` Ville Syrjälä [this message]

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=20190423154117.GV1747@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=systemd-devel@lists.freedesktop.org \
    --cc=zbyszek@in.waw.pl \
    /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.