aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/hotplug/shpchp.h9
-rw-r--r--drivers/pci/hotplug/shpchp_core.c34
-rw-r--r--drivers/pci/hotplug/shpchp_ctrl.c54
-rw-r--r--drivers/pci/hotplug/shpchp_hpc.c73
-rw-r--r--drivers/pci/hotplug/shpchp_pci.c14
5 files changed, 86 insertions, 98 deletions
diff --git a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h
index 0d48d38cbf41..6aba0b6cf2e0 100644
--- a/drivers/pci/hotplug/shpchp.h
+++ b/drivers/pci/hotplug/shpchp.h
@@ -253,7 +253,7 @@ static inline struct slot *shpchp_find_slot(struct controller *ctrl, u8 device)
253 return slot; 253 return slot;
254 } 254 }
255 255
256 ctrl_err(ctrl, "%s: slot (device=0x%x) not found\n", __func__, device); 256 ctrl_err(ctrl, "Slot (device=0x%02x) not found\n", device);
257 return NULL; 257 return NULL;
258} 258}
259 259
@@ -288,8 +288,8 @@ static inline void amd_pogo_errata_restore_misc_reg(struct slot *p_slot)
288 perr_set = pcix_bridge_errors_reg & PERR_OBSERVED_MASK; 288 perr_set = pcix_bridge_errors_reg & PERR_OBSERVED_MASK;
289 if (perr_set) { 289 if (perr_set) {
290 ctrl_dbg(p_slot->ctrl, 290 ctrl_dbg(p_slot->ctrl,
291 "%s W1C: Bridge_Errors[ PERR_OBSERVED = %08X]\n", 291 "Bridge_Errors[ PERR_OBSERVED = %08X] (W1C)\n",
292 __func__ , perr_set); 292 perr_set);
293 293
294 pci_write_config_dword(p_slot->ctrl->pci_dev, PCIX_MISC_BRIDGE_ERRORS_OFFSET, perr_set); 294 pci_write_config_dword(p_slot->ctrl->pci_dev, PCIX_MISC_BRIDGE_ERRORS_OFFSET, perr_set);
295 } 295 }
@@ -298,8 +298,7 @@ static inline void amd_pogo_errata_restore_misc_reg(struct slot *p_slot)
298 pci_read_config_dword(p_slot->ctrl->pci_dev, PCIX_MEM_BASE_LIMIT_OFFSET, &pcix_mem_base_reg); 298 pci_read_config_dword(p_slot->ctrl->pci_dev, PCIX_MEM_BASE_LIMIT_OFFSET, &pcix_mem_base_reg);
299 rse_set = pcix_mem_base_reg & RSE_MASK; 299 rse_set = pcix_mem_base_reg & RSE_MASK;
300 if (rse_set) { 300 if (rse_set) {
301 ctrl_dbg(p_slot->ctrl, "%s W1C: Memory_Base_Limit[ RSE ]\n", 301 ctrl_dbg(p_slot->ctrl, "Memory_Base_Limit[ RSE ] (W1C)\n");
302 __func__);
303 302
304 pci_write_config_dword(p_slot->ctrl->pci_dev, PCIX_MEM_BASE_LIMIT_OFFSET, rse_set); 303 pci_write_config_dword(p_slot->ctrl->pci_dev, PCIX_MEM_BASE_LIMIT_OFFSET, rse_set);
305 } 304 }
diff --git a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c
index 214633bf4abc..fe8d149c2293 100644
--- a/drivers/pci/hotplug/shpchp_core.c
+++ b/drivers/pci/hotplug/shpchp_core.c
@@ -89,7 +89,7 @@ static void release_slot(struct hotplug_slot *hotplug_slot)
89{ 89{
90 struct slot *slot = hotplug_slot->private; 90 struct slot *slot = hotplug_slot->private;
91 91
92 ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", 92 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n",
93 __func__, slot_name(slot)); 93 __func__, slot_name(slot));
94 94
95 kfree(slot->hotplug_slot->info); 95 kfree(slot->hotplug_slot->info);
@@ -136,9 +136,11 @@ static int init_slots(struct controller *ctrl)
136 snprintf(name, SLOT_NAME_SIZE, "%d", slot->number); 136 snprintf(name, SLOT_NAME_SIZE, "%d", slot->number);
137 hotplug_slot->ops = &shpchp_hotplug_slot_ops; 137 hotplug_slot->ops = &shpchp_hotplug_slot_ops;
138 138
139 ctrl_dbg(ctrl, "Registering bus=%x dev=%x hp_slot=%x sun=%x " 139 ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:%02x "
140 "slot_device_offset=%x\n", slot->bus, slot->device, 140 "hp_slot=%x sun=%x slot_device_offset=%x\n",
141 slot->hp_slot, slot->number, ctrl->slot_device_offset); 141 pci_domain_nr(ctrl->pci_dev->subordinate),
142 slot->bus, slot->device, slot->hp_slot, slot->number,
143 ctrl->slot_device_offset);
142 retval = pci_hp_register(slot->hotplug_slot, 144 retval = pci_hp_register(slot->hotplug_slot,
143 ctrl->pci_dev->subordinate, slot->device, name); 145 ctrl->pci_dev->subordinate, slot->device, name);
144 if (retval) { 146 if (retval) {
@@ -189,7 +191,7 @@ static int set_attention_status (struct hotplug_slot *hotplug_slot, u8 status)
189{ 191{
190 struct slot *slot = get_slot(hotplug_slot); 192 struct slot *slot = get_slot(hotplug_slot);
191 193
192 ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", 194 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n",
193 __func__, slot_name(slot)); 195 __func__, slot_name(slot));
194 196
195 hotplug_slot->info->attention_status = status; 197 hotplug_slot->info->attention_status = status;
@@ -202,7 +204,7 @@ static int enable_slot (struct hotplug_slot *hotplug_slot)
202{ 204{
203 struct slot *slot = get_slot(hotplug_slot); 205 struct slot *slot = get_slot(hotplug_slot);
204 206
205 ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", 207 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n",
206 __func__, slot_name(slot)); 208 __func__, slot_name(slot));
207 209
208 return shpchp_sysfs_enable_slot(slot); 210 return shpchp_sysfs_enable_slot(slot);
@@ -212,7 +214,7 @@ static int disable_slot (struct hotplug_slot *hotplug_slot)
212{ 214{
213 struct slot *slot = get_slot(hotplug_slot); 215 struct slot *slot = get_slot(hotplug_slot);
214 216
215 ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", 217 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n",
216 __func__, slot_name(slot)); 218 __func__, slot_name(slot));
217 219
218 return shpchp_sysfs_disable_slot(slot); 220 return shpchp_sysfs_disable_slot(slot);
@@ -223,7 +225,7 @@ static int get_power_status (struct hotplug_slot *hotplug_slot, u8 *value)
223 struct slot *slot = get_slot(hotplug_slot); 225 struct slot *slot = get_slot(hotplug_slot);
224 int retval; 226 int retval;
225 227
226 ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", 228 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n",
227 __func__, slot_name(slot)); 229 __func__, slot_name(slot));
228 230
229 retval = slot->hpc_ops->get_power_status(slot, value); 231 retval = slot->hpc_ops->get_power_status(slot, value);
@@ -238,7 +240,7 @@ static int get_attention_status (struct hotplug_slot *hotplug_slot, u8 *value)
238 struct slot *slot = get_slot(hotplug_slot); 240 struct slot *slot = get_slot(hotplug_slot);
239 int retval; 241 int retval;
240 242
241 ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", 243 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n",
242 __func__, slot_name(slot)); 244 __func__, slot_name(slot));
243 245
244 retval = slot->hpc_ops->get_attention_status(slot, value); 246 retval = slot->hpc_ops->get_attention_status(slot, value);
@@ -253,7 +255,7 @@ static int get_latch_status (struct hotplug_slot *hotplug_slot, u8 *value)
253 struct slot *slot = get_slot(hotplug_slot); 255 struct slot *slot = get_slot(hotplug_slot);
254 int retval; 256 int retval;
255 257
256 ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", 258 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n",
257 __func__, slot_name(slot)); 259 __func__, slot_name(slot));
258 260
259 retval = slot->hpc_ops->get_latch_status(slot, value); 261 retval = slot->hpc_ops->get_latch_status(slot, value);
@@ -268,7 +270,7 @@ static int get_adapter_status (struct hotplug_slot *hotplug_slot, u8 *value)
268 struct slot *slot = get_slot(hotplug_slot); 270 struct slot *slot = get_slot(hotplug_slot);
269 int retval; 271 int retval;
270 272
271 ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", 273 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n",
272 __func__, slot_name(slot)); 274 __func__, slot_name(slot));
273 275
274 retval = slot->hpc_ops->get_adapter_status(slot, value); 276 retval = slot->hpc_ops->get_adapter_status(slot, value);
@@ -284,7 +286,7 @@ static int get_max_bus_speed(struct hotplug_slot *hotplug_slot,
284 struct slot *slot = get_slot(hotplug_slot); 286 struct slot *slot = get_slot(hotplug_slot);
285 int retval; 287 int retval;
286 288
287 ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", 289 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n",
288 __func__, slot_name(slot)); 290 __func__, slot_name(slot));
289 291
290 retval = slot->hpc_ops->get_max_bus_speed(slot, value); 292 retval = slot->hpc_ops->get_max_bus_speed(slot, value);
@@ -299,7 +301,7 @@ static int get_cur_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_sp
299 struct slot *slot = get_slot(hotplug_slot); 301 struct slot *slot = get_slot(hotplug_slot);
300 int retval; 302 int retval;
301 303
302 ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", 304 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n",
303 __func__, slot_name(slot)); 305 __func__, slot_name(slot));
304 306
305 retval = slot->hpc_ops->get_cur_bus_speed(slot, value); 307 retval = slot->hpc_ops->get_cur_bus_speed(slot, value);
@@ -331,14 +333,14 @@ static int shpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
331 333
332 ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL); 334 ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
333 if (!ctrl) { 335 if (!ctrl) {
334 dev_err(&pdev->dev, "%s : out of memory\n", __func__); 336 dev_err(&pdev->dev, "%s: Out of memory\n", __func__);
335 goto err_out_none; 337 goto err_out_none;
336 } 338 }
337 INIT_LIST_HEAD(&ctrl->slot_list); 339 INIT_LIST_HEAD(&ctrl->slot_list);
338