<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/dd.c, branch v3.4-rc2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/base/dd.c?h=v3.4-rc2</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/base/dd.c?h=v3.4-rc2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-03-08T20:20:37Z</updated>
<entry>
<title>driver core: minor comment formatting cleanups</title>
<updated>2012-03-08T20:20:37Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2012-03-08T20:20:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8b0372a258e6bd0e9e5ea3f3d5f05a6bf3972fee'/>
<id>urn:sha1:8b0372a258e6bd0e9e5ea3f3d5f05a6bf3972fee</id>
<content type='text'>
Came in in the deferred probe patch, quick, clean them up before a
kernel janitor finds them and sends me 4 individual patches to fix them
up...

Cc: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>driver core: move the deferred probe pointer into the private area</title>
<updated>2012-03-08T20:17:22Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2012-03-08T20:17:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ef8a3fd6e5e12e8989dae97ba5491c2e39369af9'/>
<id>urn:sha1:ef8a3fd6e5e12e8989dae97ba5491c2e39369af9</id>
<content type='text'>
Nothing outside of the driver core needs to get to the deferred probe
pointer, so move it inside the private area of 'struct device' so no one
tries to mess around with it.

Cc: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivercore: Add driver probe deferral mechanism</title>
<updated>2012-03-08T19:53:13Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2012-03-05T15:47:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d1c3414c2a9d10ef7f0f7665f5d2947cd088c093'/>
<id>urn:sha1:d1c3414c2a9d10ef7f0f7665f5d2947cd088c093</id>
<content type='text'>
Allow drivers to report at probe time that they cannot get all the resources
required by the device, and should be retried at a later time.

This should completely solve the problem of getting devices
initialized in the right order.  Right now this is mostly handled by
mucking about with initcall ordering which is a complete hack, and
doesn't even remotely handle the case where device drivers are in
modules.  This approach completely sidesteps the issues by allowing
driver registration to occur in any order, and any driver can request
to be retried after a few more other drivers get probed.

v4: - Integrate Manjunath's addition of a separate workqueue
    - Change -EAGAIN to -EPROBE_DEFER for drivers to trigger deferral
    - Update comment blocks to reflect how the code really works
v3: - Hold off workqueue scheduling until late_initcall so that the bulk
      of driver probes are complete before we start retrying deferred devices.
    - Tested with simple use cases.  Still needs more testing though.
      Using it to get rid of the gpio early_initcall madness, or to replace
      the ASoC internal probe deferral code would be ideal.
v2: - added locking so it should no longer be utterly broken in that regard
    - remove device from deferred list at device_del time.
    - Still completely untested with any real use case, but has been
      boot tested.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Cc: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Dilan Lee &lt;dilee@nvidia.com&gt;
Cc: Manjunath GKondaiah &lt;manjunath.gkondaiah@linaro.org&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Reviewed-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Acked-by: David Daney &lt;david.daney@cavium.com&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers: base: print rejected matches with DEBUG_DRIVER</title>
<updated>2011-09-26T23:21:15Z</updated>
<author>
<name>Wolfram Sang</name>
<email>w.sang@pengutronix.de</email>
</author>
<published>2011-09-20T17:41:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bcbe4f94d15ae1c985336bb3c35605e595fdde0d'/>
<id>urn:sha1:bcbe4f94d15ae1c985336bb3c35605e595fdde0d</id>
<content type='text'>
When DEBUG_DRIVER is activated, be verbose and explicitly state when a
device&lt;-&gt;driver match was rejected by the probe-function of the driver.
Now all code-paths report what is currently happening which helps
debugging, because you don't have to remember that no printout means
the match is rejected (and then you still don't know if it was because
of ENODEV or ENXIO).

Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6</title>
<updated>2011-05-20T01:24:11Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-05-20T01:24:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=39ab05c8e0b519ff0a04a869f065746e6e8c3d95'/>
<id>urn:sha1:39ab05c8e0b519ff0a04a869f065746e6e8c3d95</id>
<content type='text'>
* 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (44 commits)
  debugfs: Silence DEBUG_STRICT_USER_COPY_CHECKS=y warning
  sysfs: remove "last sysfs file:" line from the oops messages
  drivers/base/memory.c: fix warning due to "memory hotplug: Speed up add/remove when blocks are larger than PAGES_PER_SECTION"
  memory hotplug: Speed up add/remove when blocks are larger than PAGES_PER_SECTION
  SYSFS: Fix erroneous comments for sysfs_update_group().
  driver core: remove the driver-model structures from the documentation
  driver core: Add the device driver-model structures to kerneldoc
  Translated Documentation/email-clients.txt
  RAW driver: Remove call to kobject_put().
  reboot: disable usermodehelper to prevent fs access
  efivars: prevent oops on unload when efi is not enabled
  Allow setting of number of raw devices as a module parameter
  Introduce CONFIG_GOOGLE_FIRMWARE
  driver: Google Memory Console
  driver: Google EFI SMI
  x86: Better comments for get_bios_ebda()
  x86: get_bios_ebda_length()
  misc: fix ti-st build issues
  params.c: Use new strtobool function to process boolean inputs
  debugfs: move to new strtobool
  ...

Fix up trivial conflicts in fs/debugfs/file.c due to the same patch
being applied twice, and an unrelated cleanup nearby.
</content>
</entry>
<entry>
<title>PM / Runtime: Rework runtime PM handling during driver removal</title>
<updated>2011-05-17T21:19:17Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2011-04-28T22:33:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e1866b33b1e89f077b7132daae3dfd9a594e9a1a'/>
<id>urn:sha1:e1866b33b1e89f077b7132daae3dfd9a594e9a1a</id>
<content type='text'>
The driver core tries to prevent race conditions between runtime PM
and driver removal from happening by incrementing the runtime PM
usage counter of the device and executing pm_runtime_barrier() before
running the bus notifier and the -&gt;remove() callbacks provided by the
device's subsystem or driver.  This guarantees that, if a future
runtime suspend of the device has been scheduled or a runtime resume
or idle request has been queued up right before the driver removal,
it will be canceled or waited for to complete and no other
asynchronous runtime suspend or idle requests for the device will be
put into the PM workqueue until the -&gt;remove() callback returns.
However, it doesn't prevent resume requests from being queued up
after pm_runtime_barrier() has been called and it doesn't prevent
pm_runtime_resume() from executing the device subsystem's runtime
resume callback.  Morever, it prevents the device's subsystem or
driver from putting the device into the suspended state by calling
pm_runtime_suspend() from its -&gt;remove() routine.  This turns out to
be a major inconvenience for some subsystems and drivers that want to
leave the devices they handle in the suspended state.

To really prevent runtime PM callbacks from racing with the bus
notifier callback in __device_release_driver(), which is necessary,
because the notifier is used by some subsystems to carry out
operations affecting the runtime PM functionality, use
pm_runtime_get_sync() instead of the combination of
pm_runtime_get_noresume() and pm_runtime_barrier().  This will resume
the device if it's in the suspended state and will prevent it from
being suspended again until pm_runtime_put_*() is called.

To allow subsystems and drivers to put devices into the suspended
state by calling pm_runtime_suspend() from their -&gt;remove() routines,
execute pm_runtime_put_sync() after running the bus notifier in
__device_release_driver().  This will require subsystems and drivers
to make their -&gt;remove() callbacks avoid races with runtime PM
directly, but it will allow of more flexibility in the handling of
devices during the removal of their drivers.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>driver core: let dev_set_drvdata return int instead of void as it can fail</title>
<updated>2011-04-23T00:09:13Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2011-04-20T07:44:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c8705082404823a5bb3e02a32ba0764399b9e6f2'/>
<id>urn:sha1:c8705082404823a5bb3e02a32ba0764399b9e6f2</id>
<content type='text'>
Before commit

	b402843 (Driver core: move dev_get/set_drvdata to drivers/base/dd.c)

calling dev_set_drvdata with dev=NULL was an unchecked error. After some
discussion about what to return in this case removing the check (and so
producing a null pointer exception) seems fine.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>driver-core: fix race between device_register and driver_register</title>
<updated>2011-04-23T00:06:29Z</updated>
<author>
<name>Sebastian Ott</name>
<email>sebott@linux.vnet.ibm.com</email>
</author>
<published>2011-04-12T17:05:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8497d6a21c4b17052e868bd53a74c82b557a6c46'/>
<id>urn:sha1:8497d6a21c4b17052e868bd53a74c82b557a6c46</id>
<content type='text'>
When a device is registered to a bus it will be a) added to the list
of devices of the bus and b) bind to a driver (if one matches). As a
result of a driver being registered at this bus between a) and b) this
device could already be bound to a driver. This leads to a warning
and incorrect refcounting.
To fix this add a check to device_attach to identify an already bound
device.

Signed-off-by: Sebastian Ott &lt;sebott@linux.vnet.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>Driver core: Add BUS_NOTIFY_BIND_DRIVER</title>
<updated>2010-08-05T20:53:35Z</updated>
<author>
<name>Magnus Damm</name>
<email>damm@opensource.se</email>
</author>
<published>2010-07-23T10:56:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=45daef0fdcc44f6af86fdebc4fc7eb7c79375398'/>
<id>urn:sha1:45daef0fdcc44f6af86fdebc4fc7eb7c79375398</id>
<content type='text'>
Add BUS_NOTIFY_BIND_DRIVER as a bus notifier event.

For driver binding/unbinding we with this in
place have the following bus notifier events:
 - BUS_NOTIFY_BIND_DRIVER - before -&gt;probe()
 - BUS_NOTIFY_BOUND_DRIVER - after -&gt;probe()
 - BUS_NOTIFY_UNBIND_DRIVER - before -&gt;remove()
 - BUS_NOTIFY_UNBOUND_DRIVER - after -&gt;remove()

The event BUS_NOTIFY_BIND_DRIVER allows bus code
to be notified that -&gt;probe() is about to be called.

Useful for bus code that needs to setup hardware before
the driver gets to run. With this in place platform
drivers can be loaded and unloaded as modules and the
new BIND event allows bus code to control for instance
device clocks that must be enabled before the driver
can be executed.

Without this patch there is no way for the bus code to
get notified that a modular driver is about to be probed.

Signed-off-by: Magnus Damm &lt;damm@opensource.se&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>driver-core: fix potential race condition in drivers/base/dd.c</title>
<updated>2010-05-21T16:37:29Z</updated>
<author>
<name>Stefani Seibold</name>
<email>stefani@seibold.net</email>
</author>
<published>2010-03-06T16:50:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fbb88fadf7dc2dd6d0d1aa88ff521b2f8552996a'/>
<id>urn:sha1:fbb88fadf7dc2dd6d0d1aa88ff521b2f8552996a</id>
<content type='text'>
This patch fix a potential race condition in the driver_bound() function
in the file driver/base/dd.c.

The broadcast of the BUS_NOTIFY_BOUND_DRIVER notifier should be done
after adding the new device to the driver list. Otherwise notifier
listener will fail if they use functions like usb_find_interface().

The patch is against kernel 2.6.33. Please merge it.

Signed-off-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
</feed>
