aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug
diff options
context:
space:
mode:
authorLinas Vepstas <linas@austin.ibm.com>2007-04-13 18:34:21 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-05-02 22:02:40 -0400
commit8485d1a123e0d367bbcbfec36acf134e6895f39a (patch)
tree7fdce4c4c4ec188cee71e16f3e49758599e55680 /drivers/pci/hotplug
parentfea54b8cc9c8290b4c99d481c3e600c46eb18fd5 (diff)
PCI: rpaphp: Document find_php_slot()
Document some of the interaction between dlpar and hotplug. viz, the a dlpar remove of a htoplug slot uses hotplug to remove it. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r--drivers/pci/hotplug/rpadlpar_core.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c
index 72383467a0d5..4d74f0b6079f 100644
--- a/drivers/pci/hotplug/rpadlpar_core.c
+++ b/drivers/pci/hotplug/rpadlpar_core.c
@@ -98,7 +98,15 @@ static struct device_node *find_dlpar_node(char *drc_name, int *node_type)
98 return NULL; 98 return NULL;
99} 99}
100 100
101static struct slot *find_slot(struct device_node *dn) 101/**
102 * find_php_slot - return hotplug slot structure for device node
103 *
104 * This routine will return the hotplug slot structure
105 * for a given device node. Note that built-in PCI slots
106 * may be dlpar-able, but not hot-pluggable, so this routine
107 * will return NULL for built-in PCI slots.
108 */
109static struct slot *find_php_slot(struct device_node *dn)
102{ 110{
103 struct list_head *tmp, *n; 111 struct list_head *tmp, *n;
104 struct slot *slot; 112 struct slot *slot;
@@ -224,9 +232,9 @@ static int dlpar_remove_phb(char *drc_name, struct device_node *dn)
224 if (!pcibios_find_pci_bus(dn)) 232 if (!pcibios_find_pci_bus(dn))
225 return -EINVAL; 233 return -EINVAL;
226 234
227 slot = find_slot(dn); 235 /* If pci slot is hotplugable, use hotplug to remove it */
236 slot = find_php_slot(dn);
228 if (slot) { 237 if (slot) {
229 /* Remove hotplug slot */
230 if (rpaphp_deregister_slot(slot)) { 238 if (rpaphp_deregister_slot(slot)) {
231 printk(KERN_ERR 239 printk(KERN_ERR
232 "%s: unable to remove hotplug slot %s\n", 240 "%s: unable to remove hotplug slot %s\n",
@@ -370,9 +378,9 @@ int dlpar_remove_pci_slot(char *drc_name, struct device_node *dn)
370 if (!bus) 378 if (!bus)
371 return -EINVAL; 379 return -EINVAL;
372 380
373 slot = find_slot(dn); 381 /* If pci slot is hotplugable, use hotplug to remove it */
382 slot = find_php_slot(dn);
374 if (slot) { 383 if (slot) {
375 /* Remove hotplug slot */
376 if (rpaphp_deregister_slot(slot)) { 384 if (rpaphp_deregister_slot(slot)) {
377 printk(KERN_ERR 385 printk(KERN_ERR
378 "%s: unable to remove hotplug slot %s\n", 386 "%s: unable to remove hotplug slot %s\n",