diff options
-rw-r--r-- | drivers/pci/hotplug/shpchp.h | 6 | ||||
-rw-r--r-- | drivers/pci/hotplug/shpchp_ctrl.c | 32 |
2 files changed, 19 insertions, 19 deletions
diff --git a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h index b70fddbce934..7208b95c6ee7 100644 --- a/drivers/pci/hotplug/shpchp.h +++ b/drivers/pci/hotplug/shpchp.h | |||
@@ -168,9 +168,9 @@ struct controller { | |||
168 | * error Messages | 168 | * error Messages |
169 | */ | 169 | */ |
170 | #define msg_initialization_err "Initialization failure, error=%d\n" | 170 | #define msg_initialization_err "Initialization failure, error=%d\n" |
171 | #define msg_button_on "PCI slot #%d - powering on due to button press.\n" | 171 | #define msg_button_on "PCI slot #%s - powering on due to button press.\n" |
172 | #define msg_button_off "PCI slot #%d - powering off due to button press.\n" | 172 | #define msg_button_off "PCI slot #%s - powering off due to button press.\n" |
173 | #define msg_button_cancel "PCI slot #%d - action canceled due to button press.\n" | 173 | #define msg_button_cancel "PCI slot #%s - action canceled due to button press.\n" |
174 | 174 | ||
175 | /* sysfs functions for the hotplug controller info */ | 175 | /* sysfs functions for the hotplug controller info */ |
176 | extern void shpchp_create_ctrl_files (struct controller *ctrl); | 176 | extern void shpchp_create_ctrl_files (struct controller *ctrl); |
diff --git a/drivers/pci/hotplug/shpchp_ctrl.c b/drivers/pci/hotplug/shpchp_ctrl.c index 4e6381481c55..c39901dbff20 100644 --- a/drivers/pci/hotplug/shpchp_ctrl.c +++ b/drivers/pci/hotplug/shpchp_ctrl.c | |||
@@ -72,7 +72,7 @@ u8 shpchp_handle_attention_button(u8 hp_slot, void *inst_id) | |||
72 | /* | 72 | /* |
73 | * Button pressed - See if need to TAKE ACTION!!! | 73 | * Button pressed - See if need to TAKE ACTION!!! |
74 | */ | 74 | */ |
75 | info("Button pressed on Slot(%d)\n", ctrl->first_slot + hp_slot); | 75 | info("Button pressed on Slot(%s)\n", p_slot->name); |
76 | event_type = INT_BUTTON_PRESS; | 76 | event_type = INT_BUTTON_PRESS; |
77 | 77 | ||
78 | queue_interrupt_event(p_slot, event_type); | 78 | queue_interrupt_event(p_slot, event_type); |
@@ -101,7 +101,7 @@ u8 shpchp_handle_switch_change(u8 hp_slot, void *inst_id) | |||
101 | /* | 101 | /* |
102 | * Switch opened | 102 | * Switch opened |
103 | */ | 103 | */ |
104 | info("Latch open on Slot(%d)\n", ctrl->first_slot + hp_slot); | 104 | info("Latch open on Slot(%s)\n", p_slot->name); |
105 | event_type = INT_SWITCH_OPEN; | 105 | event_type = INT_SWITCH_OPEN; |
106 | if (p_slot->pwr_save && p_slot->presence_save) { | 106 | if (p_slot->pwr_save && p_slot->presence_save) { |
107 | event_type = INT_POWER_FAULT; | 107 | event_type = INT_POWER_FAULT; |
@@ -111,7 +111,7 @@ u8 shpchp_handle_switch_change(u8 hp_slot, void *inst_id) | |||
111 | /* | 111 | /* |
112 | * Switch closed | 112 | * Switch closed |
113 | */ | 113 | */ |
114 | info("Latch close on Slot(%d)\n", ctrl->first_slot + hp_slot); | 114 | info("Latch close on Slot(%s)\n", p_slot->name); |
115 | event_type = INT_SWITCH_CLOSE; | 115 | event_type = INT_SWITCH_CLOSE; |
116 | } | 116 | } |
117 | 117 | ||
@@ -139,13 +139,13 @@ u8 shpchp_handle_presence_change(u8 hp_slot, void *inst_id) | |||
139 | /* | 139 | /* |
140 | * Card Present | 140 | * Card Present |
141 | */ | 141 | */ |
142 | info("Card present on Slot(%d)\n", ctrl->first_slot + hp_slot); | 142 | info("Card present on Slot(%s)\n", p_slot->name); |
143 | event_type = INT_PRESENCE_ON; | 143 | event_type = INT_PRESENCE_ON; |
144 | } else { | 144 | } else { |
145 | /* | 145 | /* |
146 | * Not Present | 146 | * Not Present |
147 | */ | 147 | */ |
148 | info("Card not present on Slot(%d)\n", ctrl->first_slot + hp_slot); | 148 | info("Card not present on Slot(%s)\n", p_slot->name); |
149 | event_type = INT_PRESENCE_OFF; | 149 | event_type = INT_PRESENCE_OFF; |
150 | } | 150 | } |
151 | 151 | ||
@@ -169,14 +169,14 @@ u8 shpchp_handle_power_fault(u8 hp_slot, void *inst_id) | |||
169 | /* | 169 | /* |
170 | * Power fault Cleared | 170 | * Power fault Cleared |
171 | */ | 171 | */ |
172 | info("Power fault cleared on Slot(%d)\n", ctrl->first_slot + hp_slot); | 172 | info("Power fault cleared on Slot(%s)\n", p_slot->name); |
173 | p_slot->status = 0x00; | 173 | p_slot->status = 0x00; |
174 | event_type = INT_POWER_FAULT_CLEAR; | 174 | event_type = INT_POWER_FAULT_CLEAR; |
175 | } else { | 175 | } else { |
176 | /* | 176 | /* |
177 | * Power fault | 177 | * Power fault |
178 | */ | 178 | */ |
179 | info("Power fault on Slot(%d)\n", ctrl->first_slot + hp_slot); | 179 | info("Power fault on Slot(%s)\n", p_slot->name); |
180 | event_type = INT_POWER_FAULT; | 180 | event_type = INT_POWER_FAULT; |
181 | /* set power fault status for this board */ | 181 | /* set power fault status for this board */ |
182 | p_slot->status = 0xFF; | 182 | p_slot->status = 0xFF; |
@@ -496,10 +496,10 @@ static void handle_button_press_event(struct slot *p_slot) | |||
496 | p_slot->hpc_ops->get_power_status(p_slot, &getstatus); | 496 | p_slot->hpc_ops->get_power_status(p_slot, &getstatus); |
497 | if (getstatus) { | 497 | if (getstatus) { |
498 | p_slot->state = BLINKINGOFF_STATE; | 498 | p_slot->state = BLINKINGOFF_STATE; |
499 | info(msg_button_off, p_slot->number); | 499 | info(msg_button_off, p_slot->name); |
500 | } else { | 500 | } else { |
501 | p_slot->state = BLINKINGON_STATE; | 501 | p_slot->state = BLINKINGON_STATE; |
502 | info(msg_button_on, p_slot->number); | 502 | info(msg_button_on, p_slot->name); |
503 | } | 503 | } |
504 | /* blink green LED and turn off amber */ | 504 | /* blink green LED and turn off amber */ |
505 | p_slot->hpc_ops->green_led_blink(p_slot); | 505 | p_slot->hpc_ops->green_led_blink(p_slot); |
@@ -522,7 +522,7 @@ static void handle_button_press_event(struct slot *p_slot) | |||
522 | else | 522 | else |
523 | p_slot->hpc_ops->green_led_off(p_slot); | 523 | p_slot->hpc_ops->green_led_off(p_slot); |
524 | p_slot->hpc_ops->set_attention_status(p_slot, 0); | 524 | p_slot->hpc_ops->set_attention_status(p_slot, 0); |
525 | info(msg_button_cancel, p_slot->number); | 525 | info(msg_button_cancel, p_slot->name); |
526 | p_slot->state = STATIC_STATE; | 526 | p_slot->state = STATIC_STATE; |
527 | break; | 527 | break; |
528 | case POWEROFF_STATE: | 528 | case POWEROFF_STATE: |
@@ -575,17 +575,17 @@ static int shpchp_enable_slot (struct slot *p_slot) | |||
575 | mutex_lock(&p_slot->ctrl->crit_sect); | 575 | mutex_lock(&p_slot->ctrl->crit_sect); |
576 | rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus); | 576 | rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus); |
577 | if (rc || !getstatus) { | 577 | if (rc || !getstatus) { |
578 | info("%s: no adapter on slot(%x)\n", __FUNCTION__, p_slot->number); | 578 | info("No adapter on slot(%s)\n", p_slot->name); |
579 | goto out; | 579 | goto out; |
580 | } | 580 | } |
581 | rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); | 581 | rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); |
582 | if (rc || getstatus) { | 582 | if (rc || getstatus) { |
583 | info("%s: latch open on slot(%x)\n", __FUNCTION__, p_slot->number); | 583 | info("Latch open on slot(%s)\n", p_slot->name); |
584 | goto out; | 584 | goto out; |
585 | } | 585 | } |
586 | rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus); | 586 | rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus); |
587 | if (rc || getstatus) { | 587 | if (rc || getstatus) { |
588 | info("%s: already enabled on slot(%x)\n", __FUNCTION__, p_slot->number); | 588 | info("Already enabled on slot(%s)\n", p_slot->name); |
589 | goto out; | 589 | goto out; |
590 | } | 590 | } |
591 | 591 | ||
@@ -634,17 +634,17 @@ static int shpchp_disable_slot (struct slot *p_slot) | |||
634 | 634 | ||
635 | rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus); | 635 | rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus); |
636 | if (rc || !getstatus) { | 636 | if (rc || !getstatus) { |
637 | info("%s: no adapter on slot(%x)\n", __FUNCTION__, p_slot->number); | 637 | info("No adapter on slot(%s)\n", p_slot->name); |
638 | goto out; | 638 | goto out; |
639 | } | 639 | } |
640 | rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); | 640 | rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); |
641 | if (rc || getstatus) { | 641 | if (rc || getstatus) { |
642 | info("%s: latch open on slot(%x)\n", __FUNCTION__, p_slot->number); | 642 | info("Latch open on slot(%s)\n", p_slot->name); |
643 | goto out; | 643 | goto out; |
644 | } | 644 | } |
645 | rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus); | 645 | rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus); |
646 | if (rc || !getstatus) { | 646 | if (rc || !getstatus) { |
647 | info("%s: already disabled slot(%x)\n", __FUNCTION__, p_slot->number); | 647 | info("Already disabled slot(%s)\n", p_slot->name); |
648 | goto out; | 648 | goto out; |
649 | } | 649 | } |
650 | 650 | ||