1. 10 9月, 2008 1 次提交
  2. 11 6月, 2008 2 次提交
    • A
      PCI: introduce pci_slot · f46753c5
      Alex Chiang 提交于
      Currently, /sys/bus/pci/slots/ only exposes hotplug attributes when a
      hotplug driver is loaded, but PCI slots have attributes such as address,
      speed, width, etc.  that are not related to hotplug at all.
      
      Introduce pci_slot as the primary data structure and kobject model.
      Hotplug attributes described in hotplug_slot become a secondary
      structure associated with the pci_slot.
      
      This patch only creates the infrastructure that allows the separation of
      PCI slot attributes and hotplug attributes.  In this patch, the PCI
      hotplug core remains the only user of this infrastructure, and thus,
      /sys/bus/pci/slots/ will still only become populated when a hotplug
      driver is loaded.
      
      A later patch in this series will add a second user of this new
      infrastructure and demonstrate splitting the task of exposing pci_slot
      attributes from hotplug_slot attributes.
      
        - Make pci_slot the primary sysfs entity. hotplug_slot becomes a
          subsidiary structure.
          o pci_create_slot() creates and registers a slot with the PCI core
          o pci_slot_add_hotplug() gives it hotplug capability
      
        - Change the prototype of pci_hp_register() to take the bus and
          slot number (on parent bus) as parameters.
      
        - Remove all the ->get_address methods since this functionality is
          now handled by pci_slot directly.
      
      [achiang@hp.com: rpaphp-correctly-pci_hp_register-for-empty-pci-slots]
      Tested-by: NBadari Pulavarty <pbadari@us.ibm.com>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      [akpm@linux-foundation.org: build fix]
      [akpm@linux-foundation.org: make headers_check happy]
      [akpm@linux-foundation.org: nuther build fix]
      [akpm@linux-foundation.org: fix typo in #include]
      Signed-off-by: NAlex Chiang <achiang@hp.com>
      Signed-off-by: NMatthew Wilcox <matthew@wil.cx>
      Cc: Greg KH <greg@kroah.com>
      Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
      Cc: Len Brown <lenb@kernel.org>
      Acked-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      f46753c5
    • A
      PCI: construct one fakephp slot per PCI slot · fe99740c
      Alex Chiang 提交于
      Register one slot per slot, rather than one slot per function.  Change the
      name of the slot to fake%d instead of the pci address.
      Signed-off-by: NAlex Chiang <achiang@hp.com>
      Signed-off-by: NMatthew Wilcox <matthew@wil.cx>
      Cc: Greg KH <greg@kroah.com>
      Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      fe99740c
  3. 21 4月, 2008 2 次提交
    • H
      PCI: replace remaining __FUNCTION__ occurrences · 66bef8c0
      Harvey Harrison 提交于
      __FUNCTION__ is gcc-specific, use __func__
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      66bef8c0
    • T
      PCI: Hotplug: fakephp: Return success, not ENODEV, when bus rescan is triggered · ca99eb8c
      Trent Piepho 提交于
      The 'power' attribute of the fakephp driver originally only let one turn a
      slot off.  If one tried to turn a slot on (echo 1 > .../power), it would
      return ENODEV, as fakephp did not support this function.
      
      An old (pre-git) patch changed this:
      2004/11/11 16:33:31-08:00 jdittmer
      [PATCH] fakephp: add pci bus rescan ability
      http://article.gmane.org/gmane.linux.kernel/251183
      
      Now writing "1" to the power attribute has the effect of triggering a bus
      rescan, but it still returns ENODEV, probably an oversight in the above
      patch.
      
      Using the BusyBox echo will not produce an error message, but will
      trigger *two* bus rescans (and return an exit code of 1):
      ~ # strace echo -n 1 > /sys/bus/pci/slots/0000:00:00.0/power
      ...
      write(1, "1", 1)                        = -1 ENODEV (No such device)
      write(1, "1", 1)                        = -1 ENODEV (No such device)
      exit(1)                                 = ?
      
      Using cp gives a write error, even though the write did happen and a rescan
      was triggered:
      ~ # echo -n 1 > tmp ; cp tmp /sys/bus/pci/slots/0000:00:00.0/power
      cp: Write Error: No such device
      
      It seems much better to return success instead of failure.  The actual
      status of the bus rescan is hard to return.  It happens asynchronously in a
      work thread, so the sysfs store functions returns before any status is
      ready (the whole point of the work queue).  And even if it didn't do this,
      the rescan doesn't have any clear status to return.
      Signed-off-by: NTrent Piepho <tpiepho@freescale.com>
      CC: Jan Dittmer <jdittmer@ppp0.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ca99eb8c
  4. 02 2月, 2008 1 次提交
    • I
      PCI: Fix fakephp deadlock · 5c796ae7
      Ian Abbott 提交于
      If the fakephp driver is used to emulate removal of a PCI device by
      writing text string "0" to the "power" sysfs attribute file, this causes
      its parent directory and its contents (including the "power" file) to be
      deleted before the write operation returns.  Unfortunately, it ends up
      in a deadlock waiting for itself to complete.
      
      The deadlock is as follows: sysfs_write_file calls flush_write_buffer
      which calls sysfs_get_active_two before calling power_write_file in
      pci_hotplug_core.c via the sysfs store operation. The power_write_file
      function calls disable_slot in fakephp.c via the slot operation.  The
      disable_slot function calls remove_slot which calls pci_hp_deregister
      (back in pci_hotplug_core.c) which calls fs_remove_slot which calls
      sysfs_remove_file to remove the "power" file. The sysfs_remove_file
      function calls sysfs_hash_and_remove which calls sysfs_addrm_finish
      which calls sysfs_deactivate. The sysfs_deactivate function sees that
      something has an active reference on the sysfs_dirent (from the
      previous call to sysfs_get_active_two back up the call stack somewhere)
      so waits for the active reference to go away, which is of course
      impossible.
      
      The problem has been present since 2.6.21.
      
      This patch breaks the deadlock by queuing work queue items on a single-
      threaded work queue to remove a slot from sysfs, and to rescan the PCI
      buses.  There is also some protection against disabling a slot that is
      already being removed.
      Signed-off-by: NIan Abbott <abbotti@mev.co.uk>
      Cc: Kristen Accardi <kristen.c.accardi@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5c796ae7
  5. 29 11月, 2007 1 次提交
    • R
      pci hotplug: kernel-doc fixes · 26e6c66e
      Randy Dunlap 提交于
      acpiphp.h: not using kernel-doc, so change /** to /*
      acpiphp_core.c: lots of kernel-doc cleanups
      acpiphp_glue.c: lots of kernel-doc cleanups
      acpiphp_ibm.c: lots of kernel-doc cleanups
      cpqphp_core.c: lots of kernel-doc cleanups
      cpqphp_ctrl.c: lots of kernel-doc cleanups
      fakephp.c:  correct kernel-doc notation
      pciehp_ctrl.c: correct kernel-doc notation
      rpadlpar_core.c: correct function names & kernel-doc notation
      rpaphp_core.c: correct kernel-doc notation
      shpchp_ctrl.c: correct kernel-doc notation
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Kristen Accardi <kristen.c.accardi@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      26e6c66e
  6. 03 5月, 2007 1 次提交
  7. 19 10月, 2006 2 次提交
  8. 27 9月, 2006 1 次提交
  9. 01 7月, 2006 1 次提交
  10. 24 3月, 2006 1 次提交
  11. 31 10月, 2005 1 次提交
    • T
      [PATCH] fix missing includes · 4e57b681
      Tim Schmielau 提交于
      I recently picked up my older work to remove unnecessary #includes of
      sched.h, starting from a patch by Dave Jones to not include sched.h
      from module.h. This reduces the number of indirect includes of sched.h
      by ~300. Another ~400 pointless direct includes can be removed after
      this disentangling (patch to follow later).
      However, quite a few indirect includes need to be fixed up for this.
      
      In order to feed the patches through -mm with as little disturbance as
      possible, I've split out the fixes I accumulated up to now (complete for
      i386 and x86_64, more archs to follow later) and post them before the real
      patch.  This way this large part of the patch is kept simple with only
      adding #includes, and all hunks are independent of each other.  So if any
      hunk rejects or gets in the way of other patches, just drop it.  My scripts
      will pick it up again in the next round.
      Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4e57b681
  12. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4