diff options
-rw-r--r-- | drivers/pci/hotplug/pciehp_core.c | 11 |
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; | |||
41 | int pciehp_poll_mode; | 41 | int pciehp_poll_mode; |
42 | int pciehp_poll_time; | 42 | int pciehp_poll_time; |
43 | int pciehp_force; | 43 | int pciehp_force; |
44 | int pciehp_slot_with_bus; | ||
44 | struct workqueue_struct *pciehp_wq; | 45 | struct 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); | |||
55 | module_param(pciehp_poll_mode, bool, 0644); | 56 | module_param(pciehp_poll_mode, bool, 0644); |
56 | module_param(pciehp_poll_time, int, 0644); | 57 | module_param(pciehp_poll_time, int, 0644); |
57 | module_param(pciehp_force, bool, 0644); | 58 | module_param(pciehp_force, bool, 0644); |
59 | module_param(pciehp_slot_with_bus, bool, 0644); | ||
58 | MODULE_PARM_DESC(pciehp_debug, "Debugging mode enabled or not"); | 60 | MODULE_PARM_DESC(pciehp_debug, "Debugging mode enabled or not"); |
59 | MODULE_PARM_DESC(pciehp_poll_mode, "Using polling mechanism for hot-plug events or not"); | 61 | MODULE_PARM_DESC(pciehp_poll_mode, "Using polling mechanism for hot-plug events or not"); |
60 | MODULE_PARM_DESC(pciehp_poll_time, "Polling mechanism frequency, in seconds"); | 62 | MODULE_PARM_DESC(pciehp_poll_time, "Polling mechanism frequency, in seconds"); |
61 | MODULE_PARM_DESC(pciehp_force, "Force pciehp, even if _OSC and OSHP are missing"); | 63 | MODULE_PARM_DESC(pciehp_force, "Force pciehp, even if _OSC and OSHP are missing"); |
64 | MODULE_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 | ||
194 | static void make_slot_name(struct slot *slot) | 197 | static 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 | ||
200 | static int init_slots(struct controller *ctrl) | 207 | static int init_slots(struct controller *ctrl) |