 p_slot->status = 0; 
static int board_added(struct slot *p_slot){	u8 hp_slot;	int rc = 0;	struct controller *ctrl = p_slot->ctrl;	hp_slot = p_slot->device - ctrl->slot_device_offset;	dbg("%s: slot device, slot offset, hp slot = %d, %d ,%d\n",			__FUNCTION__, p_slot->device,			ctrl->slot_device_offset, hp_slot);	/* Wait for exclusive access to hardware */	down(&ctrl->crit_sect);	if (POWER_CTRL(ctrl->ctrlcap)) {		/* Power on slot */		rc = p_slot->hpc_ops->power_on_slot(p_slot);		if (rc) {			up(&ctrl->crit_sect);			return -1;		}		/* Wait for the command to complete */		wait_for_ctrl_irq (ctrl);	}		if (PWR_LED(ctrl->ctrlcap)) {		p_slot->hpc_ops->green_led_blink(p_slot);					/* Wait for the command to complete */		wait_for_ctrl_irq (ctrl);	}	/* Done with exclusive hardware access */	up(&ctrl->crit_sect);	/* Wait for ~1 second */	wait_for_ctrl_irq (ctrl);	/*  Check link training status */	rc = p_slot->hpc_ops->check_lnk_status(ctrl);  	if (rc) {		err("%s: Failed to check link status\n", __FUNCTION__);		set_slot_off(ctrl, p_slot);		return rc;	}	dbg("%s: slot status = %x\n", __FUNCTION__, p_slot->status);	/* Check for a power fault */	if (p_slot->status == 0xFF) {		/* power fault occurred, but it was benign */		rc = POWER_FAILURE;		p_slot->status = 0;		goto err_exit;	}	rc = pciehp_configure_device(p_slot);	if (rc) {		err("Cannot add device 0x%x:%x\n", p_slot->bus,				p_slot->device);		goto err_exit;	}	p_slot->status = 0;	/*	 * Some PCI Express root ports require fixup after hot-plug operation.	 */	if (pcie_mch_quirk)		pci_fixup_device(pci_fixup_final, ctrl->pci_dev);	if (PWR_LED(ctrl->ctrlcap)) {		/* Wait for exclusive access to hardware */  		down(&ctrl->crit_sect);  		p_slot->hpc_ops->green_led_on(p_slot);    		/* Wait for the command to complete */  		wait_for_ctrl_irq (ctrl);  	  		/* Done with exclusive hardware access */  		up(&ctrl->crit_sect);  	}	return 0;err_exit:	set_slot_off(ctrl, p_slot);	return -1;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/5a49f2036ad14092c11d09f186da86fd5ae49a05/pciehp_ctrl.c/clean/drivers/pci/hotplug/pciehp_ctrl.c