1. 09 5月, 2009 2 次提交
  2. 07 5月, 2009 1 次提交
  3. 22 4月, 2009 1 次提交
    • A
      driver synchronization: make scsi_wait_scan more advanced · d4d5291c
      Arjan van de Ven 提交于
      There is currently only one way for userspace to say "wait for my storage
      device to get ready for the modules I just loaded": to load the
      scsi_wait_scan module. Expectations of userspace are that once this
      module is loaded, all the (storage) devices for which the drivers
      were loaded before the module load are present.
      
      Now, there are some issues with the implementation, and the async
      stuff got caught in the middle of this: The existing code only
      waits for the scsy async probing to finish, but it did not take
      into account at all that probing might not have begun yet.
      (Russell ran into this problem on his computer and the fix works for him)
      
      This patch fixes this more thoroughly than the previous "fix", which
      had some bad side effects (namely, for kernel code that wanted to wait for
      the scsi scan it would also do an async sync, which would deadlock if you did
      it from async context already.. there's a report about that on lkml):
      The patch makes the module first wait for all device driver probes, and then it
      will wait for the scsi parallel scan to finish.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Tested-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d4d5291c
  4. 20 4月, 2009 1 次提交
    • K
      driver: dont update dev_name via device_add path · 8a577ffc
      Kay Sievers 提交于
      notice one system /proc/iomem some entries missed the name for pci_devices
      
      it turns that dev->dev.kobj name is changed after device_add.
      
      for pci code: via acpi_pci_root_driver.ops.add (aka acpi_pci_root_add)
      ==> pci_acpi_scan_root is used to scan pci bus/device, and at the same
      time we read the resource for pci_dev in the pci_read_bases, we have
      res->name = pci_name(pci_dev); pci_name is calling dev_name.
      
      later via acpi_pci_root_driver.ops.start (aka acpi_pci_root_start) ==>
      pci_bus_add_device to add all pci_dev in kobj tree.  pci_bus_add_device
      will call device_add.
      
      actually in device_add
      
              /* first, register with generic layer. */
              error = kobject_add(&dev->kobj, dev->kobj.parent, "%s", dev_name(dev));
              if (error)
                      goto Error;
      
      will get one new name for that kobj, old name is freed.
      
      [Impact: fix corrupted names in /proc/iomem ]
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8a577ffc
  5. 17 4月, 2009 3 次提交
    • G
      driver core: prevent device_for_each_child from oopsing · 014c90db
      Greg Kroah-Hartman 提交于
      David Vrabel noticed that the wireless usb stack likes to call
      device_for_each_chile() with an empty bus.  This used to work fine, but
      now oopses.  This patch fixes the oops and makes the code behave like it
      used to.
      Reported-by: NDavid Vrabel <david.vrabel@csr.com>
      Tested-by: NDavid Vrabel <david.vrabel@csr.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      014c90db
    • M
      Driver Core: early platform driver · 13977091
      Magnus Damm 提交于
      V3 of the early platform driver implementation.
      
      Platform drivers are great for embedded platforms because we can separate
      driver configuration from the actual driver.  So base addresses,
      interrupts and other configuration can be kept with the processor or board
      code, and the platform driver can be reused by many different platforms.
      
      For early devices we have nothing today.  For instance, to configure early
      timers and early serial ports we cannot use platform devices.  This
      because the setup order during boot.  Timers are needed before the
      platform driver core code is available.  The same goes for early printk
      support.  Early in this case means before initcalls.
      
      These early drivers today have their configuration either hard coded or
      they receive it using some special configuration method.  This is working
      quite well, but if we want to support both regular kernel modules and
      early devices then we need to have two ways of configuring the same
      driver.  A single way would be better.
      
      The early platform driver patch is basically a set of functions that allow
      drivers to register themselves and architecture code to locate them and
      probe.  Registration happens through early_param().  The time for the
      probe is decided by the architecture code.
      
      See Documentation/driver-model/platform.txt for more details.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NMagnus Damm <damm@igel.co.jp>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Tejun Heo <htejun@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      13977091
    • M
      driver core: fix driver_match_device · 5247aecf
      Ming Lei 提交于
      This patch fixes a bug introduced in commit
      49b420a1.
      
      If a instance of bus_type doesn't have  .match method,
      all .probe of drivers in the bus should be called, or else
      the .probe have not a chance to be called.
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Reported-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5247aecf
  6. 07 4月, 2009 1 次提交
  7. 31 3月, 2009 1 次提交
    • R
      PM: Rework handling of interrupts during suspend-resume · 2ed8d2b3
      Rafael J. Wysocki 提交于
      Use the functions introduced in by the previous patch,
      suspend_device_irqs(), resume_device_irqs() and check_wakeup_irqs(),
      to rework the handling of interrupts during suspend (hibernation) and
      resume.  Namely, interrupts will only be disabled on the CPU right
      before suspending sysdevs, while device drivers will be prevented
      from receiving interrupts, with the help of the new helper function,
      before their "late" suspend callbacks run (and analogously during
      resume).
      
      In addition, since the device interrups are now disabled before the
      CPU has turned all interrupts off and the CPU will ACK the interrupts
      setting the IRQ_PENDING bit for them, check in sysdev_suspend() if
      any wake-up interrupts are pending and abort suspend if that's the
      case.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      2ed8d2b3
  8. 30 3月, 2009 2 次提交
  9. 25 3月, 2009 15 次提交
  10. 24 3月, 2009 1 次提交
  11. 13 3月, 2009 1 次提交
  12. 11 3月, 2009 1 次提交
    • R
      mm: get_nid_for_pfn() returns int · 47504980
      Roel Kluin 提交于
      get_nid_for_pfn() returns int
      
      Presumably the (nid < 0) case has never happened.
      
      We do know that it is happening on one system while creating a symlink for
      a memory section so it should also happen on the same system if
      unregister_mem_sect_under_nodes() were called to remove the same symlink.
      
      The test was actually added in response to a problem with an earlier
      version reported by Yasunori Goto where one or more of the leading pages
      of a memory section on the 2nd node of one of his systems was
      uninitialized because I believe they coincided with a memory hole.
      
      That earlier version did not ignore uninitialized pages and determined
      the nid by considering only the 1st page of each memory section.  This
      caused the symlink to the 1st memory section on the 2nd node to be
      incorrectly created in /sys/devices/system/node/node0 instead of
      /sys/devices/system/node/node1.  The problem was fixed by adding the
      test to skip over uninitialized pages.
      
      I suspect we have not seen any reports of the non-removal
      of a symlink due to the incorrect declaration of the nid
      variable in unregister_mem_sect_under_nodes() because
        - systems where a memory section could have an uninitialized
          range of leading pages are probably rare.
        - memory remove is probably not done very frequently on the
          systems that are capable of demonstrating the problem.
        - lingering symlink(s) that should have been removed may
          have simply gone unnoticed.
      
      [garyhade@us.ibm.com: wrote changelog]
      Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
      Cc: Gary Hade <garyhade@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      47504980
  13. 05 3月, 2009 1 次提交
  14. 23 2月, 2009 2 次提交
  15. 22 2月, 2009 1 次提交
  16. 29 1月, 2009 1 次提交
  17. 21 1月, 2009 1 次提交
    • R
      driver core: Convert '/' to '!' in dev_set_name() · 7143f7a1
      Roland Dreier 提交于
      Commit 3ada8b7e ("block: struct device - replace bus_id with dev_name(),
      dev_set_name()") deleted the code in register_disk() that changed a '/'
      to a '!' in the device name when registering a disk, but dev_set_name()
      does not perform this conversion.
      
      This leads to amusing problems with disks that have '/' in their names:
      for example a failure to boot with the root partition on a cciss device,
      even though the kernel says it knows about the root device:
      
          VFS: Cannot open root device "cciss/c0d0p6" or unknown-block(0,0)
          Please append a correct "root=" boot option; here are the available partitions:
          6800        71652960 cciss/c0d0 driver: cciss
            6802               1 cciss/c0d0p2
            6805         2931831 cciss/c0d0p5
            6806        34354908 cciss/c0d0p6
          6810        71652960 cciss/c0d1 driver: cciss
      
      Fix this by adding code to change '/' to '!' in dev_set_name() to handle
      this until dev_set_name() is converted to use kobject_set_name().
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      Acked-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7143f7a1
  18. 12 1月, 2009 2 次提交
  19. 10 1月, 2009 2 次提交