summaryrefslogtreecommitdiffstats
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.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c
index d6c5eb2..fead63c 100644
--- a/drivers/pci/hotplug/pciehp_ctrl.c
+++ b/drivers/pci/hotplug/pciehp_ctrl.c
@@ -61,7 +61,7 @@ u8 pciehp_handle_attention_button(struct slot *p_slot)
struct controller *ctrl = p_slot->ctrl;
/* Attention Button Change */
- ctrl_dbg(ctrl, "Attention button interrupt received.\n");
+ ctrl_dbg(ctrl, "Attention button interrupt received\n");
/*
* Button pressed - See if need to TAKE ACTION!!!
@@ -81,7 +81,7 @@ u8 pciehp_handle_switch_change(struct slot *p_slot)
struct controller *ctrl = p_slot->ctrl;
/* Switch Change */
- ctrl_dbg(ctrl, "Switch interrupt received.\n");
+ ctrl_dbg(ctrl, "Switch interrupt received\n");
p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
if (getstatus) {
@@ -110,7 +110,7 @@ u8 pciehp_handle_presence_change(struct slot *p_slot)
struct controller *ctrl = p_slot->ctrl;
/* Presence Change */
- ctrl_dbg(ctrl, "Presence/Notify input change.\n");
+ ctrl_dbg(ctrl, "Presence/Notify input change\n");
/* Switch is open, assume a presence change
* Save the presence state
@@ -142,7 +142,7 @@ u8 pciehp_handle_power_fault(struct slot *p_slot)
struct controller *ctrl = p_slot->ctrl;
/* power fault */
- ctrl_dbg(ctrl, "Power fault interrupt received.\n");
+ ctrl_dbg(ctrl, "Power fault interrupt received\n");
if ( !(p_slot->hpc_ops->query_power_fault(p_slot))) {
/*
@@ -157,7 +157,7 @@ u8 pciehp_handle_power_fault(struct slot *p_slot)
*/
ctrl_info(ctrl, "Power fault on Slot(%s)\n", slot_name(p_slot));
event_type = INT_POWER_FAULT;
- ctrl_info(ctrl, "power fault bit %x set\n", 0);
+ ctrl_info(ctrl, "Power fault bit %x set\n", 0);
}
queue_interrupt_event(p_slot, event_type);
@@ -175,8 +175,7 @@ static void set_slot_off(struct controller *ctrl, struct slot * pslot)
if (POWER_CTRL(ctrl)) {
if (pslot->hpc_ops->power_off_slot(pslot)) {
ctrl_err(ctrl,
- "%s: Issue of Slot Power Off command failed\n",
- __func__);
+ "Issue of Slot Power Off command failed\n");
return;
}
}
@@ -193,8 +192,8 @@ static void set_slot_off(struct controller *ctrl, struct slot * pslot)
if (ATTN_LED(ctrl)) {
if (pslot->hpc_ops->set_attention_status(pslot, 1)) {
- ctrl_err(ctrl, "%s: Issue of Set Attention "
- "Led command failed\n", __func__);
+ ctrl_err(ctrl,
+ "Issue of Set Attention Led command failed\n");
return;
}
}
@@ -211,8 +210,9 @@ static int board_added(struct slot *p_slot)
{
int retval = 0;
struct controller *ctrl = p_slot->ctrl;
+ struct pci_bus *parent = ctrl->pci_dev->subordinate;
- ctrl_dbg(ctrl, "%s: slot device, slot offset, hp slot = %d, %d ,%d\n",
+ ctrl_dbg(ctrl, "%s: slot device, slot offset, hp slot = %d, %d, %d\n",
__func__, p_slot->device, ctrl->slot_device_offset,
p_slot->hp_slot);
@@ -229,22 +229,22 @@ static int board_added(struct slot *p_slot)
/* Check link training status */
retval = p_slot->hpc_ops->check_lnk_status(ctrl);
if (retval) {
- ctrl_err(ctrl, "%s: Failed to check link status\n", __func__);
+ ctrl_err(ctrl, "Failed to check link status\n");
set_slot_off(ctrl, p_slot);
return retval;
}
/* Check for a power fault */
if (p_slot->hpc_ops->query_power_fault(p_slot)) {
- ctrl_dbg(ctrl, "%s: power fault detected\n", __func__);
+ ctrl_dbg(ctrl, "Power fault detected\n");
retval = POWER_FAILURE;
goto err_exit;
}
retval = pciehp_configure_device(p_slot);
if (retval) {
- ctrl_err(ctrl, "Cannot add device 0x%x:%x\n",
- p_slot->bus, p_slot->device);
+ ctrl_err(ctrl, "Cannot add device at %04x:%02x:%02x\n",
+ pci_domain_nr(parent), p_slot->bus, p_slot->device);
goto err_exit;
}
@@ -276,14 +276,14 @@ static int remove_board(struct slot *p_slot)
if (retval)
return retval;
- ctrl_dbg(ctrl, "In %s, hp_slot = %d\n", __func__, p_slot->hp_slot);
+ ctrl_dbg(ctrl, "%s: hp_slot = %d\n", __func__, p_slot->hp_slot);
if (POWER_CTRL(ctrl)) {
/* power off slot */
retval = p_slot->hpc_ops->power_off_slot(p_slot);
if (retval) {
- ctrl_err(ctrl, "%s: Issue of Slot Disable command "
- "failed\n", __func__);
+ ctrl_err(ctrl,
+ "Issue of Slot Disable command failed\n");
return retval;
}
}
@@ -324,8 +324,10 @@ static void pciehp_power_thread(struct work_struct *work)
switch (p_slot->state) {
case POWEROFF_STATE:
mutex_unlock(&p_slot->lock);
- ctrl_dbg(p_slot->ctrl, "%s: disabling bus:device(%x:%x)\n",
- __func__, p_slot->bus, p_slot->device);
+ ctrl_dbg(p_slot->ctrl,
+ "Disabling domain:bus:device=%04x:%02x:%02x\n",
+ pci_domain_nr(p_slot->ctrl->pci_dev->subordinate),
+ p_slot->bus, p_slot->device);
pciehp_disable_slot(p_slot);
mutex_lock(&p_slot->lock);
p_slot->state = STATIC_STATE;
@@ -433,7 +435,6 @@ static void handle_button_press_event(struct slot *p_slot)
* expires to cancel hot-add or hot-remove
*/
ctrl_info(ctrl, "Button cancel on Slot(%s)\n", slot_name(p_slot));
- ctrl_dbg(ctrl, "%s: button cancel\n", __func__);
cancel_delayed_work(&p_slot->work);
if (p_slot->state == BLINKINGOFF_STATE) {
if (PWR_LED(ctrl))
@@ -537,16 +538,15 @@ int pciehp_enable_slot(struct slot *p_slot)
rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus);
if (rc || !getstatus) {
- ctrl_info(ctrl, "%s: no adapter on slot(%s)\n",
- __func__, slot_name(p_slot));
+ ctrl_info(ctrl, "No adapter on slot(%s)\n", slot_name(p_slot));
mutex_unlock(&p_slot->ctrl->crit_sect);
return -ENODEV;
}
if (MRL_SENS(p_slot->ctrl)) {
rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
if (rc || getstatus) {
- ctrl_info(ctrl, "%s: latch open on slot(%s)\n",
- __func__, slot_name(p_slot));
+ ctrl_info(ctrl, "Latch open on slot(%s)\n",
+ slot_name(p_slot));
mutex_unlock(&p_slot->ctrl->crit_sect);
return -ENODEV;
}
@@ -555,8 +555,8 @@ int pciehp_enable_slot(struct slot *p_slot)
if (POWER_CTRL(p_slot->ctrl)) {
rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
if (rc || getstatus) {
- ctrl_info(ctrl, "%s: already enabled on slot(%s)\n",
- __func__, slot_name(p_slot));
+ ctrl_info(ctrl, "Already enabled on slot(%s)\n",
+ slot_name(p_slot));
mutex_unlock(&p_slot->ctrl->crit_sect);
return -EINVAL;
}
@@ -591,8 +591,8 @@ int pciehp_disable_slot(struct slot *p_slot)
if (!HP_SUPR_RM(p_slot->ctrl)) {
ret = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus);
if (ret || !getstatus) {
- ctrl_info(ctrl, "%s: no adapter on slot(%s)\n",
- __func__, slot_name(p_slot));
+ ctrl_info(ctrl, "No adapter on slot(%s)\n",
+ slot_name(p_slot));
mutex_unlock(&p_slot->ctrl->crit_sect);
return -ENODEV;
}
@@ -601,8 +601,8 @@ int pciehp_disable_slot(struct slot *p_slot)
if (MRL_SENS(p_slot->ctrl)) {
ret = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
if (ret || getstatus) {
- ctrl_info(ctrl, "%s: latch open on slot(%s)\n",
- __func__, slot_name(p_slot));
+ ctrl_info(ctrl, "Latch open on slot(%s)\n",
+ slot_name(p_slot));
mutex_unlock(&p_slot->ctrl->crit_sect);
return -ENODEV;
}
@@ -611,8 +611,8 @@ int pciehp_disable_slot(struct slot *p_slot)
if (POWER_CTRL(p_slot->ctrl)) {
ret = p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
if (ret || !getstatus) {
- ctrl_info(ctrl, "%s: already disabled slot(%s)\n",
- __func__, slot_name(p_slot));
+ ctrl_info(ctrl, "Already disabled on slot(%s)\n",
+ slot_name(p_slot));
mutex_unlock(&p_slot->ctrl->crit_sect);
return -EINVAL;
}
OpenPOWER on IntegriCloud