Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9870208imu; Wed, 5 Dec 2018 11:43:01 -0800 (PST) X-Google-Smtp-Source: AFSGD/U6FeSojR/OgWDjFbElz+Uz6/deLK1RwWBLkGwhfgz7iyJdTfmiv+ozRVD9RQX+LpZf0jA0 X-Received: by 2002:a17:902:b406:: with SMTP id x6mr24271948plr.329.1544038981144; Wed, 05 Dec 2018 11:43:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544038981; cv=none; d=google.com; s=arc-20160816; b=U3JWPW2dD+SnDDzETJVgOYuiRP6Ubwtd7e4Qb8U+56voXE2uLFG+EqZ/NCE3rzH4+d Kso42f7JtTbNiMdl+8gyPa05JBffZyTi/+UDMbsL+Cku6LYvDsy5sHsQzsgKMx9CLK0d W3GDP2zRM5zYa2vmyYP+xBpc/kzM8aPmKDYblGIBpI1zO8jULZ3gMJppV/m/rPR+/Zjh +naMIZzvVu1XTBSmredmKYyqeOclNaHLsi9UdOCxZO/bzxBIUx4H6bQ8MUDDgNkaJ9cB CZrbCpgjcON3O2POixS6XOIaExzVvllXMA8cQKoAg0iGUR+XFxPkNSrFJXmd82PVdZ3r pOoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=6/od7eqbfqxLd+D2HBf8cWov5LvxWjJA1IT8qRDDQRI=; b=pj9hwnBWSWmPxCWizYZfz/h5zyKViNtUTXvn7gXnHbPcfQ2QqGqiTrF52ui2bdWyTd 2nbAJnnPhNPxGHB3k3PS+Esk/R+MkYPaYUvoXWdtukIvxIuHvZFJQ+LmUH3OkUPUNA3W CjMb2YyBdDKBmrSbx4drERLzfSP0+YZBv5N5D0tpLUHAJfmjwEF7VouSvCP4RD8D+WET G3jWkrTVW+fkfn8otdCjPDOsE8jokVxSmnLSDNiUyY2BID4rm+E+r+Ws6K0q/xkV8tz+ Zid5Hy15tyyT/J1WzfWhh0HO7eLPfP4SJPwwOQvnDrtWsPN6owrh6l8cAnxGo3zSPIYN wkCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v190si21532592pfv.8.2018.12.05.11.42.46; Wed, 05 Dec 2018 11:43:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728294AbeLETk5 (ORCPT + 99 others); Wed, 5 Dec 2018 14:40:57 -0500 Received: from mga18.intel.com ([134.134.136.126]:19844 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727523AbeLETk5 (ORCPT ); Wed, 5 Dec 2018 14:40:57 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Dec 2018 11:40:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,319,1539673200"; d="scan'208";a="98359884" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by orsmga006.jf.intel.com with SMTP; 05 Dec 2018 11:40:52 -0800 Received: by stinkbox (sSMTP sendmail emulation); Wed, 05 Dec 2018 21:40:51 +0200 Date: Wed, 5 Dec 2018 21:40:51 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Greg Kroah-Hartman Cc: linux-bluetooth@vger.kernel.org, Dmitry Torokhov , Marcel Holtmann , Kay Sievers , Zbigniew =?utf-8?Q?J=C4=99drzejewski-Szmek?= , systemd-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 BlueZ] hid2hci: Fix udev rules for linux-4.14+ Message-ID: <20181205194051.GU9144@intel.com> References: <20180620164240.6535-1-ville.syrjala@linux.intel.com> <20181204204117.14964-1-ville.syrjala@linux.intel.com> <20181205070621.GE16346@kroah.com> <20181205154032.GT9144@intel.com> <20181205192036.GB434@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20181205192036.GB434@kroah.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > > > > > > > > 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. > > > > This should not be a normal > > > occurance, unless something odd is happening to your hardware? > > > > It's not specific to my hardware. Lot's of people are affected. > > See eg. > > https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1759836 > > > > Acutally looking through that bug it seems someone else noticed > > hid2hci failing lot in the logs. So maybe it's just that we already > > switched the mode during "add", and then we try to redo the same > > thing during "bind" which fails, and that then causes and unbind? > > You have to manually unbind the device, the kernel does not do that. So > perhaps you have a broken udev rule somewhere else that would do > something odd like unbind/bind? > > I don't see this happening on my systems, but hey, I know better than to > run Ubuntu :) As do I. And you don't see it because you don't have the right hardware. -- Ville Syrj?l? Intel