<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From kristen.c.accardi@intel.com Fri Aug  5 14:08:08 2005
Subject: PCI Hotplug: use bus_slot number for name
From: Kristen Accardi &lt;kristen.c.accardi@intel.com&gt;
Cc: &lt;greg@kroah.com&gt;, &lt;rajesh.shah@intel.com&gt;
Date: Fri, 05 Aug 2005 12:16:06 -0700
Message-Id: &lt;1123269366.8917.39.camel@whizzy&gt;

For systems with multiple hotplug controllers, you need to use more than
just the slot number to uniquely name the slot.  Without a unique slot
name, the pci_hp_register() will fail.  This patch adds the bus number
to the name.

Signed-off-by: Kristen Carlson Accardi &lt;kristen.c.accardi@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

---
 drivers/pci/hotplug/pciehp.h |    2 +-
 drivers/pci/hotplug/shpchp.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- gregkh-2.6.orig/drivers/pci/hotplug/pciehp.h	2005-06-17 12:48:29.000000000 -0700
+++ gregkh-2.6/drivers/pci/hotplug/pciehp.h	2005-08-08 14:08:33.000000000 -0700
@@ -302,7 +302,7 @@
 
 static inline void make_slot_name(char *buffer, int buffer_size, struct slot *slot)
 {
-	snprintf(buffer, buffer_size, "%d", slot-&gt;number);
+	snprintf(buffer, buffer_size, "%04d_%04d", slot-&gt;bus, slot-&gt;number);
 }
 
 enum php_ctlr_type {
--- gregkh-2.6.orig/drivers/pci/hotplug/shpchp.h	2005-06-17 12:48:29.000000000 -0700
+++ gregkh-2.6/drivers/pci/hotplug/shpchp.h	2005-08-08 14:08:33.000000000 -0700
@@ -411,7 +411,7 @@
 
 static inline void make_slot_name(char *buffer, int buffer_size, struct slot *slot)
 {
-	snprintf(buffer, buffer_size, "%d", slot-&gt;number);
+	snprintf(buffer, buffer_size, "%04d_%04d", slot-&gt;bus, slot-&gt;number);
 }
 
 enum php_ctlr_type {
</pre></body></html>