1. 06 11月, 2005 1 次提交
  2. 31 10月, 2005 3 次提交
  3. 30 10月, 2005 3 次提交
  4. 29 10月, 2005 11 次提交
    • A
      [PATCH] USB: fix pm patches with CONFIG_PM off part 2 · 9a7834d0
      Andrew Morton 提交于
      With CONFIG_PM=n:
      
      drivers/built-in.o(.text+0x1098c): In function `hub_thread':
      drivers/usb/core/hub.c:2673: undefined reference to `.dpm_runtime_resume'
      drivers/built-in.o(.text+0x10998):drivers/usb/core/hub.c:2674: undefined reference to `.dpm_runtime_resume'
      
      Please, never ever ever put extern decls into .c files.  Use the darn header
      files :(
      
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9a7834d0
    • D
      [PATCH] root hub changes (lesser half) · 979d5199
      David Brownell 提交于
      This patch collects various small updates related to root hubs, to shrink
      later patches which build on them.
      
        - For root hub suspend/resume support:
           * Make the existing usb_hcd_resume_root_hub() routine respect pmcore
             locking, exporting and using the dpm_runtime_resume() method.
           * Add a new usb_hcd_suspend_root_hub() to pair with that routine.
             (Essential to make OHCI autosuspend behave again...)
           * HC_SUSPENDED by itself only refers to the root hub's downstream ports.
             So let HCDs see root hub URBs unless the parent device is suspended.
      
        - Remove an assertion we no longer need (and now, also don't want).
      
        - Generic suspend/resume updates to work better with swsusp.
           * Ignore the FREEZE vs SUSPEND distinction for hardware; trying to
             use it breaks the swsusp snapshots it's supposed to help (sigh).
           * On resume, mark devices as resumed right away, but then
             do nothing else if the device is marked NOTATTACHED.
      
      These changes shouldn't be very noticable by themselves.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       drivers/base/power/runtime.c |    1
       drivers/usb/core/hcd.c       |   64 ++++++++++++++++++++++++++++++++++++++-----
       drivers/usb/core/hcd.h       |    1
       drivers/usb/core/hub.c       |   45 ++++++++++++++++++++++++------
       drivers/usb/core/usb.c       |   20 +++++++++----
       drivers/usb/core/usb.h       |    1
       6 files changed, 111 insertions(+), 21 deletions(-)
      979d5199
    • D
      [PATCH] one less word in struct device · e9b7bd4e
      David Brownell 提交于
      This saves a word from "struct device" ... there's a refcounting mechanism
      stub that's rather ineffective (the values are never even tested!), which
      can safely be deleted.  With this patch it uses normal device refcounting,
      so any potential users of the pm_parent mechanism will be more correct.
      (That mechanism is actually unusable for now though; it does nothing.)
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       drivers/base/power/main.c |   26 +++-----------------------
       include/linux/pm.h        |    1 -
       2 files changed, 3 insertions(+), 24 deletions(-)
      e9b7bd4e
    • R
      [PATCH] kernel-doc: drivers/base fixes · c41455fb
      Randy Dunlap 提交于
      driver/base: add missing function parameters; eliminate all warnings.
      Signed-off-by: NRandy Dunlap <rdunlap@xenotime.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c41455fb
    • R
      [PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacks · 9480e307
      Russell King 提交于
      In PM v1, all devices were called at SUSPEND_DISABLE level.  Then
      all devices were called at SUSPEND_SAVE_STATE level, and finally
      SUSPEND_POWER_DOWN level.  However, with PM v2, to maintain
      compatibility for platform devices, I arranged for the PM v2
      suspend/resume callbacks to call the old PM v1 suspend/resume
      callbacks three times with each level in order so that existing
      drivers continued to work.
      
      Since this is obsolete infrastructure which is no longer necessary,
      we can remove it.  Here's an (untested) patch to do exactly that.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9480e307
    • B
      [PATCH] drivers/base - fix sparse warnings · a1bdc7aa
      Ben Dooks 提交于
      There are a number of sparse warnings from the latest sparse
      snapshot being generated from the drivers/base build. The
      main culprits are due to the initialisation functions not
      being declared in a header file.
      
      Also, the firmware.c file should include <linux/device.h>
      to get the prototype of  firmware_register() and
      firmware_unregister().
      
      This patch moves the init function declerations from the
      init.c file to the base.h, and ensures it is included in
      all the relevant c sources. It also adds <linux/device.h>
      to the included headers for firmware.c.
      
      The patch does not solve all the sparse errors generated,
      but reduces the count significantly.
      
      drivers/base/core.c:161:1: warning: symbol 'devices_subsys' was not declared. Should it be static?
      drivers/base/core.c:417:12: warning: symbol 'devices_init' was not declared. Should it be static?
      drivers/base/sys.c:253:6: warning: symbol 'sysdev_shutdown' was not declared. Should it be static?
      drivers/base/sys.c:326:5: warning: symbol 'sysdev_suspend' was not declared. Should it be static?
      drivers/base/sys.c:428:5: warning: symbol 'sysdev_resume' was not declared. Should it be static?
      drivers/base/sys.c:450:12: warning: symbol 'system_bus_init' was not declared. Should it be static?
      drivers/base/bus.c:133:1: warning: symbol 'bus_subsys' was not declared. Should it be static?
      drivers/base/bus.c:667:12: warning: symbol 'buses_init' was not declared. Should it be static?
      drivers/base/class.c:759:12: warning: symbol 'classes_init' was not declared. Should it be static?
      drivers/base/platform.c:313:12: warning: symbol 'platform_bus_init' was not declared. Should it be static?
      drivers/base/cpu.c:110:12: warning: symbol 'cpu_dev_init' was not declared. Should it be static?
      drivers/base/firmware.c:17:5: warning: symbol 'firmware_register' was not declared. Should it be static?
      drivers/base/firmware.c:23:6: warning: symbol 'firmware_unregister' was not declared. Should it be static?
      drivers/base/firmware.c:28:12: warning: symbol 'firmware_init' was not declared. Should it be static?
      drivers/base/init.c:28:13: warning: symbol 'driver_init' was not declared. Should it be static?
      drivers/base/dmapool.c:174:10: warning: implicit cast from nocast type
      drivers/base/attribute_container.c:439:1: warning: symbol 'attribute_container_init' was not declared. Should it be static?
      drivers/base/power/runtime.c:76:6: warning: symbol 'dpm_set_power_state' was not declared. Should it be static?
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a1bdc7aa
    • G
      [PATCH] Driver Core: add the ability for class_device structures to be nested · 51d172d5
      Greg Kroah-Hartman 提交于
      This patch allows struct class_device to be nested, so that another
      struct class_device can be the parent of a new one, instead of only
      having the struct class be the parent.  This will allow us to
      (hopefully) fix up the input and video class subsystem mess.
      
      But please people, don't go crazy and start making huge trees of class
      devices, you should only need 2 levels deep to get everything to work
      (remember to use a class_interface to get notification of a new class
      device being added to the system.)
      
      Oh, this also allows us to have the possibility of potentially, someday,
      moving /sys/block into /sys/class.  The main hindrance is that pesky
      /dev numberspace issue...
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      51d172d5
    • K
      [PATCH] add sysfs attr to re-emit device hotplug event · a7fd6706
      Kay Sievers 提交于
      A "coldplug + udevstart" can be simple like this:
        for i in /sys/block/*/*/uevent; do echo 1 > $i; done
        for i in /sys/class/*/*/uevent; do echo 1 > $i; done
        for i in /sys/bus/*/devices/*/uevent; do echo 1 > $i; done
      Signed-off-by: NKay Sievers <kay.sievers@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a7fd6706
    • D
      [PATCH] Driver core: pass interface to class interface methods · d8539d81
      Dmitry Torokhov 提交于
      Driver core: pass interface to class intreface methods
      
      Pass interface as argument to add() and remove() class interface
      methods. This way a subsystem can implement generic add/remove
      handlers and then call interface-specific ones.
      Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d8539d81
    • D
      [PATCH] Driver core: send hotplug event before adding class interfaces · dbe9035d
      Dmitry Torokhov 提交于
      Move call to kobject_hotplug() above code that adds interfaces
      to a class device, otherwise children's hotplug events may reach
      userspace first.
      Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      dbe9035d
    • D
      [PATCH] driver model wakeup flags · 0ac85241
      David Brownell 提交于
      This is a refresh of an earlier patch to add "wakeup" support to the
      PM core model.  This provides per-device bus-neutral control of the
      use of wakeup events.
      
        * "struct device_pm_info" has two bits that are initialized as
          part of setting up the enclosing struct device:
            - "can_wakeup", reflecting hardware capabilities
            - "may_wakeup", the policy setting (when CONFIG_PM)
      
        * There's a writeable sysfs "wakeup" file, with one of two values:
            - "enabled", when the policy is to allow wakeup
            - "disabled", when the policy is not to allow it
            - "" if the device can't currently issue wakeups
      
      By default, wakeup is enabled on all devices that support it.  If its
      driver doesn't support it ... treat it as a bug.  :)
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0ac85241
  5. 09 10月, 2005 1 次提交
  6. 22 9月, 2005 2 次提交
    • B
      [PATCH] fix class symlinks in sysfs · 3e51377d
      Bill Nottingham 提交于
      The class symlinks in sysfs don't properly handle changing device names.
      
      To demonstrate, rename your network device from eth0 to eth1. Your
      pci (or usb, or whatever) device will still have a 'net:eth0' link,
      except now it points to /sys/class/net/eth1.
      
      The attached patch makes sure the class symlink name changes when
      the class device name changes. It isn't 100% correct, it should be
      using sysfs_rename_link. Unfortunately, sysfs_rename_link doesn't exist.
      Signed-off-by: NBill Nottingham <notting@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3e51377d
    • D
      [PATCH] Driver Core: fis bus rescan devices race · 4c898c7f
      Daniel Ritz 提交于
      bus_rescan_devices_helper() does not hold the dev->sem when it checks for
      !dev->driver().  device_attach() holds the sem, but calls again
      device_bind_driver() even when dev->driver is set.
      
      What happens is that a first device_attach() call (module insertion time)
      is on the way binding the device to a driver.  Another thread calls
      bus_rescan_devices().  Now when bus_rescan_devices_helper() checks for
      dev->driver it is still NULL 'cos the the prior device_attach() is not yet
      finished.  But as soon as the first one releases the dev->sem the second
      device_attach() tries to rebind the already bound device again.
      device_bind_driver() does this blindly which leads to a corrupt
      driver->klist_devices list (the device links itself, the head points to the
      device).  Later a call to device_release_driver() sets dev->driver to NULL
      and breaks the link it has to itself on knode_driver.  Rmmoding the driver
      later calls driver_detach() which leads to an endless loop 'cos the list
      head in klist_devices still points to the device.  And since dev->driver is
      NULL it's stuck with the same device forever.  Boom.  And rmmod hangs.
      
      Very easy to reproduce with new-style pcmcia and a 16bit card.  Just loop
      modprobe <pcmcia-modules> ;cardctl eject; rmmod <card driver, pcmcia
      modules>.
      
      Easiest fix is to check if the device is already bound to a driver in
      device_bind_driver().  This avoids the double binding.
      Signed-off-by: NDaniel Ritz <daniel.ritz@gmx.ch>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4c898c7f
  7. 13 9月, 2005 1 次提交
  8. 11 9月, 2005 1 次提交
  9. 08 9月, 2005 4 次提交
  10. 06 9月, 2005 5 次提交
  11. 05 9月, 2005 2 次提交
  12. 31 8月, 2005 2 次提交
  13. 29 8月, 2005 1 次提交
  14. 18 8月, 2005 1 次提交
  15. 17 8月, 2005 1 次提交
  16. 15 8月, 2005 1 次提交
    • J
      [SCSI] correct transport class abstraction to work outside SCSI · d0a7e574
      James Bottomley 提交于
      I recently tried to construct a totally generic transport class and
      found there were certain features missing from the current abstract
      transport class.  Most notable is that you have to hang the data on the
      class_device but most of the API is framed in terms of the generic
      device, not the class_device.
      
      These changes are two fold
      
      - Provide the class_device to all of the setup and configure APIs
      - Provide and extra API to take the device and the attribute class and
        return the corresponding class_device
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      d0a7e574