public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Ruhl, Michael J" <michael.j.ruhl@intel.com>
Cc: "Williams, Dan J" <dan.j.williams@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Tejun Heo <htejun@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Guenter Roeck <linux@roeck-us.net>
Subject: Re: [PATCH v2 1/7] driver core: emit uevents when device is bound to a driver
Date: Fri, 29 Sep 2017 16:23:20 -0700	[thread overview]
Message-ID: <20170929232320.GA14362@dtor-ws> (raw)
In-Reply-To: <14063C7AD467DE4B82DEDB5C278E8663875D4784@FMSMSX108.amr.corp.intel.com>

On Fri, Sep 29, 2017 at 07:40:15PM +0000, Ruhl, Michael J wrote:
> > -----Original Message-----
> > From: dan.j.williams@gmail.com [mailto:dan.j.williams@gmail.com] On
> > Behalf Of Dan Williams
> > Sent: Friday, September 29, 2017 3:37 PM
> > To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Tejun Heo
> > <htejun@gmail.com>; Linux Kernel Mailing List <linux-
> > kernel@vger.kernel.org>; Guenter Roeck <linux@roeck-us.net>; Ruhl,
> > Michael J <michael.j.ruhl@intel.com>
> > Subject: Re: [PATCH v2 1/7] driver core: emit uevents when device is bound
> > to a driver
> > 
> > On Wed, Jul 19, 2017 at 5:24 PM, Dmitry Torokhov
> > <dmitry.torokhov@gmail.com> wrote:
> > > There are certain touch controllers that may come up in either normal
> > > (application) or boot mode, depending on whether firmware/configuration
> > is
> > > corrupted when they are powered on. In boot mode the kernel does not
> > create
> > > input device instance (because it does not necessarily know the
> > > characteristics of the input device in question).
> > >
> > > Another number of controllers does not store firmware in a non-volatile
> > > memory, and they similarly need to have firmware loaded before input
> > device
> > > instance is created. There are also other types of devices with similar
> > > behavior.
> > >
> > > There is a desire to be able to trigger firmware loading via udev, but it
> > > has to happen only when driver is bound to a physical device (i2c or spi).
> > > These udev actions can not use ADD events, as those happen too early, so
> > we
> > > are introducing BIND and UNBIND events that are emitted at the right
> > > moment.
> > >
> > > Also, many drivers create additional driver-specific device attributes
> > > when binding to the device, to provide userspace with additional controls.
> > > The new events allow userspace to adjust these driver-specific attributes
> > > without worrying that they are not there yet.
> > >
> > > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > 
> > Hi Dmitry,
> > 
> > Mike (cc'd) reports a regression with this change:
> > 
> > ---
> > 
> > Previously, if I did:
> > 
> > # rmmod hfi1
> > 
> > The driver would be removed.
> > 
> > With 4.14.0-rc2+, when I remove the driver, the PCI bus is
> > automatically re-probed and the driver re-loaded.
> > 
> > ---
> > 
> > A bisect points to commit 1455cf8dbfd0 "driver core: emit uevents when
> > device is bound to a driver". I'm sending this because I have this
> > mail in my archive, but I'll let Mike follow up with any other
> > details.
> 
> My test environment is RedHat 7.3 GA + 4.14.0-rc2 kernel.
> 
> Blacklisting the driver keeps it from being autoloaded, but this didn't seem correct.
> 
> With the 4.13.x branch this did not occur

Yeah, udev is being stupid. Either change ACTION=="remove" to
ACTION!="add" in /lib/udev/rules.d/80-drivers.rules or pick this patch:

https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/commit/?h=driver-core-linus&id=6878e7de6af726de47f9f3bec649c3f49e786586

Thanks.

-- 
Dmitry

  reply	other threads:[~2017-09-29 23:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-20  0:24 [PATCH v2 0/7] New bind/unbingd uevents Dmitry Torokhov
2017-07-20  0:24 ` [PATCH v2 1/7] driver core: emit uevents when device is bound to a driver Dmitry Torokhov
2017-09-29 19:36   ` Dan Williams
2017-09-29 19:40     ` Ruhl, Michael J
2017-09-29 23:23       ` Dmitry Torokhov [this message]
2017-09-30  8:13         ` Greg Kroah-Hartman
2017-07-20  0:24 ` [PATCH v2 2/7] driver core: make device_{add|remove}_groups() public Dmitry Torokhov
2017-07-20  0:24 ` [PATCH v2 3/7] driver core: add device_{add|remove}_group() helpers Dmitry Torokhov
2017-07-20  0:24 ` [PATCH v2 4/7] driver core: add devm_device_add_group() and friends Dmitry Torokhov
2017-07-20  5:10   ` Greg Kroah-Hartman
2017-07-20  8:12     ` Dmitry Torokhov
2017-07-20  8:20       ` Greg Kroah-Hartman
2017-07-20 15:50         ` Dmitry Torokhov
2017-07-22 10:03           ` Greg Kroah-Hartman
2017-07-20  0:24 ` [PATCH v2 5/7] Input: gpio_keys - use devm_device_add_group() for attributes Dmitry Torokhov
2017-07-20  3:22   ` Guenter Roeck
2017-07-20  0:24 ` [PATCH v2 6/7] Input: synaptics_rmi4 - use devm_device_add_group() for attributes in F01 Dmitry Torokhov
2017-07-20  3:22   ` Guenter Roeck
2017-07-20  0:24 ` [PATCH v2 7/7] Input: axp20x-pek - switch to using devm_device_add_group() Dmitry Torokhov
2017-07-20  3:21   ` Guenter Roeck

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=20170929232320.GA14362@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=dan.j.williams@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=htejun@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=michael.j.ruhl@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox