1. 17 6月, 2009 2 次提交
  2. 23 10月, 2008 5 次提交
    • A
      PCI: Hotplug core: remove 'name' · 58319b80
      Alex Chiang 提交于
      Now that the PCI core manages the 'name' for each individual
      hotplug driver, and all drivers (except rpaphp) have been converted
      to use hotplug_slot_name(), there is no need for the PCI hotplug
      core to drag around its own copy of name either.
      
      Cc: kristen.c.accardi@intel.com
      Cc: matthew@wil.cx
      Acked-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NAlex Chiang <achiang@hp.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      58319b80
    • A
      PCI: prevent duplicate slot names · 5fe6cc60
      Alex Chiang 提交于
      Prevent callers of pci_create_slot() from registering slots with
      duplicate names. This condition occurs most often when PCI hotplug
      drivers are loaded on platforms with broken firmware that assigns
      identical names to multiple slots.
      
      We now rename these duplicate slots on behalf of the user.
      
      If firmware assigns the name N to multiple slots, then:
      
      	The first registered slot is assigned N
      	The second registered slot is assigned N-1
      	The third registered slot is assigned N-2
      	etc.
      
      This is the permanent fix mentioned in earlier commits d6a9e9b4 and
      167e782e (shpchp/pciehp: Rename duplicate slot name...).
      
      We take advantage of the new 'hotplug' parameter in pci_create_slot()
      to prevent a slot create/rename race between hotplug drivers and
      detection drivers.
      
      	Scenario A:
      	hotplug driver                  detection driver
      	--------------                  ----------------
      	pci_create_slot(hotplug=set)
      					pci_create_slot(hotplug=NULL)
      
      The hotplug driver creates the slot with its desired name, and then
      releases the semaphore. Now, the detection driver tries to create
      the same slot, but it already exists. We don't care about renaming,
      so return the existing slot.
      
      	Scenario B:
      	hotplug driver                  detection driver
      	--------------                  ----------------
      					pci_create_slot(hotplug=NULL)
      	pci_create_slot(hotplug=set)
      
      The detection driver creates the slot with name "X". Then the hotplug
      driver tries to create the same slot, but wants the name "Y" instead.
      We detect that we're trying to create the same slot and that we also
      want a rename, so rename the slot to "Y" and return.
      
      	Scenario C:
      	hotplug driver                  hotplug driver
      	--------------                  ----------------
      	pci_create_slot(hotplug=set)
      					pci_create_slot(hotplug=set)
      
      Two separate hotplug drivers are attempting to claim the slot and
      are passing valid hotplug_slot args to pci_create_slot(). We detect
      that the slot already has a ->hotplug callback, prevent a rename,
      and return -EBUSY.
      
      Cc: kristen.c.accardi@intel.com
      Cc: matthew@wil.cx
      Acked-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NAlex Chiang <achiang@hp.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      5fe6cc60
    • K
      PCI Hotplug: serialize pci_hp_register and pci_hp_deregister · 95cb9093
      Kenji Kaneshige 提交于
      Convert the pci_hotplug_slot_list_lock, which only protected the
      list of hotplug slots, to a pci_hp_mutex which now protects both
      interfaces.
      Signed-off-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NAlex Chiang <achiang@hp.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      95cb9093
    • A
      PCI: update pci_create_slot() to take a 'hotplug' param · 828f3768
      Alex Chiang 提交于
      Slot detection drivers can co-exist with hotplug drivers. The names
      of the detected/claimed slots may be different depending on module
      load order.
      
      For legacy reasons, we need to allow hotplug drivers to override
      the slot name if a detection driver is loaded first (and they find
      the same slots).
      
      Creating and overriding slot names should be an atomic operation,
      otherwise you get a locking nightmare as various drivers race to
      call pci_create_slot().
      
      pci_create_slot() is already serialized by grabbing the pci_bus_sem.
      
      We update the API and add a 'hotplug' param, which is:
      
      	set if the caller is a hotplug driver
      	NULL if the caller is a detection driver
      
      pci_create_slot() does not actually use the 'hotplug' parameter in this
      patch. A later patch will add the logic that uses it.
      
      Cc: kristen.c.accardi@intel.com
      Cc: matthew@wil.cx
      Acked-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NAlex Chiang <achiang@hp.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      828f3768
    • A
      PCI Hotplug core: add 'name' param pci_hp_register interface · 1359f270
      Alex Chiang 提交于
      Update pci_hp_register() to take a const char *name parameter.
      
      The motivation for this is to clean up the individual hotplug
      drivers so that each one does not have to manage its own name.
      The PCI core should be the place where we manage the name.
      
      We update the interface and all callsites first, in a
      "no functional change" manner, and clean up the drivers later.
      
      Cc: kristen.c.accardi@intel.com
      Acked-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Reviewed-by: NMatthew Wilcox <willy@linux.intel.com>
      Signed-off-by: NAlex Chiang <achiang@hp.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      1359f270
  3. 21 10月, 2008 2 次提交
  4. 26 6月, 2008 2 次提交
  5. 11 6月, 2008 2 次提交
    • A
      PCI: ACPI PCI slot detection driver · 8344b568
      Alex Chiang 提交于
      Detect all physical PCI slots as described by ACPI, and create entries in
      /sys/bus/pci/slots/.
      
      Not all physical slots are hotpluggable, and the acpiphp module does not
      detect them.  Now we know the physical PCI geography of our system, without
      caring about hotplug.
      
      [kaneshige.kenji@jp.fujitsu.com: export-kobject_rename-for-pci_hotplug_core]
      Signed-off-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Acked-by: NGreg KH <greg@kroah.com>
      [akpm@linux-foundation.org: build fix]
      [akpm@linux-foundation.org: fix build with CONFIG_DMI=n]
      Signed-off-by: NAlex Chiang <achiang@hp.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
      Cc: Len Brown <lenb@kernel.org>
      Acked-by: NLen Brown <len.brown@intel.com>
      Acked-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      8344b568
    • 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
  6. 28 5月, 2008 1 次提交
    • K
      pci hotplug core: add check of duplicate slot name · a86161b3
      Kenji Kaneshige 提交于
      Fix the following errors reported by Jan C. Nordholz in
      http://bugzilla.kernel.org/show_bug.cgi?id=10751.
      
      kobject_add_internal failed for 2 with -EEXIST, don't try to register things with the same name in the same directory.
      Pid: 1, comm: swapper Tainted: G        W 2.6.26-rc3 #1
       [<c0266980>] kobject_add_internal+0x140/0x190
       [<c0266afd>] kobject_init_and_add+0x2d/0x40
       [<c027bc91>] pci_hp_register+0x81/0x2f0
       [<c027fd07>] pciehp_probe+0x1a7/0x470
       [<c01b3b84>] sysfs_add_one+0x44/0xa0
       [<c01b3c1f>] sysfs_addrm_start+0x3f/0xb0
       [<c01b497a>] sysfs_create_link+0x8a/0xf0
       [<c0279570>] pcie_port_probe_service+0x50/0x80
       [<c02e0545>] driver_sysfs_add+0x55/0x70
       [<c02e0662>] driver_probe_device+0x82/0x180
       [<c02e07cc>] __driver_attach+0x6c/0x70
       [<c02dfe0a>] bus_for_each_dev+0x3a/0x60
       [<c05db2d0>] pcied_init+0x0/0x80
       [<c02e04e6>] driver_attach+0x16/0x20
       [<c02e0760>] __driver_attach+0x0/0x70
       [<c02e0341>] bus_add_driver+0x1a1/0x220
       [<c05db2d0>] pcied_init+0x0/0x80
       [<c02e09cd>] driver_register+0x4d/0x120
       [<c05db050>] ibm_acpiphp_init+0x0/0x190
       [<c0125aab>] printk+0x1b/0x20
       [<c05db2d0>] pcied_init+0x0/0x80
       [<c05db2de>] pcied_init+0xe/0x80
       [<c05c751a>] kernel_init+0x10a/0x300
       [<c0120138>] schedule_tail+0x18/0x50
       [<c0103b9a>] ret_from_fork+0x6/0x1c
       [<c05c7410>] kernel_init+0x0/0x300
       [<c05c7410>] kernel_init+0x0/0x300
       [<c010485b>] kernel_thread_helper+0x7/0x1c
       =======================
      pci_hotplug: Unable to register kobject '2'<3>pciehp: pci_hp_register failed with error -22
      
      Slot with the same name can be registered multiple times if shpchp or
      pciehp driver is loaded after acpiphp is loaded because ACPI based
      hotplug driver and Native OS hotplug driver trying to handle the same
      physical slot. In this case, current pci_hotplug core will call
      kobject_init_and_add() muliple time with the same name. This is the
      cause of this problem. To fix this problem, this patch adds the check
      into pci_hp_register() to see if the slot with the same name.
      Signed-off-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NKristen Carlson Accardi <kristen.c.accardi@intel.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      a86161b3
  7. 21 4月, 2008 1 次提交
  8. 02 2月, 2008 2 次提交
  9. 25 1月, 2008 5 次提交
  10. 16 10月, 2007 1 次提交
  11. 13 10月, 2007 1 次提交
  12. 09 5月, 2007 1 次提交
  13. 03 5月, 2007 1 次提交
  14. 19 10月, 2006 2 次提交
  15. 27 9月, 2006 1 次提交
  16. 01 7月, 2006 1 次提交
  17. 21 6月, 2005 1 次提交
  18. 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