- /* Wait for exclusive access to hardware */
- down(&ctrl->crit_sect);
-
- /* turn off slot, turn on Amber LED, turn off Green LED */
- retval = p_slot->hpc_ops->power_off_slot(p_slot);
- /* In PCI Express, just power off slot */
- if (retval) {
- err("%s: Issue of Slot Power Off command failed\n", __FUNCTION__);
- return retval;
- }
- /* Wait for the command to complete */
- wait_for_ctrl_irq (ctrl);
-
- p_slot->hpc_ops->green_led_off(p_slot);
-
- /* Wait for the command to complete */
- wait_for_ctrl_irq (ctrl);
-
- /* turn on Amber LED */
- retval = p_slot->hpc_ops->set_attention_status(p_slot, 1);
- if (retval) {
- err("%s: Issue of Set Attention Led command failed\n", __FUNCTION__);
- return retval;
- }
- /* Wait for the command to complete */
- wait_for_ctrl_irq (ctrl);
-
- /* Done with exclusive hardware access */
- up(&ctrl->crit_sect);
-