1. 13 6月, 2009 7 次提交
  2. 29 5月, 2009 1 次提交
  3. 25 5月, 2009 1 次提交
    • R
      PM: Do not hold dpm_list_mtx while disabling/enabling nonboot CPUs · 32bdfac5
      Rafael J. Wysocki 提交于
      We shouldn't hold dpm_list_mtx while executing
      [disable|enable]_nonboot_cpus(), because theoretically this may lead
      to a deadlock as shown by the following example (provided by Johannes
      Berg):
      
      CPU 3       CPU 2                     CPU 1
                                            suspend/hibernate
                  something:
                  rtnl_lock()               device_pm_lock()
                                             -> mutex_lock(&dpm_list_mtx)
      
                  mutex_lock(&dpm_list_mtx)
      
      linkwatch_work
       -> rtnl_lock()
                                            disable_nonboot_cpus()
                                             -> flush CPU 3 workqueue
      
      Fortunately, device drivers are supposed to stop any activities that
      might lead to the registration of new device objects way before
      disable_nonboot_cpus() is called, so it shouldn't be necessary to
      hold dpm_list_mtx over the entire late part of device suspend and
      early part of device resume.
      
      Thus, during the late suspend and the early resume of devices acquire
      dpm_list_mtx only when dpm_list is going to be traversed and release
      it right after that.
      
      This patch is reported to fix the regressions tracked as
      http://bugzilla.kernel.org/show_bug.cgi?id=13245.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Reported-by: NMiles Lane <miles.lane@gmail.com>
      Tested-by: NMing Lei <tom.leiming@gmail.com>
      32bdfac5
  4. 15 5月, 2009 1 次提交
    • D
      firmware: speed up request_firmware(), v3 · 6e03a201
      David Woodhouse 提交于
      Rather than calling vmalloc() repeatedly to grow the firmware image as
      we receive data from userspace, just allocate and fill individual pages.
      Then vmap() the whole lot in one go when we're done.
      
      A quick test with a 337KiB iwlagn firmware shows the time taken for
      request_firmware() going from ~32ms to ~5ms after I apply this patch.
      
      [v2: define PAGE_KERNEL_RO as PAGE_KERNEL where necessary, use min_t()]
      [v3: kunmap() takes the struct page *, not the virtual address]
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      Tested-by: NSachin Sant <sachinp@in.ibm.com>
      6e03a201
  5. 09 5月, 2009 3 次提交
    • G
      Revert driver core: move platform_data into platform_device · e67c8562
      Greg Kroah-Hartman 提交于
      This reverts commit 006f4571:
      
      	This patch moves platform_data from struct device into
      	struct platform_device, based on the two ideas:
      
      	1. Now all platform_driver is registered by platform_driver_register,
      	   which makes probe()/release()/... of platform_driver passed parameter
      	   of platform_device *, so platform driver can get platform_data from
      	   platform_device;
      
      	2. Other kind of devices do not need to use platform_data, we can
      	   decrease size of device if moving it to platform_device.
      
      	Taking into consideration of thousands of files to be fixed and they
      	can't be finished in one night(maybe it will take a long time), so we
      	keep platform_data in device to allow two kind of cases coexist until
      	all platform devices pass its platfrom data from
      	platform_device->platform_data.
      
      	All patches to do this kind of conversion are welcome.
      
      As we don't really want to do it, it was a bad idea.
      
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Ming Lei <tom.leiming@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      e67c8562
    • M
      Revert driver core: fix passing platform_data · bee86321
      Ming Lei 提交于
      This reverts commit ce21c7bc:
      	We will remove platform_data field from struct device until
      	all platform devices pass its specific data from platfom_device
      	and all platform drivers use platform specific data passed by
      	platform_device->platform_data. This kind of conversion will
      	need a long time, for thousands of files is affected.
      
      	To make the conversion easily, we allow platform specific data
      	passed by struct device or struct platform_device and platform
      	driver may use it from struct device or struct platform_device.
      
      As we really don't want to do this at all.
      
      
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Ming Lei <tom.leiming@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      bee86321
    • R
      Driver core: platform: fix kernel-doc warnings · d86c1302
      Randy Dunlap 提交于
      Fix function parameter notation in platform.c;
      fixes kernel-doc warnings.
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d86c1302
  6. 07 5月, 2009 1 次提交
  7. 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
  8. 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
  9. 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
  10. 07 4月, 2009 1 次提交
  11. 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
  12. 30 3月, 2009 2 次提交
  13. 25 3月, 2009 15 次提交
  14. 24 3月, 2009 1 次提交
  15. 13 3月, 2009 1 次提交