aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/shpchp_ctrl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug/shpchp_ctrl.c')
-rw-r--r--drivers/pci/hotplug/shpchp_ctrl.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/pci/hotplug/shpchp_ctrl.c b/drivers/pci/hotplug/shpchp_ctrl.c
index dfb53932dfbc..919b1ee44313 100644
--- a/drivers/pci/hotplug/shpchp_ctrl.c
+++ b/drivers/pci/hotplug/shpchp_ctrl.c
@@ -70,7 +70,7 @@ u8 shpchp_handle_attention_button(u8 hp_slot, struct controller *ctrl)
70 /* 70 /*
71 * Button pressed - See if need to TAKE ACTION!!! 71 * Button pressed - See if need to TAKE ACTION!!!
72 */ 72 */
73 info("Button pressed on Slot(%s)\n", p_slot->name); 73 info("Button pressed on Slot(%s)\n", slot_name(p_slot));
74 event_type = INT_BUTTON_PRESS; 74 event_type = INT_BUTTON_PRESS;
75 75
76 queue_interrupt_event(p_slot, event_type); 76 queue_interrupt_event(p_slot, event_type);
@@ -98,7 +98,7 @@ u8 shpchp_handle_switch_change(u8 hp_slot, struct controller *ctrl)
98 /* 98 /*
99 * Switch opened 99 * Switch opened
100 */ 100 */
101 info("Latch open on Slot(%s)\n", p_slot->name); 101 info("Latch open on Slot(%s)\n", slot_name(p_slot));
102 event_type = INT_SWITCH_OPEN; 102 event_type = INT_SWITCH_OPEN;
103 if (p_slot->pwr_save && p_slot->presence_save) { 103 if (p_slot->pwr_save && p_slot->presence_save) {
104 event_type = INT_POWER_FAULT; 104 event_type = INT_POWER_FAULT;
@@ -108,7 +108,7 @@ u8 shpchp_handle_switch_change(u8 hp_slot, struct controller *ctrl)
108 /* 108 /*
109 * Switch closed 109 * Switch closed
110 */ 110 */
111 info("Latch close on Slot(%s)\n", p_slot->name); 111 info("Latch close on Slot(%s)\n", slot_name(p_slot));
112 event_type = INT_SWITCH_CLOSE; 112 event_type = INT_SWITCH_CLOSE;
113 } 113 }
114 114
@@ -135,13 +135,13 @@ u8 shpchp_handle_presence_change(u8 hp_slot, struct controller *ctrl)
135 /* 135 /*
136 * Card Present 136 * Card Present
137 */ 137 */
138 info("Card present on Slot(%s)\n", p_slot->name); 138 info("Card present on Slot(%s)\n", slot_name(p_slot));
139 event_type = INT_PRESENCE_ON; 139 event_type = INT_PRESENCE_ON;
140 } else { 140 } else {
141 /* 141 /*
142 * Not Present 142 * Not Present
143 */ 143 */
144 info("Card not present on Slot(%s)\n", p_slot->name); 144 info("Card not present on Slot(%s)\n", slot_name(p_slot));
145 event_type = INT_PRESENCE_OFF; 145 event_type = INT_PRESENCE_OFF;
146 } 146 }
147 147
@@ -164,14 +164,14 @@ u8 shpchp_handle_power_fault(u8 hp_slot, struct controller *ctrl)
164 /* 164 /*
165 * Power fault Cleared 165 * Power fault Cleared
166 */ 166 */
167 info("Power fault cleared on Slot(%s)\n", p_slot->name); 167 info("Power fault cleared on Slot(%s)\n", slot_name(p_slot));
168 p_slot->status = 0x00; 168 p_slot->status = 0x00;
169 event_type = INT_POWER_FAULT_CLEAR; 169 event_type = INT_POWER_FAULT_CLEAR;
170 } else { 170 } else {
171 /* 171 /*
172 * Power fault 172 * Power fault
173 */ 173 */
174 info("Power fault on Slot(%s)\n", p_slot->name); 174 info("Power fault on Slot(%s)\n", slot_name(p_slot));
175 event_type = INT_POWER_FAULT; 175 event_type = INT_POWER_FAULT;
176 /* set power fault status for this board */ 176 /* set power fault status for this board */
177 p_slot->status = 0xFF; 177 p_slot->status = 0xFF;
@@ -493,11 +493,11 @@ static void handle_button_press_event(struct slot *p_slot)
493 if (getstatus) { 493 if (getstatus) {
494 p_slot->state = BLINKINGOFF_STATE; 494 p_slot->state = BLINKINGOFF_STATE;
495 info("PCI slot #%s - powering off due to button " 495 info("PCI slot #%s - powering off due to button "
496 "press.\n", p_slot->name); 496 "press.\n", slot_name(p_slot));
497 } else { 497 } else {
498 p_slot->state = BLINKINGON_STATE; 498 p_slot->state = BLINKINGON_STATE;
499 info("PCI slot #%s - powering on due to button " 499 info("PCI slot #%s - powering on due to button "
500 "press.\n", p_slot->name); 500 "press.\n", slot_name(p_slot));
501 } 501 }
502 /* blink green LED and turn off amber */ 502 /* blink green LED and turn off amber */
503 p_slot->hpc_ops->green_led_blink(p_slot); 503 p_slot->hpc_ops->green_led_blink(p_slot);
@@ -512,7 +512,7 @@ static void handle_button_press_event(struct slot *p_slot)
512 * press the attention again before the 5 sec. limit 512 * press the attention again before the 5 sec. limit
513 * expires to cancel hot-add or hot-remove 513 * expires to cancel hot-add or hot-remove
514 */ 514 */
515 info("Button cancel on Slot(%s)\n", p_slot->name); 515 info("Button cancel on Slot(%s)\n", slot_name(p_slot));
516 dbg("%s: button cancel\n", __func__); 516 dbg("%s: button cancel\n", __func__);
517 cancel_delayed_work(&p_slot->work); 517 cancel_delayed_work(&p_slot->work);
518 if (p_slot->state == BLINKINGOFF_STATE) 518 if (p_slot->state == BLINKINGOFF_STATE)
@@ -521,7 +521,7 @@ static void handle_button_press_event(struct slot *p_slot)
521 p_slot->hpc_ops->green_led_off(p_slot); 521 p_slot->hpc_ops->green_led_off(p_slot);
522 p_slot->hpc_ops->set_attention_status(p_slot, 0); 522 p_slot->hpc_ops->set_attention_status(p_slot, 0);
523 info("PCI slot #%s - action canceled due to button press\n", 523 info("PCI slot #%s - action canceled due to button press\n",
524 p_slot->name); 524 slot_name(p_slot));
525 p_slot->state = STATIC_STATE; 525 p_slot->state = STATIC_STATE;
526 break; 526 break;
527 case POWEROFF_STATE: 527 case POWEROFF_STATE:
@@ -531,7 +531,7 @@ static void handle_button_press_event(struct slot *p_slot)
531 * this means that the previous attention button action 531 * this means that the previous attention button action
532 * to hot-add or hot-remove is undergoing 532 * to hot-add or hot-remove is undergoing
533 */ 533 */
534 info("Button ignore on Slot(%s)\n", p_slot->name); 534 info("Button ignore on Slot(%s)\n", slot_name(p_slot));
535 update_slot_info(p_slot); 535 update_slot_info(p_slot);
536 break; 536 break;
537 default: 537 default:
@@ -574,17 +574,17 @@ static int shpchp_enable_slot (struct slot *p_slot)
574 mutex_lock(&p_slot->ctrl->crit_sect); 574 mutex_lock(&p_slot->ctrl->crit_sect);
575 rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus); 575 rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus);
576 if (rc || !getstatus) { 576 if (rc || !getstatus) {
577 info("No adapter on slot(%s)\n", p_slot->name); 577 info("No adapter on slot(%s)\n", slot_name(p_slot));
578 goto out; 578 goto out;
579 } 579 }
580 rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); 580 rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
581 if (rc || getstatus) { 581 if (rc || getstatus) {
582 info("Latch open on slot(%s)\n", p_slot->name); 582 info("Latch open on slot(%s)\n", slot_name(p_slot));
583 goto out; 583 goto out;
584 } 584 }
585 rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus); 585 rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
586 if (rc || getstatus) { 586 if (rc || getstatus) {
587 info("Already enabled on slot(%s)\n", p_slot->name); 587 info("Already enabled on slot(%s)\n", slot_name(p_slot));
588 goto out; 588 goto out;
589 } 589 }
590 590
@@ -633,17 +633,17 @@ static int shpchp_disable_slot (struct slot *p_slot)
633 633
634 rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus); 634 rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus);
635 if (rc || !getstatus) { 635 if (rc || !getstatus) {
636 info("No adapter on slot(%s)\n", p_slot->name); 636 info("No adapter on slot(%s)\n", slot_name(p_slot));
637 goto out; 637 goto out;
638 } 638 }
639 rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); 639 rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
640 if (rc || getstatus) { 640 if (rc || getstatus) {
641 info("Latch open on slot(%s)\n", p_slot->name); 641 info("Latch open on slot(%s)\n", slot_name(p_slot));
642 goto out; 642 goto out;
643 } 643 }
644 rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus); 644 rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
645 if (rc || !getstatus) { 645 if (rc || !getstatus) {
646 info("Already disabled slot(%s)\n", p_slot->name); 646 info("Already disabled slot(%s)\n", slot_name(p_slot));
647 goto out; 647 goto out;
648 } 648 }
649 649
@@ -671,14 +671,14 @@ int shpchp_sysfs_enable_slot(struct slot *p_slot)
671 break; 671 break;
672 case POWERON_STATE: 672 case POWERON_STATE:
673 info("Slot %s is already in powering on state\n", 673 info("Slot %s is already in powering on state\n",
674 p_slot->name); 674 slot_name(p_slot));
675 break; 675 break;
676 case BLINKINGOFF_STATE: 676 case BLINKINGOFF_STATE:
677 case POWEROFF_STATE: 677 case POWEROFF_STATE:
678 info("Already enabled on slot %s\n", p_slot->name); 678 info("Already enabled on slot %s\n", slot_name(p_slot));
679 break; 679 break;
680 default: 680 default:
681 err("Not a valid state on slot %s\n", p_slot->name); 681 err("Not a valid state on slot %s\n", slot_name(p_slot));
682 break; 682 break;
683 } 683 }
684 mutex_unlock(&p_slot->lock); 684 mutex_unlock(&p_slot->lock);
@@ -703,14 +703,14 @@ int shpchp_sysfs_disable_slot(struct slot *p_slot)
703 break; 703 break;
704 case POWEROFF_STATE: 704 case POWEROFF_STATE:
705 info("Slot %s is already in powering off state\n", 705 info("Slot %s is already in powering off state\n",
706 p_slot->name); 706 slot_name(p_slot));
707 break; 707 break;
708 case BLINKINGON_STATE: 708 case BLINKINGON_STATE:
709 case POWERON_STATE: 709 case POWERON_STATE:
710 info("Already disabled on slot %s\n", p_slot->name); 710 info("Already disabled on slot %s\n", slot_name(p_slot));
711 break; 711 break;
712 default: 712 default:
713 err("Not a valid state on slot %s\n", p_slot->name); 713 err("Not a valid state on slot %s\n", slot_name(p_slot));
714 break; 714 break;
715 } 715 }
716 mutex_unlock(&p_slot->lock); 716 mutex_unlock(&p_slot->lock);