diff options
| -rw-r--r-- | drivers/pci/hotplug/shpchp.h | 9 | ||||
| -rw-r--r-- | drivers/pci/hotplug/shpchp_core.c | 34 | ||||
| -rw-r--r-- | drivers/pci/hotplug/shpchp_ctrl.c | 54 | ||||
| -rw-r--r-- | drivers/pci/hotplug/shpchp_hpc.c | 73 | ||||
| -rw-r--r-- | drivers/pci/hotplug/shpchp_pci.c | 14 |
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 | 340 | ||
| 339 | rc = shpc_init(ctrl, pdev); | 341 | rc = shpc_init(ctrl, pdev); |
| 340 | if (rc) { | 342 | if (rc) { |
| 341 | ctrl_dbg(ctrl, "controller initialization failed\n"); | 343 | ctrl_dbg(ctrl, "Controller initialization failed\n"); |
| 342 | goto err_out_free_ctrl; | 344 | goto err_out_free_ctrl; |
| 343 | } | 345 | } |
| 344 | 346 | ||
| @@ -347,7 +349,7 @@ static int shpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 347 | /* Setup the slot information structures */ | 349 | /* Setup the slot information structures */ |
| 348 | rc = init_slots(ctrl); | 350 | rc = init_slots(ctrl); |
| 349 | if (rc) { | 351 | if (rc) { |
| 350 | ctrl_err(ctrl, "slot initialization failed\n"); | 352 | ctrl_err(ctrl, "Slot initialization failed\n"); |
| 351 | goto err_out_release_ctlr; | 353 | goto err_out_release_ctlr; |
| 352 | } | 354 | } |
| 353 | 355 | ||
diff --git a/drivers/pci/hotplug/shpchp_ctrl.c b/drivers/pci/hotplug/shpchp_ctrl.c index c9049f17864e..b8ab2796e66a 100644 --- a/drivers/pci/hotplug/shpchp_ctrl.c +++ b/drivers/pci/hotplug/shpchp_ctrl.c | |||
| @@ -62,7 +62,7 @@ u8 shpchp_handle_attention_button(u8 hp_slot, struct controller *ctrl) | |||
| 62 | u32 event_type; | 62 | u32 event_type; |
| 63 | 63 | ||
| 64 | /* Attention Button Change */ | 64 | /* Attention Button Change */ |
| 65 | ctrl_dbg(ctrl, "Attention button interrupt received.\n"); | 65 | ctrl_dbg(ctrl, "Attention button interrupt received\n"); |
| 66 | 66 | ||
| 67 | p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); | 67 | p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); |
| 68 | p_slot->hpc_ops->get_adapter_status(p_slot, &(p_slot->presence_save)); | 68 | p_slot->hpc_ops->get_adapter_status(p_slot, &(p_slot->presence_save)); |
| @@ -86,13 +86,13 @@ u8 shpchp_handle_switch_change(u8 hp_slot, struct controller *ctrl) | |||
| 86 | u32 event_type; | 86 | u32 event_type; |
| 87 | 87 | ||
| 88 | /* Switch Change */ | 88 | /* Switch Change */ |
| 89 | ctrl_dbg(ctrl, "Switch interrupt received.\n"); | 89 | ctrl_dbg(ctrl, "Switch interrupt received\n"); |
| 90 | 90 | ||
| 91 | p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); | 91 | p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); |
| 92 | p_slot->hpc_ops->get_adapter_status(p_slot, &(p_slot->presence_save)); | 92 | p_slot->hpc_ops->get_adapter_status(p_slot, &(p_slot->presence_save)); |
| 93 | p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); | 93 | p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); |
| 94 | ctrl_dbg(ctrl, "%s: Card present %x Power status %x\n", | 94 | ctrl_dbg(ctrl, "Card present %x Power status %x\n", |
| 95 | __func__, p_slot->presence_save, p_slot->pwr_save); | 95 | p_slot->presence_save, p_slot->pwr_save); |
| 96 | 96 | ||
| 97 | if (getstatus) { | 97 | if (getstatus) { |
| 98 | /* | 98 | /* |
| @@ -123,7 +123,7 @@ u8 shpchp_handle_presence_change(u8 hp_slot, struct controller *ctrl) | |||
| 123 | u32 event_type; | 123 | u32 event_type; |
| 124 | 124 | ||
| 125 | /* Presence Change */ | 125 | /* Presence Change */ |
| 126 | ctrl_dbg(ctrl, "Presence/Notify input change.\n"); | 126 | ctrl_dbg(ctrl, "Presence/Notify input change\n"); |
| 127 | 127 | ||
| 128 | p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); | 128 | p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); |
| 129 | 129 | ||
| @@ -158,7 +158,7 @@ u8 shpchp_handle_power_fault(u8 hp_slot, struct controller *ctrl) | |||
| 158 | u32 event_type; | 158 | u32 event_type; |
| 159 | 159 | ||
| 160 | /* Power fault */ | 160 | /* Power fault */ |
| 161 | ctrl_dbg(ctrl, "Power fault interrupt received.\n"); | 161 | ctrl_dbg(ctrl, "Power fault interrupt received\n"); |
| 162 | 162 | ||
| 163 | p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); | 163 | p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); |
| 164 | 164 | ||
| @@ -178,7 +178,7 @@ u8 shpchp_handle_power_fault(u8 hp_slot, struct controller *ctrl) | |||
| 178 | event_type = INT_POWER_FAULT; | 178 | event_type = INT_POWER_FAULT; |
| 179 | /* set power fault status for this board */ | 179 | /* set power fault status for this board */ |
| 180 | p_slot->status = 0xFF; | 180 | p_slot->status = 0xFF; |
| 181 | ctrl_info(ctrl, "power fault bit %x set\n", hp_slot); | 181 | ctrl_info(ctrl, "Power fault bit %x set\n", hp_slot); |
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | queue_interrupt_event(p_slot, event_type); | 184 | queue_interrupt_event(p_slot, event_type); |
| @@ -194,7 +194,7 @@ static int change_bus_speed(struct controller *ctrl, struct slot *p_slot, | |||
| 194 | { | 194 | { |
| 195 | int rc = 0; | 195 | int rc = 0; |
| 196 | 196 | ||
| 197 | ctrl_dbg(ctrl, "%s: change to speed %d\n", __func__, speed); | 197 | ctrl_dbg(ctrl, "Change speed to %d\n", speed); |
| 198 | if ((rc = p_slot->hpc_ops->set_bus_speed_mode(p_slot, speed))) { | 198 | if ((rc = p_slot->hpc_ops->set_bus_speed_mode(p_slot, speed))) { |
| 199 | ctrl_err(ctrl, "%s: Issue of set bus speed mode command " | 199 | ctrl_err(ctrl, "%s: Issue of set bus speed mode command " |
| 200 | "failed\n", __func__); | 200 | "failed\n", __func__); |
| @@ -215,8 +215,8 @@ static int fix_bus_speed(struct controller *ctrl, struct slot *pslot, | |||
| 215 | */ | 215 | */ |
| 216 | if (flag) { | 216 | if (flag) { |
| 217 | if (asp < bsp) { | 217 | if (asp < bsp) { |
| 218 | ctrl_err(ctrl, "%s: speed of bus %x and adapter %x " | 218 | ctrl_err(ctrl, "Speed of bus %x and adapter %x " |
| 219 | "mismatch\n", __func__, bsp, asp); | 219 | "mismatch\n", bsp, asp); |
| 220 | rc = WRONG_BUS_FREQUENCY; | 220 | rc = WRONG_BUS_FREQUENCY; |
| 221 | } | 221 | } |
| 222 | return rc; | 222 | return rc; |
| @@ -246,6 +246,7 @@ static int board_added(struct slot *p_slot) | |||
| 246 | int rc = 0; | 246 | int rc = 0; |
| 247 | enum pci_bus_speed asp, bsp, msp; | 247 | enum pci_bus_speed asp, bsp, msp; |
| 248 | struct controller *ctrl = p_slot->ctrl; | 248 | struct controller *ctrl = p_slot->ctrl; |
| 249 | struct pci_bus *parent = ctrl->pci_dev->subordinate; | ||
| 249 | 250 | ||
| 250 | hp_slot = p_slot->device - ctrl->slot_device_offset; | 251 | hp_slot = p_slot->device - ctrl->slot_device_offset; |
| 251 | 252 | ||
| @@ -256,7 +257,7 @@ static int board_added(struct slot *p_slot) | |||
| 256 | /* Power on slot without connecting to bus */ | 257 | /* Power on slot without connecting to bus */ |
| 257 | rc = p_slot->hpc_ops->power_on_slot(p_slot); | 258 | rc = p_slot->hpc_ops->power_on_slot(p_slot); |
| 258 | if (rc) { | 259 | if (rc) { |
| 259 | ctrl_err(ctrl, "%s: Failed to power on slot\n", __func__); | 260 | ctrl_err(ctrl, "Failed to power on slot\n"); |
| 260 | return -1; | 261 | return -1; |
| 261 | } | 262 | } |
| 262 | 263 | ||
| @@ -272,29 +273,27 @@ static int board_added(struct slot *p_slot) | |||
| 272 | 273 | ||
| 273 | /* turn on board, blink green LED, turn off Amber LED */ | 274 | /* turn on board, blink green LED, turn off Amber LED */ |
| 274 | if ((rc = p_slot->hpc_ops->slot_enable(p_slot))) { | 275 | if ((rc = p_slot->hpc_ops->slot_enable(p_slot))) { |
| 275 | ctrl_err(ctrl, "%s: Issue of Slot Enable command" | 276 | ctrl_err(ctrl, "Issue of Slot Enable command failed\n"); |
| 276 | " failed\n", __func__); | ||
| 277 | return rc; | 277 | return rc; |
| 278 | } | 278 | } |
| 279 | } | 279 | } |
| 280 | 280 | ||
| 281 | rc = p_slot->hpc_ops->get_adapter_speed(p_slot, &asp); | 281 | rc = p_slot->hpc_ops->get_adapter_speed(p_slot, &asp); |
| 282 | if (rc) { | 282 | if (rc) { |
| 283 | ctrl_err(ctrl, "%s: Can't get adapter speed or bus mode " | 283 | ctrl_err(ctrl, "Can't get adapter speed or " |
| 284 | "mismatch\n", __func__); | 284 | "bus mode mismatch\n"); |
| 285 | return WRONG_BUS_FREQUENCY; | 285 | return WRONG_BUS_FREQUENCY; |
| 286 | } | 286 | } |
| 287 | 287 | ||
| 288 | rc = p_slot->hpc_ops->get_cur_bus_speed(p_slot, &bsp); | 288 | rc = p_slot->hpc_ops->get_cur_bus_speed(p_slot, &bsp); |
| 289 | if (rc) { | 289 | if (rc) { |
| 290 | ctrl_err(ctrl, "%s: Can't get bus operation speed\n", __func__); | 290 | ctrl_err(ctrl, "Can't get bus operation speed\n"); |
| 291 | return WRONG_BUS_FREQUENCY; | 291 | return WRONG_BUS_FREQUENCY; |
| 292 | } | 292 | } |
| 293 | 293 | ||
| 294 | rc = p_slot->hpc_ops->get_max_bus_speed(p_slot, &msp); | 294 | rc = p_slot->hpc_ops->get_max_bus_speed(p_slot, &msp); |
| 295 | if (rc) { | 295 | if (rc) { |
| 296 | ctrl_err(ctrl, "%s: Can't get max bus operation speed\n", | 296 | ctrl_err(ctrl, "Can't get max bus operation speed\n"); |
| 297 | __func__); | ||
| 298 | msp = bsp; | 297 | msp = bsp; |
| 299 | } | 298 | } |
| 300 | 299 | ||
| @@ -312,8 +311,7 @@ static int board_added(struct slot *p_slot) | |||
| 312 | 311 | ||
| 313 | /* turn on board, blink green LED, turn off Amber LED */ | 312 | /* turn on board, blink green LED, turn off Amber LED */ |
| 314 | if ((rc = p_slot->hpc_ops->slot_enable(p_slot))) { | 313 | if ((rc = p_slot->hpc_ops->slot_enable(p_slot))) { |
| 315 | ctrl_err(ctrl, "%s: Issue of Slot Enable command failed\n", | 314 | ctrl_err(ctrl, "Issue of Slot Enable command failed\n"); |
| 316 | __func__); | ||
| 317 | return rc; | 315 | return rc; |
| 318 | } | 316 | } |
| 319 | 317 | ||
| @@ -324,15 +322,15 @@ static int board_added(struct slot *p_slot) | |||
| 324 | /* Check for a power fault */ | 322 | /* Check for a power fault */ |
| 325 | if (p_slot->status == 0xFF) { | 323 | if (p_slot->status == 0xFF) { |
| 326 | /* power fault occurred, but it was benign */ | 324 | /* power fault occurred, but it was benign */ |
| 327 | ctrl_dbg(ctrl, "%s: power fault\n", __func__); | 325 | ctrl_dbg(ctrl, "%s: Power fault\n", __func__); |
| 328 | rc = POWER_FAILURE; | 326 | rc = POWER_FAILURE; |
| 329 | p_slot->status = 0; | 327 | p_slot->status = 0; |
| 330 | goto err_exit; | 328 | goto err_exit; |
| 331 | } | 329 | } |
| 332 | 330 | ||
| 333 | if (shpchp_configure_device(p_slot)) { | 331 | if (shpchp_configure_device(p_slot)) { |
| 334 | ctrl_err(ctrl, "Cannot add device at 0x%x:0x%x\n", | 332 | ctrl_err(ctrl, "Cannot add device at %04x:%02x:%02x\n", |
| 335 | p_slot->bus, p_slot->device); | 333 | pci_domain_nr(parent), p_slot->bus, p_slot->device); |
| 336 | goto err_exit; | 334 | goto err_exit; |
| 337 | } | 335 | } |
| 338 | 336 | ||
| @@ -373,7 +371,7 @@ static int remove_board(struct slot *p_slot) | |||
| 373 | hp_slot = p_slot->device - ctrl->slot_device_offset; | 371 | hp_slot = p_slot->device - ctrl->slot_device_offset; |
| 374 | p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); | 372 | p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); |
| 375 | 373 | ||
| 376 | ctrl_dbg(ctrl, "In %s, hp_slot = %d\n", __func__, hp_slot); | 374 | ctrl_dbg(ctrl, "%s: hp_slot = %d\n", __func__, hp_slot); |
| 377 | 375 | ||
| 378 | /* Change status to shutdown */ | 376 | /* Change status to shutdown */ |
| 379 | if (p_slot->is_a_board) | 377 | if (p_slot->is_a_board) |
| @@ -389,8 +387,7 @@ static int remove_board(struct slot *p_slot) | |||
| 389 | 387 | ||
| 390 | rc = p_slot->hpc_ops->set_attention_status(p_slot, 0); | 388 | rc = p_slot->hpc_ops->set_attention_status(p_slot, 0); |
| 391 | if (rc) { | 389 | if (rc) { |
| 392 | ctrl_err(ctrl, "%s: Issue of Set Attention command failed\n", | 390 | ctrl_err(ctrl, "Issue of Set Attention command failed\n"); |
| 393 | __func__); | ||
| 394 | return rc; | 391 | return rc; |
| 395 | } | 392 | } |
| 396 | 393 | ||
| @@ -526,7 +523,6 @@ static void handle_button_press_event(struct slot *p_slot) | |||
| 526 | */ | 523 | */ |
| 527 | ctrl_info(ctrl, "Button cancel on Slot(%s)\n", | 524 | ctrl_info(ctrl, "Button cancel on Slot(%s)\n", |
| 528 | slot_name(p_slot)); | 525 | slot_name(p_slot)); |
| 529 | ctrl_dbg(ctrl, "%s: button cancel\n", __func__); | ||
| 530 | cancel_delayed_work(&p_slot->work); | 526 | cancel_delayed_work(&p_slot->work); |
| 531 | if (p_slot->state == BLINKINGOFF_STATE) | 527 | if (p_slot->state == BLINKINGOFF_STATE) |
| 532 | p_slot->hpc_ops->green_led_on(p_slot); | 528 | p_slot->hpc_ops->green_led_on(p_slot); |
| @@ -565,7 +561,7 @@ static void interrupt_event_handler(struct work_struct *work) | |||
| 565 | handle_button_press_event(p_slot); | 561 | handle_button_press_event(p_slot); |
| 566 | break; | 562 | break; |
| 567 | case INT_POWER_FAULT: | 563 | case INT_POWER_FAULT: |
| 568 | ctrl_dbg(p_slot->ctrl, "%s: power fault\n", __func__); | 564 | ctrl_dbg(p_slot->ctrl, "%s: Power fault\n", __func__); |
| 569 | p_slot->hpc_ops->set_attention_status(p_slot, 1); | 565 | p_slot->hpc_ops->set_attention_status(p_slot, 1); |
| 570 | p_slot->hpc_ops->green_led_off(p_slot); | 566 | p_slot->hpc_ops->green_led_off(p_slot); |
| 571 | break; | 567 | break; |
| @@ -660,7 +656,7 @@ static int shpchp_disable_slot (struct slot *p_slot) | |||
| 660 | } | 656 | } |
| 661 | rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus); | 657 | rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus); |
| 662 | if (rc || !getstatus) { | 658 | if (rc || !getstatus) { |
| 663 | ctrl_info(ctrl, "Already disabled slot(%s)\n", | 659 | ctrl_info(ctrl, "Already disabled on slot(%s)\n", |
| 664 | slot_name(p_slot)); | 660 | slot_name(p_slot)); |
| 665 | goto out; | 661 | goto out; |
| 666 | } | 662 | } |
diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c index 2b69a08326b7..86dc39847769 100644 --- a/drivers/pci/hotplug/shpchp_hpc.c +++ b/drivers/pci/hotplug/shpchp_hpc.c | |||
| @@ -320,8 +320,7 @@ static int shpc_write_cmd(struct slot *slot, u8 t_slot, u8 cmd) | |||
| 320 | 320 | ||
| 321 | if (!shpc_poll_ctrl_busy(ctrl)) { | 321 | if (!shpc_poll_ctrl_busy(ctrl)) { |
| 322 | /* After 1 sec and and the controller is still busy */ | 322 | /* After 1 sec and and the controller is still busy */ |
| 323 | ctrl_err(ctrl, "%s : Controller is still busy after 1 sec.\n", | 323 | ctrl_err(ctrl, "Controller is still busy after 1 sec\n"); |
| 324 | __func__); | ||
| 325 | retval = -EBUSY; | 324 | retval = -EBUSY; |
| 326 | goto out; | 325 | goto out; |
| 327 | } | 326 | } |
| @@ -344,8 +343,9 @@ static int shpc_write_cmd(struct slot *slot, u8 t_slot, u8 cmd) | |||
| 344 | 343 | ||
| 345 | cmd_status = hpc_check_cmd_status(slot->ctrl); | 344 | cmd_status = hpc_check_cmd_status(slot->ctrl); |
| 346 | if (cmd_status) { | 345 | if (cmd_status) { |
| 347 | ctrl_err(ctrl, "%s: Failed to issued command 0x%x " | 346 | ctrl_err(ctrl, |
| 348 | "(error code = %d)\n", __func__, cmd, cmd_status); | 347 | "Failed to issued command 0x%x (error code = %d)\n", |
| 348 | cmd, cmd_status); | ||
| 349 | retval = -EIO; | 349 | retval = -EIO; |
| 350 | } | 350 | } |
| 351 | out: | 351 | out: |
| @@ -364,15 +364,15 @@ static int hpc_check_cmd_status(struct controller *ctrl) | |||
| 364 | break; | 364 | break; |
| 365 | case 1: | 365 | case 1: |
| 366 | retval = SWITCH_OPEN; | 366 | retval = SWITCH_OPEN; |
| 367 | ctrl_err(ctrl, "%s: Switch opened!\n", __func__); | 367 | ctrl_err(ctrl, "Switch opened!\n"); |
| 368 | break; | 368 | break; |
| 369 | case 2: | 369 | case 2: |
| 370 | retval = INVALID_CMD; | 370 | retval = INVALID_CMD; |
| 371 | ctrl_err(ctrl, "%s: Invalid HPC command!\n", __func__); | 371 | ctrl_err(ctrl, "Invalid HPC command!\n"); |
| 372 | break; | 372 | break; |
| 373 | case 4: | 373 | case 4: |
| 374 | retval = INVALID_SPEED_MODE; | 374 | retval = INVALID_SPEED_MODE; |
| 375 | ctrl_err(ctrl, "%s: Invalid bus speed/mode!\n", __func__); | 375 | ctrl_err(ctrl, "Invalid bus speed/mode!\n"); |
| 376 | break; | 376 | break; |
| 377 | default: | 377 | default: |
| 378 | retval = cmd_status; | 378 | retval = cmd_status; |
| @@ -773,8 +773,8 @@ static irqreturn_t shpc_isr(int irq, void *dev_id) | |||
| 773 | continue; | 773 | continue; |
| 774 | 774 | ||
| 775 | slot_reg = shpc_readl(ctrl, SLOT_REG(hp_slot)); | 775 | slot_reg = shpc_readl(ctrl, SLOT_REG(hp_slot)); |
| 776 | ctrl_dbg(ctrl, "%s: Slot %x with intr, slot register = %x\n", | 776 | ctrl_dbg(ctrl, "Slot %x with intr, slot register = %x\n", |
| 777 | __func__, hp_slot, slot_reg); | 777 | hp_slot, slot_reg); |
| 778 | 778 | ||
| 779 | if (slot_reg & MRL_CHANGE_DETECTED) | 779 | if (slot_reg & MRL_CHANGE_DETECTED) |
| 780 | shpchp_handle_switch_change(hp_slot, ctrl); | 780 | shpchp_handle_switch_change(hp_slot, ctrl); |
| @@ -949,6 +949,7 @@ int shpc_init(struct controller *ctrl, struct pci_dev *pdev) | |||
| 949 | u8 i; | 949 | u8 i; |
| 950 | 950 | ||
| 951 | ctrl->pci_dev = pdev; /* pci_dev of the P2P bridge */ | 951 | ctrl->pci_dev = pdev; /* pci_dev of the P2P bridge */ |
| 952 | ctrl_dbg(ctrl, "Hotplug Controller:\n"); | ||
| 952 | 953 | ||
| 953 | if ((pdev->vendor == PCI_VENDOR_ID_AMD) || (pdev->device == | 954 | if ((pdev->vendor == PCI_VENDOR_ID_AMD) || (pdev->device == |
| 954 | PCI_DEVICE_ID_AMD_GOLAM_7450)) { | 955 | PCI_DEVICE_ID_AMD_GOLAM_7450)) { |
| @@ -958,38 +959,33 @@ int shpc_init(struct controller *ctrl, struct pci_dev *pdev) | |||
| 958 | } else { | 959 | } else { |
| 959 | ctrl->cap_offset = pci_find_capability(pdev, PCI_CAP_ID_SHPC); | 960 | ctrl->cap_offset = pci_find_capability(pdev, PCI_CAP_ID_SHPC); |
| 960 | if (!ctrl->cap_offset) { | 961 | if (!ctrl->cap_offset) { |
| 961 | ctrl_err(ctrl, "%s : cap_offset == 0\n", __func__); | 962 | ctrl_err(ctrl, "Cannot find PCI capability\n"); |
| 962 | goto abort; | 963 | goto abort; |
| 963 | } | 964 | } |
| 964 | ctrl_dbg(ctrl, "%s: cap_offset = %x\n", __func__, | 965 | ctrl_dbg(ctrl, " cap_offset = %x\n", ctrl->cap_offset); |
| 965 | ctrl->cap_offset); | ||
| 966 | 966 | ||
| 967 | rc = shpc_indirect_read(ctrl, 0, &shpc_base_offset); | 967 | rc = shpc_indirect_read(ctrl, 0, &shpc_base_offset); |
| 968 | if (rc) { | 968 | if (rc) { |
| 969 | ctrl_err(ctrl, "%s: cannot read base_offset\n", | 969 | ctrl_err(ctrl, "Cannot read base_offset\n"); |
| 970 | __func__); | ||
| 971 | goto abort; | 970 | goto abort; |
| 972 | } | 971 | } |
| 973 | 972 | ||
| 974 | rc = shpc_indirect_read(ctrl, 3, &tempdword); | 973 | rc = shpc_indirect_read(ctrl, 3, &tempdword); |
| 975 | if (rc) { | 974 | if (rc) { |
| 976 | ctrl_err(ctrl, "%s: cannot read slot config\n", | 975 | ctrl_err(ctrl, "Cannot read slot config\n"); |
| 977 | __func__); | ||
| 978 | goto abort; | 976 | goto abort; |
| 979 | } | 977 | } |
| 980 | num_slots = tempdword & SLOT_NUM; | 978 | num_slots = tempdword & SLOT_NUM; |
| 981 | ctrl_dbg(ctrl, "%s: num_slots (indirect) %x\n", | 979 | ctrl_dbg(ctrl, " num_slots (indirect) %x\n", num_slots); |
| 982 | __func__, num_slots); | ||
| 983 | 980 | ||
| 984 | for (i = 0; i < 9 + num_slots; i++) { | 981 | for (i = 0; i < 9 + num_slots; i++) { |
| 985 | rc = shpc_indirect_read(ctrl, i, &tempdword); | 982 | rc = shpc_indirect_read(ctrl, i, &tempdword); |
| 986 | if (rc) { | 983 | if (rc) { |
| 987 | ctrl_err(ctrl, "%s: cannot read creg " | 984 | ctrl_err(ctrl, |
| 988 | "(index = %d)\n", __func__, i); | 985 | "Cannot read creg (index = %d)\n", i); |
| 989 | goto abort; | 986 | goto abort; |
| 990 | } | 987 | } |
| 991 | ctrl_dbg(ctrl, "%s: offset %d: value %x\n", | 988 | ctrl_dbg(ctrl, " offset %d: value %x\n", i, tempdword); |
| 992 | __func__, i, tempdword); | ||
| 993 | } | 989 | } |
| 994 | 990 | ||
| 995 | ctrl->mmio_base = | 991 | ctrl->mmio_base = |
| @@ -1003,25 +999,25 @@ int shpc_init(struct controller *ctrl, struct pci_dev *pdev) | |||
| 1003 | 999 | ||
| 1004 | rc = pci_enable_device(pdev); | 1000 | rc = pci_enable_device(pdev); |
| 1005 | if (rc) { | 1001 | if (rc) { |
| 1006 | ctrl_err(ctrl, "%s: pci_enable_device failed\n", __func__); | 1002 | ctrl_err(ctrl, "pci_enable_device failed\n"); |
| 1007 | goto abort; | 1003 | goto abort; |
| 1008 | } | 1004 | } |
| 1009 | 1005 | ||
| 1010 | if (!request_mem_region(ctrl->mmio_base, ctrl->mmio_size, MY_NAME)) { | 1006 | if (!request_mem_region(ctrl->mmio_base, ctrl->mmio_size, MY_NAME)) { |
| 1011 | ctrl_err(ctrl, "%s: cannot reserve MMIO region\n", __func__); | 1007 | ctrl_err(ctrl, "Cannot reserve MMIO region\n"); |
| 1012 | rc = -1; | 1008 | rc = -1; |
| 1013 | goto abort; | 1009 | goto abort; |
| 1014 | } | 1010 | } |
| 1015 | 1011 | ||
| 1016 | ctrl->creg = ioremap(ctrl->mmio_base, ctrl->mmio_size); | 1012 | ctrl->creg = ioremap(ctrl->mmio_base, ctrl->mmio_size); |
| 1017 | if (!ctrl->creg) { | 1013 | if (!ctrl->creg) { |
| 1018 | ctrl_err(ctrl, "%s: cannot remap MMIO region %lx @ %lx\n", | 1014 | ctrl_err(ctrl, "Cannot remap MMIO region %lx @ %lx\n", |
| 1019 | __func__, ctrl->mmio_size, ctrl->mmio_base); | 1015 | ctrl->mmio_size, ctrl->mmio_base); |
| 1020 | release_mem_region(ctrl->mmio_base, ctrl->mmio_size); | 1016 | release_mem_region(ctrl->mmio_base, ctrl->mmio_size); |
| 1021 | rc = -1; | 1017 | rc = -1; |
| 1022 | goto abort; | 1018 | goto abort; |
| 1023 | } | 1019 | } |
| 1024 | ctrl_dbg(ctrl, "%s: ctrl->creg %p\n", __func__, ctrl->creg); | 1020 | ctrl_dbg(ctrl, "ctrl->creg %p\n", ctrl->creg); |
| 1025 | 1021 | ||
| 1026 | mutex_init(&ctrl->crit_sect); | 1022 | mutex_init(&ctrl->crit_sect); |
| 1027 | mutex_init(&ctrl->cmd_lock); | 1023 | mutex_init(&ctrl->cmd_lock); |
| @@ -1040,21 +1036,21 @@ int shpc_init(struct controller *ctrl, struct pci_dev *pdev) | |||
| 1040 | 1036 | ||
| 1041 | /* Mask Global Interrupt Mask & Command Complete Interrupt Mask */ | 1037 | /* Mask Global Interrupt Mask & Command Complete Interrupt Mask */ |
| 1042 | tempdword = shpc_readl(ctrl, SERR_INTR_ENABLE); | 1038 | tempdword = shpc_readl(ctrl, SERR_INTR_ENABLE); |
| 1043 | ctrl_dbg(ctrl, "%s: SERR_INTR_ENABLE = %x\n", __func__, tempdword); | 1039 | ctrl_dbg(ctrl, "SERR_INTR_ENABLE = %x\n", tempdword); |
| 1044 | tempdword |= (GLOBAL_INTR_MASK | GLOBAL_SERR_MASK | | 1040 | tempdword |= (GLOBAL_INTR_MASK | GLOBAL_SERR_MASK | |
| 1045 | COMMAND_INTR_MASK | ARBITER_SERR_MASK); | 1041 | COMMAND_INTR_MASK | ARBITER_SERR_MASK); |
| 1046 | tempdword &= ~SERR_INTR_RSVDZ_MASK; | 1042 | tempdword &= ~SERR_INTR_RSVDZ_MASK; |
| 1047 | shpc_writel(ctrl, SERR_INTR_ENABLE, tempdword); | 1043 | shpc_writel(ctrl, SERR_INTR_ENABLE, tempdword); |
| 1048 | tempdword = shpc_readl(ctrl, SERR_INTR_ENABLE); | 1044 | tempdword = shpc_readl(ctrl, SERR_INTR_ENABLE); |
| 1049 | ctrl_dbg(ctrl, "%s: SERR_INTR_ENABLE = %x\n", __func__, tempdword); | 1045 | ctrl_dbg(ctrl, "SERR_INTR_ENABLE = %x\n", tempdword); |
| 1050 | 1046 | ||
| 1051 | /* Mask the MRL sensor SERR Mask of individual slot in | 1047 | /* Mask the MRL sensor SERR Mask of individual slot in |
| 1052 | * Slot SERR-INT Mask & clear all the existing event if any | 1048 | * Slot SERR-INT Mask & clear all the existing event if any |
| 1053 | */ | 1049 | */ |
| 1054 | for (hp_slot = 0; hp_slot < ctrl->num_slots; hp_slot++) { | 1050 | for (hp_slot = 0; hp_slot < ctrl->num_slots; hp_slot++) { |
| 1055 | slot_reg = shpc_readl(ctrl, SLOT_REG(hp_slot)); | 1051 | slot_reg = shpc_readl(ctrl, SLOT_REG(hp_slot)); |
| 1056 | ctrl_dbg(ctrl, "%s: Default Logical Slot Register %d " | 1052 | ctrl_dbg(ctrl, "Default Logical Slot Register %d value %x\n", |
| 1057 | "value %x\n", __func__, hp_slot, slot_reg); | 1053 | hp_slot, slot_reg); |
| 1058 | slot_reg |= (PRSNT_CHANGE_INTR_MASK | ISO_PFAULT_INTR_MASK | | 1054 | slot_reg |= (PRSNT_CHANGE_INTR_MASK | ISO_PFAULT_INTR_MASK | |
| 1059 | BUTTON_PRESS_INTR_MASK | MRL_CHANGE_INTR_MASK | | 1055 | BUTTON_PRESS_INTR_MASK | MRL_CHANGE_INTR_MASK | |
| 1060 | CON_PFAULT_INTR_MASK | MRL_CHANGE_SERR_MASK | | 1056 | CON_PFAULT_INTR_MASK | MRL_CHANGE_SERR_MASK | |
| @@ -1079,8 +1075,8 @@ int shpc_init(struct controller *ctrl, struct pci_dev *pdev) | |||
| 1079 | 1075 | ||
| 1080 | rc = request_irq(ctrl->pci_dev->irq, shpc_isr, IRQF_SHARED, | 1076 | rc = request_irq(ctrl->pci_dev->irq, shpc_isr, IRQF_SHARED, |
| 1081 | MY_NAME, (void *)ctrl); | 1077 | MY_NAME, (void *)ctrl); |
| 1082 | ctrl_dbg(ctrl, "%s: request_irq %d for hpc%d (returns %d)\n", | 1078 | ctrl_dbg(ctrl, "request_irq %d for hpc%d (returns %d)\n", |
| 1083 | __func__, ctrl->pci_dev->irq, | 1079 | ctrl->pci_dev->irq, |
| 1084 | atomic_read(&shpchp_num_controllers), rc); | 1080 | atomic_read(&shpchp_num_controllers), rc); |
| 1085 | if (rc) { | 1081 | if (rc) { |
| 1086 | ctrl_err(ctrl, "Can't get irq %d for the hotplug " | 1082 | ctrl_err(ctrl, "Can't get irq %d for the hotplug " |
| @@ -1088,9 +1084,7 @@ int shpc_init(struct controller *ctrl, struct pci_dev *pdev) | |||
| 1088 | goto abort_iounmap; | 1084 | goto abort_iounmap; |
| 1089 | } | 1085 | } |
| 1090 | } | 1086 | } |
| 1091 | ctrl_dbg(ctrl, "%s: HPC at b:d:f:irq=0x%x:%x:%x:%x\n", | 1087 | ctrl_dbg(ctrl, "HPC at %s irq=%x\n", pci_name(pdev), pdev->irq); |
| 1092 | __func__, pdev->bus->number, PCI_SLOT(pdev->devfn), | ||
| 1093 | PCI_FUNC(pdev->devfn), pdev->irq); | ||
| 1094 | 1088 | ||
| 1095 | /* | 1089 | /* |
| 1096 | * If this is the first controller to be initialized, | 1090 | * If this is the first controller to be initialized, |
| @@ -1109,8 +1103,8 @@ int shpc_init(struct controller *ctrl, struct pci_dev *pdev) | |||
| 1109 | */ | 1103 | */ |
| 1110 | for (hp_slot = 0; hp_slot < ctrl->num_slots; hp_slot++) { | 1104 | for (hp_slot = 0; hp_slot < ctrl->num_slots; hp_slot++) { |
| 1111 | slot_reg = shpc_readl(ctrl, SLOT_REG(hp_slot)); | 1105 | slot_reg = shpc_readl(ctrl, SLOT_REG(hp_slot)); |
| 1112 | ctrl_dbg(ctrl, "%s: Default Logical Slot Register %d " | 1106 | ctrl_dbg(ctrl, "Default Logical Slot Register %d value %x\n", |
| 1113 | "value %x\n", __func__, hp_slot, slot_reg); | 1107 | hp_slot, slot_reg); |
| 1114 | slot_reg &= ~(PRSNT_CHANGE_INTR_MASK | ISO_PFAULT_INTR_MASK | | 1108 | slot_reg &= ~(PRSNT_CHANGE_INTR_MASK | ISO_PFAULT_INTR_MASK | |
| 1115 | BUTTON_PRESS_INTR_MASK | MRL_CHANGE_INTR_MASK | | 1109 | BUTTON_PRESS_INTR_MASK | MRL_CHANGE_INTR_MASK | |
| 1116 | CON_PFAULT_INTR_MASK | SLOT_REG_RSVDZ_MASK); | 1110 | CON_PFAULT_INTR_MASK | SLOT_REG_RSVDZ_MASK); |
| @@ -1123,8 +1117,7 @@ int shpc_init(struct controller *ctrl, struct pci_dev *pdev) | |||
| 1123 | SERR_INTR_RSVDZ_MASK); | 1117 | SERR_INTR_RSVDZ_MASK); |
| 1124 | shpc_writel(ctrl, SERR_INTR_ENABLE, tempdword); | 1118 | shpc_writel(ctrl, SERR_INTR_ENABLE, tempdword); |
| 1125 | tempdword = shpc_readl(ctrl, SERR_INTR_ENABLE); | 1119 | tempdword = shpc_readl(ctrl, SERR_INTR_ENABLE); |
| 1126 | ctrl_dbg(ctrl, "%s: SERR_INTR_ENABLE = %x\n", | 1120 | ctrl_dbg(ctrl, "SERR_INTR_ENABLE = %x\n", tempdword); |
| 1127 | __func__, tempdword); | ||
| 1128 | } | 1121 | } |
| 1129 | 1122 | ||
| 1130 | return 0; | 1123 | return 0; |
diff --git a/drivers/pci/hotplug/shpchp_pci.c b/drivers/pci/hotplug/shpchp_pci.c index faecbfaa64f0..138f161becc0 100644 --- a/drivers/pci/hotplug/shpchp_pci.c +++ b/drivers/pci/hotplug/shpchp_pci.c | |||
| @@ -49,9 +49,7 @@ static void program_fw_provided_values(struct pci_dev *dev) | |||
| 49 | /* use default values if we can't get them from firmware */ | 49 | /* use default values if we can't get them from firmware */ |
| 50 | if (get_hp_params_from_firmware(dev, &hpp) || | 50 | if (get_hp_params_from_firmware(dev, &hpp) || |
| 51 | !hpp.t0 || (hpp.t0->revision > 1)) { | 51 | !hpp.t0 || (hpp.t0->revision > 1)) { |
| 52 | printk(KERN_WARNING | 52 | warn("Could not get hotplug parameters. Use defaults\n"); |
| 53 | "%s: Could not get hotplug parameters. Use defaults\n", | ||
| 54 | __func__); | ||
| 55 | hpp.t0 = &hpp.type0_data; | 53 | hpp.t0 = &hpp.type0_data; |
| 56 | hpp.t0->revision = 0; | 54 | hpp.t0->revision = 0; |
| 57 | hpp.t0->cache_line_size = 8; | 55 | hpp.t0->cache_line_size = 8; |
| @@ -105,9 +103,9 @@ int __ref shpchp_configure_device(struct slot *p_slot) | |||
| 105 | 103 | ||
| 106 | dev = pci_get_slot(parent, PCI_DEVFN(p_slot->device, 0)); | 104 | dev = pci_get_slot(parent, PCI_DEVFN(p_slot->device, 0)); |
| 107 | if (dev) { | 105 | if (dev) { |
| 108 | ctrl_err(ctrl, | 106 | ctrl_err(ctrl, "Device %s already exists " |
| 109 | "Device %s already exists at %x:%x, cannot hot-add\n", | 107 | "at %04x:%02x:%02x, cannot hot-add\n", pci_name(dev), |
| 110 | pci_name(dev), p_slot->bus, p_slot->device); | 108 | pci_domain_nr(parent), p_slot->bus, p_slot->device); |
| 111 | pci_dev_put(dev); | 109 | pci_dev_put(dev); |
| 112 | return -EINVAL; | 110 | return -EINVAL; |
| 113 | } | 111 | } |
| @@ -173,8 +171,8 @@ int shpchp_unconfigure_device(struct slot *p_slot) | |||
| 173 | struct pci_bus *parent = p_slot->ctrl->pci_dev->subordinate; | 171 | struct pci_bus *parent = p_slot->ctrl->pci_dev->subordinate; |
| 174 | struct controller *ctrl = p_slot->ctrl; | 172 | struct controller *ctrl = p_slot->ctrl; |
| 175 | 173 | ||
| 176 | ctrl_dbg(ctrl, "%s: bus/dev = %x/%x\n", | 174 | ctrl_dbg(ctrl, "%s: domain:bus:dev = %04x:%02x:%02x\n", |
| 177 | __func__, p_slot->bus, p_slot->device); | 175 | __func__, pci_domain_nr(parent), p_slot->bus, p_slot->device); |
| 178 | 176 | ||
| 179 | for (j=0; j<8 ; j++) { | 177 | for (j=0; j<8 ; j++) { |
| 180 | struct pci_dev* temp = pci_get_slot(parent, | 178 | struct pci_dev* temp = pci_get_slot(parent, |
