1. 17 9月, 2012 2 次提交
  2. 19 8月, 2012 1 次提交
  3. 17 8月, 2012 2 次提交
  4. 17 7月, 2012 2 次提交
  5. 12 6月, 2012 1 次提交
  6. 08 5月, 2012 1 次提交
  7. 24 4月, 2012 1 次提交
  8. 19 4月, 2012 1 次提交
  9. 09 3月, 2012 2 次提交
    • G
      driver core: move the deferred probe pointer into the private area · ef8a3fd6
      Greg Kroah-Hartman 提交于
      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 <grant.likely@secretlab.ca>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ef8a3fd6
    • G
      drivercore: Add driver probe deferral mechanism · d1c3414c
      Grant Likely 提交于
      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: NGrant Likely <grant.likely@secretlab.ca>
      Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Dilan Lee <dilee@nvidia.com>
      Cc: Manjunath GKondaiah <manjunath.gkondaiah@linaro.org>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Reviewed-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Acked-by: NDavid Daney <david.daney@cavium.com>
      Reviewed-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d1c3414c
  10. 02 2月, 2012 1 次提交
    • G
      drivercore: Output common devicetree information in uevent · 07d57a32
      Grant Likely 提交于
      When userspace needs to find a specific device, it currently isn't easy to
      resolve a /sys/devices/ path from a specific device tree node.  Nor is it
      easy to obtain the compatible list for devices.
      
      This patch generalizes the code that inserts OF_* values into the uevent
      device attribute so that any device that is attached to an OF node will
      have that information exported to userspace.  Without this patch only
      platform devices and some powerpc-specific busses have access to this
      data.
      
      The original function also creates a MODALIAS property for the compatible
      list, but that code has not been generalized into the common case because
      it has the potential to break module loading on a lot of bus types.  Bus
      types are still responsible for their own MODALIAS properties.
      
      Boot tested on ARM and compile tested on PowerPC and SPARC.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Tobias Klauser <tklauser@distanz.ch>
      Cc: Frederic Lambert <frdrc66@gmail.com>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Mark Brown <broonie@sirena.org.uk>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      07d57a32
  11. 25 1月, 2012 2 次提交
  12. 04 1月, 2012 1 次提交
  13. 15 12月, 2011 1 次提交
    • K
      driver-core: implement 'sysdev' functionality for regular devices and buses · ca22e56d
      Kay Sievers 提交于
      All sysdev classes and sysdev devices will converted to regular devices
      and buses to properly hook userspace into the event processing.
      
      There is no interesting difference between a 'sysdev' and 'device' which
      would justify to roll an entire own subsystem with different userspace
      export semantics. Userspace relies on events and generic sysfs subsystem
      infrastructure from sysdev devices, which are currently not properly
      available.
      
      Every converted sysdev class will create a regular device with the class
      name in /sys/devices/system and all registered devices will becom a children
      of theses devices.
      
      For compatibility reasons, the sysdev class-wide attributes are created
      at this parent device. (Do not copy that logic for anything new, subsystem-
      wide properties belong to the subsystem, not to some fake parent device
      created in /sys/devices.)
      
      Every sysdev driver is implemented as a simple subsystem interface now,
      and no longer called a driver.
      
      After all sysdev classes are ported to regular driver core entities, the
      sysdev implementation will be entirely removed from the kernel.
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ca22e56d
  14. 08 12月, 2011 1 次提交
    • A
      PM / Driver core: leave runtime PM enabled during system shutdown · fe6b91f4
      Alan Stern 提交于
      Disabling all runtime PM during system shutdown turns out not to be a
      good idea, because some devices may need to be woken up from a
      low-power state at that time.
      
      The whole point of disabling runtime PM for system shutdown was to
      prevent untimely runtime-suspend method calls.  This patch (as1504)
      accomplishes the same result by incrementing the usage count for each
      device and waiting for ongoing runtime-PM callbacks to finish.  This
      is what we already do during system suspend and hibernation, which
      makes sense since the shutdown method is pretty much a legacy analog
      of the pm->poweroff method.
      
      This fixes a recent regression on some OMAP systems introduced by
      commit af8db150 (PM / driver core:
      disable device's runtime PM during shutdown).
      Reported-and-tested-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      fe6b91f4
  15. 16 11月, 2011 1 次提交
    • P
      PM / driver core: disable device's runtime PM during shutdown · af8db150
      Peter Chen 提交于
      There may be an issue when the user issue "reboot/shutdown" command, then
      the device has shut down its hardware, after that, this runtime-pm featured
      device's driver will probably be scheduled to do its suspend routine,
      and at its suspend routine, it may access hardware, but the device has
      already shutdown physically, then the system hang may be occurred.
      
      I ran out this issue using an auto-suspend supported USB devices, like
      3G modem, keyboard. The usb runtime suspend routine may be scheduled
      after the usb controller has been shut down, and the usb runtime suspend
      routine will try to suspend its roothub(controller), it will access
      register, then the system hang occurs as the controller is shutdown.
      Signed-off-by: NPeter Chen <peter.chen@freescale.com>
      Acked-by: NMing Lei <tom.leiming@gmail.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Cc: stable@kernel.org
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      af8db150
  16. 23 8月, 2011 1 次提交
  17. 23 4月, 2011 1 次提交
  18. 20 4月, 2011 1 次提交
  19. 04 2月, 2011 2 次提交
  20. 08 1月, 2011 1 次提交
  21. 30 11月, 2010 1 次提交
  22. 18 11月, 2010 1 次提交
  23. 23 10月, 2010 3 次提交
    • R
      driver core: fix build for CONFIG_BLOCK not enabled · ead454fe
      Randy Dunlap 提交于
      Fix build errors when CONFIG_BLOCK is not enabled:
      
      drivers/base/core.c: In function 'get_device_parent':
      drivers/base/core.c:634: error: 'block_class' undeclared (first use in this function)
      drivers/base/core.c: In function 'device_add_class_symlinks':
      drivers/base/core.c:723: error: 'block_class' undeclared (first use in this function)
      drivers/base/core.c: In function 'device_remove_class_symlinks':
      drivers/base/core.c:751: error: 'block_class' undeclared (first use in this function)
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ead454fe
    • A
      SYSFS: Allow boot time switching between deprecated and modern sysfs layout · e52eec13
      Andi Kleen 提交于
      I have some systems which need legacy sysfs due to old tools that are
      making assumptions that a directory can never be a symlink to another
      directory, and it's a big hazzle to compile separate kernels for them.
      
      This patch turns CONFIG_SYSFS_DEPRECATED into a run time option
      that can be switched on/off the kernel command line. This way
      the same binary can be used in both cases with just a option
      on the command line.
      
      The old CONFIG_SYSFS_DEPRECATED_V2 option is still there to set
      the default. I kept the weird name to not break existing
      config files.
      
      Also the compat code can be still completely disabled by undefining
      CONFIG_SYSFS_DEPRECATED_SWITCH -- just the optimizer takes
      care of this now instead of lots of ifdefs. This makes the code
      look nicer.
      
      v2: This is an updated version on top of Kay's patch to only
      handle the block devices. I tested it on my old systems
      and that seems to work.
      
      Cc: axboe@kernel.dk
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e52eec13
    • K
      driver core: remove CONFIG_SYSFS_DEPRECATED_V2 but keep it for block devices · 39aba963
      Kay Sievers 提交于
      This patch removes the old CONFIG_SYSFS_DEPRECATED_V2 config option,
      but it keeps the logic around to handle block devices in the old manner
      as some people like to run new kernel versions on old (pre 2007/2008)
      distros.
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Stephen Hemminger <shemminger@vyatta.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: "James E.J. Bottomley" <James.Bottomley@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jaroslav Kysela <perex@perex.cz>
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: David Howells <dhowells@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      39aba963
  24. 09 8月, 2010 1 次提交
  25. 06 8月, 2010 1 次提交
  26. 26 7月, 2010 1 次提交
    • E
      Driver-core: Always create class directories for classses that support namespaces. · 24b1442d
      Eric W. Biederman 提交于
      This fixes the regression in 2.6.35-rcX where bluetooth network devices
      would fail to be deleted from sysfs, causing their destruction and
      recreation to fail.  In addition this fixes the mac80211_hwsim driver
      where it would leave around sysfs files when the driver was removed.
      
      This problem is discussed at
        https://bugzilla.kernel.org/show_bug.cgi?id=16257
      
      The reason for the regression is that the network namespace support
      added to sysfs expects and requires that network devices be put in
      directories that can contain only network devices.
      
      Today get_device_parent almost provides that guarantee for all class
      devices, except for a specific exception when the parent of a class
      devices is a class device.  It would be nice to simply remove that
      arguably incorrect special case, but apparently the input devices depend
      on it being there.  So I have only removed it for class devices with
      network namespace support.  Which today are the network devices.
      
      It has been suggested that a better fix would be to change the parent
      device from a class device to a bus device, which in the case of the
      bluetooth driver would change /sys/class/bluetooth to /sys/bus/bluetoth,
      I can not see how we would avoid significant userspace breakage if we
      were to make that change.
      
      Adding an extra directory in the path to the device will also be
      userspace visible but it is much less likely to break things.
      Everything is still accessible from /sys/class (for example), and it
      fixes two bugs.  Adding an extra directory fixes a 3 year old regression
      introduced with the new sysfs layout that makes it impossible to rename
      bnep0 network devices to names that conflict with hci device attributes
      like hci_revsion.  Adding an additional directory removes the new
      failure modes introduced by the network namespace code.
      
      If it weren't for the regession in the renaming of network devices I
      would figure out how to just make the sysfs code deal with this
      configuration of devices.
      
      In summary this patch fixes regressions by changing:
      "/sys/class/bluetooth/hci0/bnep0" to "/sys/class/bluetooth/hci0/net/bnep0".
      Reported-by: NJohannes Berg <johannes@sipsolutions.net>
      Reported-by: NJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      24b1442d
  27. 05 7月, 2010 1 次提交
  28. 22 5月, 2010 5 次提交