Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp992206imm; Wed, 20 Jun 2018 09:47:21 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIbIfCA8Mh2bM7GJkhI4h0j+7nmVeDDYUdhXs3IRRvVp9Y9St5BK/+1wTQan4d29FpMfOWj X-Received: by 2002:a65:6147:: with SMTP id o7-v6mr16561266pgv.163.1529513241401; Wed, 20 Jun 2018 09:47:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529513241; cv=none; d=google.com; s=arc-20160816; b=mpOqtU+jjcXOu5bQsgko9u//N++mQDJlI38u2pJS9OWzKJ74VmI3Gvc0BeDyFhFZUY Ff8x4acnmEoMosmxU69Q8RtrQ4Gt0ekGZZq4V1Su0vAa0KvFXMTaAN0qE7DQYHbLVtjH fyLai06B4zQA8KI5vV9FtJpYCNOQuGF4WD4zzzVnF2caQ5cPvqCDBAFFQotU1R2lgrQo aKubvXUag9tUikpsMQf/KE2AEKeVmwl2nfk0u35t3/QVxUc7CqBesvhfzyBJHjqUfXlc SFe5E2Y3wX3cI4WwLZceUb8GL64Dz7pNkci4SOmOI4D0Qg0NV+E4Isx3njtZ/khYN+5h 8vMQ== 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 :arc-authentication-results; bh=vMGLjCfs3zZp4mhAITOvpkblscxXSBvp6W7UQbuCRfc=; b=DJCwYOWSF5Xmp9Szi4H1X/f1Le5kPfcF92ZY8jnEzD/+6OJXHBR1JKnbIgopV+6+mS dyCOQWYfEFUlO9B1NsyqcZvAp5P3HhrtmUsZh5sBqi5htc5UUWgKifIvxt5RwY4PEgcU N+XvWefoGOJ+595pfCDB7gDscjk0bmgoI4QYO5N+5DWiAteR+Fr6DwyFMDOI+1NWIB2w WupuZ9n7YYupQDozG3PTV05ezO1CzHezAxLLTC5KvY5df9XOvOIyGU1ENt+BdkBdBtJ/ x6d6coQC2tNiyGojHnsYgHQIWb8DIUsKsKmgPKSvmsJu82euUPB4e1ySXKKnMXOqJ6PD DbEA== 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 1-v6si2607288plj.411.2018.06.20.09.47.06; Wed, 20 Jun 2018 09:47:21 -0700 (PDT) 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 S932397AbeFTQq1 (ORCPT + 99 others); Wed, 20 Jun 2018 12:46:27 -0400 Received: from mga07.intel.com ([134.134.136.100]:56896 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932082AbeFTQq0 (ORCPT ); Wed, 20 Jun 2018 12:46:26 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jun 2018 09:46:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,248,1526367600"; d="scan'208";a="65808312" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by fmsmga001.fm.intel.com with SMTP; 20 Jun 2018 09:46:22 -0700 Received: by stinkbox (sSMTP sendmail emulation); Wed, 20 Jun 2018 19:46:21 +0300 Date: Wed, 20 Jun 2018 19:46:21 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Zbigniew =?utf-8?Q?J=C4=99drzejewski-Szmek?= Cc: linux-bluetooth@vger.kernel.org, Kay Sievers , systemd-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [systemd-devel] [PATCH bluez] hid2hci: Fix udev rules for linux-4.14+ Message-ID: <20180620164621.GM20518@intel.com> References: <20180507130638.3516-1-ville.syrjala@linux.intel.com> <20180507174459.GH8805@in.waw.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180507174459.GH8805@in.waw.pl> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 07, 2018 at 05:44:59PM +0000, Zbigniew Jędrzejewski-Szmek wrote: > On Mon, May 07, 2018 at 04:06:38PM +0300, 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 > > "bound" and "unbound" 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 > > "bound"+"unbound" uevents. > > > > Change the udev rules only kick in for an "add" event. > > This seems to cure my machine at least. > > > > Cc: Dmitry Torokhov > > Cc: Greg Kroah-Hartman > > Cc: Marcel Holtmann > > Cc: Kay Sievers > > Cc: systemd-devel@lists.freedesktop.org > > Cc: linux-kernel@vger.kernel.org > > Cc: linux-bluetooth@vger.kernel.org > > Signed-off-by: Ville Syrjälä > > --- > > tools/hid2hci.rules | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tools/hid2hci.rules b/tools/hid2hci.rules > > index db6bb03d2ef3..daa381d77387 100644 > > --- a/tools/hid2hci.rules > > +++ b/tools/hid2hci.rules > > @@ -1,6 +1,6 @@ > > # do not edit this file, it will be overwritten on update > > > > -ACTION=="remove", GOTO="hid2hci_end" > > +ACTION!="add", GOTO="hid2hci_end" > > SUBSYSTEM!="usb*", GOTO="hid2hci_end" > > This will skip over lines 22-23. Is the rule there supposed to > work for ACTION==add only (in which case your patch would be OK), > or also for ACTION==change? Maybe it'd be safer to just add the GOTO > for bind/unbind. Forgot about this one. Thanks for catching that. I think checking for "add|change" is the sanest approach. I fired off a v2 with that approach. Actually I'm not sure if this change stuff is working at all in any case. On my systems udevadm is in /bin, but this rules file hardcodes /sbin/udevadm as the path. -- Ville Syrjälä Intel