Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23216
b: refs/heads/master
c: 1305e91
h: refs/heads/master
v: v3
  • Loading branch information
Adrian Bunk authored and Greg Kroah-Hartman committed Mar 23, 2006
1 parent 3ac8a25 commit 5c4060d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 63 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0cccd0c20677e8a9da40018632f1b6c487ba2bd5
refs/heads/master: 1305e9184a3de84f78dca102b293d21007bb6c49
76 changes: 14 additions & 62 deletions trunk/drivers/pci/hotplug/cpqphp_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1282,9 +1282,7 @@ static u32 board_replaced(struct pci_func *func, struct controller *ctrl)
u8 hp_slot;
u8 temp_byte;
u8 adapter_speed;
u32 index;
u32 rc = 0;
u32 src = 8;

hp_slot = func->device - ctrl->slot_device_offset;

Expand Down Expand Up @@ -1368,76 +1366,30 @@ static u32 board_replaced(struct pci_func *func, struct controller *ctrl)

rc = cpqhp_configure_board(ctrl, func);

if (rc || src) {
/* If configuration fails, turn it off
* Get slot won't work for devices behind
* bridges, but in this case it will always be
* called for the "base" bus/dev/func of an
* adapter. */

mutex_lock(&ctrl->crit_sect);

amber_LED_on (ctrl, hp_slot);
green_LED_off (ctrl, hp_slot);
slot_disable (ctrl, hp_slot);

set_SOGO(ctrl);

/* Wait for SOBS to be unset */
wait_for_ctrl_irq (ctrl);

mutex_unlock(&ctrl->crit_sect);

if (rc)
return rc;
else
return 1;
}

func->status = 0;
func->switch_save = 0x10;

index = 1;
while (((func = cpqhp_slot_find(func->bus, func->device, index)) != NULL) && !rc) {
rc |= cpqhp_configure_board(ctrl, func);
index++;
}

if (rc) {
/* If configuration fails, turn it off
* Get slot won't work for devices behind
* bridges, but in this case it will always be
* called for the "base" bus/dev/func of an
* adapter. */

mutex_lock(&ctrl->crit_sect);

amber_LED_on (ctrl, hp_slot);
green_LED_off (ctrl, hp_slot);
slot_disable (ctrl, hp_slot);

set_SOGO(ctrl);

/* Wait for SOBS to be unset */
wait_for_ctrl_irq (ctrl);

mutex_unlock(&ctrl->crit_sect);

return rc;
}
/* Done configuring so turn LED on full time */
/* If configuration fails, turn it off
* Get slot won't work for devices behind
* bridges, but in this case it will always be
* called for the "base" bus/dev/func of an
* adapter. */

mutex_lock(&ctrl->crit_sect);

green_LED_on (ctrl, hp_slot);
amber_LED_on (ctrl, hp_slot);
green_LED_off (ctrl, hp_slot);
slot_disable (ctrl, hp_slot);

set_SOGO(ctrl);

/* Wait for SOBS to be unset */
wait_for_ctrl_irq (ctrl);

mutex_unlock(&ctrl->crit_sect);
rc = 0;

if (rc)
return rc;
else
return 1;

} else {
/* Something is wrong
Expand Down

0 comments on commit 5c4060d

Please sign in to comment.