aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/pciehp_ctrl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug/pciehp_ctrl.c')
-rw-r--r--drivers/pci/hotplug/pciehp_ctrl.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c
index b23061c56115..0c481f7d2ab3 100644
--- a/drivers/pci/hotplug/pciehp_ctrl.c
+++ b/drivers/pci/hotplug/pciehp_ctrl.c
@@ -181,7 +181,7 @@ static void set_slot_off(struct controller *ctrl, struct slot * pslot)
181 if (POWER_CTRL(ctrl->ctrlcap)) { 181 if (POWER_CTRL(ctrl->ctrlcap)) {
182 if (pslot->hpc_ops->power_off_slot(pslot)) { 182 if (pslot->hpc_ops->power_off_slot(pslot)) {
183 err("%s: Issue of Slot Power Off command failed\n", 183 err("%s: Issue of Slot Power Off command failed\n",
184 __FUNCTION__); 184 __func__);
185 return; 185 return;
186 } 186 }
187 } 187 }
@@ -192,7 +192,7 @@ static void set_slot_off(struct controller *ctrl, struct slot * pslot)
192 if (ATTN_LED(ctrl->ctrlcap)) { 192 if (ATTN_LED(ctrl->ctrlcap)) {
193 if (pslot->hpc_ops->set_attention_status(pslot, 1)) { 193 if (pslot->hpc_ops->set_attention_status(pslot, 1)) {
194 err("%s: Issue of Set Attention Led command failed\n", 194 err("%s: Issue of Set Attention Led command failed\n",
195 __FUNCTION__); 195 __func__);
196 return; 196 return;
197 } 197 }
198 } 198 }
@@ -211,7 +211,7 @@ static int board_added(struct slot *p_slot)
211 struct controller *ctrl = p_slot->ctrl; 211 struct controller *ctrl = p_slot->ctrl;
212 212
213 dbg("%s: slot device, slot offset, hp slot = %d, %d ,%d\n", 213 dbg("%s: slot device, slot offset, hp slot = %d, %d ,%d\n",
214 __FUNCTION__, p_slot->device, 214 __func__, p_slot->device,
215 ctrl->slot_device_offset, p_slot->hp_slot); 215 ctrl->slot_device_offset, p_slot->hp_slot);
216 216
217 if (POWER_CTRL(ctrl->ctrlcap)) { 217 if (POWER_CTRL(ctrl->ctrlcap)) {
@@ -230,14 +230,14 @@ static int board_added(struct slot *p_slot)
230 /* Check link training status */ 230 /* Check link training status */
231 retval = p_slot->hpc_ops->check_lnk_status(ctrl); 231 retval = p_slot->hpc_ops->check_lnk_status(ctrl);
232 if (retval) { 232 if (retval) {
233 err("%s: Failed to check link status\n", __FUNCTION__); 233 err("%s: Failed to check link status\n", __func__);
234 set_slot_off(ctrl, p_slot); 234 set_slot_off(ctrl, p_slot);
235 return retval; 235 return retval;
236 } 236 }
237 237
238 /* Check for a power fault */ 238 /* Check for a power fault */
239 if (p_slot->hpc_ops->query_power_fault(p_slot)) { 239 if (p_slot->hpc_ops->query_power_fault(p_slot)) {
240 dbg("%s: power fault detected\n", __FUNCTION__); 240 dbg("%s: power fault detected\n", __func__);
241 retval = POWER_FAILURE; 241 retval = POWER_FAILURE;
242 goto err_exit; 242 goto err_exit;
243 } 243 }
@@ -277,14 +277,14 @@ static int remove_board(struct slot *p_slot)
277 if (retval) 277 if (retval)
278 return retval; 278 return retval;
279 279
280 dbg("In %s, hp_slot = %d\n", __FUNCTION__, p_slot->hp_slot); 280 dbg("In %s, hp_slot = %d\n", __func__, p_slot->hp_slot);
281 281
282 if (POWER_CTRL(ctrl->ctrlcap)) { 282 if (POWER_CTRL(ctrl->ctrlcap)) {
283 /* power off slot */ 283 /* power off slot */
284 retval = p_slot->hpc_ops->power_off_slot(p_slot); 284 retval = p_slot->hpc_ops->power_off_slot(p_slot);
285 if (retval) { 285 if (retval) {
286 err("%s: Issue of Slot Disable command failed\n", 286 err("%s: Issue of Slot Disable command failed\n",
287 __FUNCTION__); 287 __func__);
288 return retval; 288 return retval;
289 } 289 }
290 } 290 }
@@ -319,7 +319,7 @@ static void pciehp_power_thread(struct work_struct *work)
319 case POWEROFF_STATE: 319 case POWEROFF_STATE:
320 mutex_unlock(&p_slot->lock); 320 mutex_unlock(&p_slot->lock);
321 dbg("%s: disabling bus:device(%x:%x)\n", 321 dbg("%s: disabling bus:device(%x:%x)\n",
322 __FUNCTION__, p_slot->bus, p_slot->device); 322 __func__, p_slot->bus, p_slot->device);
323 pciehp_disable_slot(p_slot); 323 pciehp_disable_slot(p_slot);
324 mutex_lock(&p_slot->lock); 324 mutex_lock(&p_slot->lock);
325 p_slot->state = STATIC_STATE; 325 p_slot->state = STATIC_STATE;
@@ -347,7 +347,7 @@ void pciehp_queue_pushbutton_work(struct work_struct *work)
347 347
348 info = kmalloc(sizeof(*info), GFP_KERNEL); 348 info = kmalloc(sizeof(*info), GFP_KERNEL);
349 if (!info) { 349 if (!info) {
350 err("%s: Cannot allocate memory\n", __FUNCTION__); 350 err("%s: Cannot allocate memory\n", __func__);
351 return; 351 return;
352 } 352 }
353 info->p_slot = p_slot; 353 info->p_slot = p_slot;
@@ -424,7 +424,7 @@ static void handle_button_press_event(struct slot *p_slot)
424 * expires to cancel hot-add or hot-remove 424 * expires to cancel hot-add or hot-remove
425 */ 425 */
426 info("Button cancel on Slot(%s)\n", p_slot->name); 426 info("Button cancel on Slot(%s)\n", p_slot->name);
427 dbg("%s: button cancel\n", __FUNCTION__); 427 dbg("%s: button cancel\n", __func__);
428 cancel_delayed_work(&p_slot->work); 428 cancel_delayed_work(&p_slot->work);
429 if (p_slot->state == BLINKINGOFF_STATE) { 429 if (p_slot->state == BLINKINGOFF_STATE) {
430 if (PWR_LED(ctrl->ctrlcap)) 430 if (PWR_LED(ctrl->ctrlcap))
@@ -465,7 +465,7 @@ static void handle_surprise_event(struct slot *p_slot)
465 465
466 info = kmalloc(sizeof(*info), GFP_KERNEL); 466 info = kmalloc(sizeof(*info), GFP_KERNEL);
467 if (!info) { 467 if (!info) {
468 err("%s: Cannot allocate memory\n", __FUNCTION__); 468 err("%s: Cannot allocate memory\n", __func__);
469 return; 469 return;
470 } 470 }
471 info->p_slot = p_slot; 471 info->p_slot = p_slot;
@@ -526,7 +526,7 @@ int pciehp_enable_slot(struct slot *p_slot)
526 526
527 rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus); 527 rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus);
528 if (rc || !getstatus) { 528 if (rc || !getstatus) {
529 info("%s: no adapter on slot(%s)\n", __FUNCTION__, 529 info("%s: no adapter on slot(%s)\n", __func__,
530 p_slot->name); 530 p_slot->name);
531 mutex_unlock(&p_slot->ctrl->crit_sect); 531 mutex_unlock(&p_slot->ctrl->crit_sect);
532 return -ENODEV; 532 return -ENODEV;
@@ -534,7 +534,7 @@ int pciehp_enable_slot(struct slot *p_slot)
534 if (MRL_SENS(p_slot->ctrl->ctrlcap)) { 534 if (MRL_SENS(p_slot->ctrl->ctrlcap)) {
535 rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); 535 rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
536 if (rc || getstatus) { 536 if (rc || getstatus) {
537 info("%s: latch open on slot(%s)\n", __FUNCTION__, 537 info("%s: latch open on slot(%s)\n", __func__,
538 p_slot->name); 538 p_slot->name);
539 mutex_unlock(&p_slot->ctrl->crit_sect); 539 mutex_unlock(&p_slot->ctrl->crit_sect);
540 return -ENODEV; 540 return -ENODEV;
@@ -544,7 +544,7 @@ int pciehp_enable_slot(struct slot *p_slot)
544 if (POWER_CTRL(p_slot->ctrl->ctrlcap)) { 544 if (POWER_CTRL(p_slot->ctrl->ctrlcap)) {
545 rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus); 545 rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
546 if (rc || getstatus) { 546 if (rc || getstatus) {
547 info("%s: already enabled on slot(%s)\n", __FUNCTION__, 547 info("%s: already enabled on slot(%s)\n", __func__,
548 p_slot->name); 548 p_slot->name);
549 mutex_unlock(&p_slot->ctrl->crit_sect); 549 mutex_unlock(&p_slot->ctrl->crit_sect);
550 return -EINVAL; 550 return -EINVAL;
@@ -579,7 +579,7 @@ int pciehp_disable_slot(struct slot *p_slot)
579 if (!HP_SUPR_RM(p_slot->ctrl->ctrlcap)) { 579 if (!HP_SUPR_RM(p_slot->ctrl->ctrlcap)) {
580 ret = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus); 580 ret = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus);
581 if (ret || !getstatus) { 581 if (ret || !getstatus) {
582 info("%s: no adapter on slot(%s)\n", __FUNCTION__, 582 info("%s: no adapter on slot(%s)\n", __func__,
583 p_slot->name); 583 p_slot->name);
584 mutex_unlock(&p_slot->ctrl->crit_sect); 584 mutex_unlock(&p_slot->ctrl->crit_sect);
585 return -ENODEV; 585 return -ENODEV;
@@ -589,7 +589,7 @@ int pciehp_disable_slot(struct slot *p_slot)
589 if (MRL_SENS(p_slot->ctrl->ctrlcap)) { 589 if (MRL_SENS(p_slot->ctrl->ctrlcap)) {
590 ret = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); 590 ret = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
591 if (ret || getstatus) { 591 if (ret || getstatus) {
592 info("%s: latch open on slot(%s)\n", __FUNCTION__, 592 info("%s: latch open on slot(%s)\n", __func__,
593 p_slot->name); 593 p_slot->name);
594 mutex_unlock(&p_slot->ctrl->crit_sect); 594 mutex_unlock(&p_slot->ctrl->crit_sect);
595 return -ENODEV; 595 return -ENODEV;
@@ -599,7 +599,7 @@ int pciehp_disable_slot(struct slot *p_slot)
599 if (POWER_CTRL(p_slot->ctrl->ctrlcap)) { 599 if (POWER_CTRL(p_slot->ctrl->ctrlcap)) {
600 ret = p_slot->hpc_ops->get_power_status(p_slot, &getstatus); 600 ret = p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
601 if (ret || !getstatus) { 601 if (ret || !getstatus) {
602 info("%s: already disabled slot(%s)\n", __FUNCTION__, 602 info("%s: already disabled slot(%s)\n", __func__,
603 p_slot->name); 603 p_slot->name);
604 mutex_unlock(&p_slot->ctrl->crit_sect); 604 mutex_unlock(&p_slot->ctrl->crit_sect);
605 return -EINVAL; 605 return -EINVAL;