aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2008-04-25 17:38:38 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-04-25 17:38:38 -0400
commit3800345f723fd130d50434d4717b99d4a9f383c8 (patch)
treea71c37e6e2a4ef0ce5665bbf2efc88efc0583265 /drivers/pci
parent460895c4b234754804300c074dfba104fa069afa (diff)
pciehp: fix slot name
Current pciehp uses the combination of bus number and slot number as a slot name. But it is not a good idea because bus number is not a physical identifier but a logical identifier. This is against the PCIE specification. So remove the bus number from the physical identifier. However, there are some platforms with the problem that it provides the same slot number. For those platforms, this patch also introduces new module option 'pciehp_slot_with_bus'. If it is specified, pciehp uses the combination of bus number and slot number as a slot name. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/hotplug/pciehp_core.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
index aee19f013d84..cf36f2355173 100644
--- a/drivers/pci/hotplug/pciehp_core.c
+++ b/drivers/pci/hotplug/pciehp_core.c
@@ -41,6 +41,7 @@ int pciehp_debug;
41int pciehp_poll_mode; 41int pciehp_poll_mode;
42int pciehp_poll_time; 42int pciehp_poll_time;
43int pciehp_force; 43int pciehp_force;
44int pciehp_slot_with_bus;
44struct workqueue_struct *pciehp_wq; 45struct workqueue_struct *pciehp_wq;
45 46
46#define DRIVER_VERSION "0.4" 47#define DRIVER_VERSION "0.4"
@@ -55,10 +56,12 @@ module_param(pciehp_debug, bool, 0644);
55module_param(pciehp_poll_mode, bool, 0644); 56module_param(pciehp_poll_mode, bool, 0644);
56module_param(pciehp_poll_time, int, 0644); 57module_param(pciehp_poll_time, int, 0644);
57module_param(pciehp_force, bool, 0644); 58module_param(pciehp_force, bool, 0644);
59module_param(pciehp_slot_with_bus, bool, 0644);
58MODULE_PARM_DESC(pciehp_debug, "Debugging mode enabled or not"); 60MODULE_PARM_DESC(pciehp_debug, "Debugging mode enabled or not");
59MODULE_PARM_DESC(pciehp_poll_mode, "Using polling mechanism for hot-plug events or not"); 61MODULE_PARM_DESC(pciehp_poll_mode, "Using polling mechanism for hot-plug events or not");
60MODULE_PARM_DESC(pciehp_poll_time, "Polling mechanism frequency, in seconds"); 62MODULE_PARM_DESC(pciehp_poll_time, "Polling mechanism frequency, in seconds");
61MODULE_PARM_DESC(pciehp_force, "Force pciehp, even if _OSC and OSHP are missing"); 63MODULE_PARM_DESC(pciehp_force, "Force pciehp, even if _OSC and OSHP are missing");
64MODULE_PARM_DESC(pciehp_slot_with_bus, "Use bus number in the slot name");
62 65
63#define PCIE_MODULE_NAME "pciehp" 66#define PCIE_MODULE_NAME "pciehp"
64 67
@@ -193,8 +196,12 @@ static void release_slot(struct hotplug_slot *hotplug_slot)
193 196
194static void make_slot_name(struct slot *slot) 197static void make_slot_name(struct slot *slot)
195{ 198{
196 snprintf(slot->hotplug_slot->name, SLOT_NAME_SIZE, "%04d_%04d", 199 if (pciehp_slot_with_bus)
197 slot->bus, slot->number); 200 snprintf(slot->hotplug_slot->name, SLOT_NAME_SIZE, "%04d_%04d",
201 slot->bus, slot->number);
202 else
203 snprintf(slot->hotplug_slot->name, SLOT_NAME_SIZE, "%d",
204 slot->number);
198} 205}
199 206
200static int init_slots(struct controller *ctrl) 207static int init_slots(struct controller *ctrl)