dbg("%s: hp_register_write_word SLOT_STATUS with value %x\n", __FUNCTION__, temp_word); 
static irqreturn_t pcie_isr(int IRQ, void *dev_id, struct pt_regs *regs){	struct controller *ctrl = NULL;	struct php_ctlr_state_s *php_ctlr;	u8 schedule_flag = 0;	u16 slot_status, intr_detect, intr_loc;	u16 temp_word;	int hp_slot = 0;	/* only 1 slot per PCI Express port */	int rc = 0;	if (!dev_id)		return IRQ_NONE;	if (!pciehp_poll_mode) { 		ctrl = dev_id;		php_ctlr = ctrl->hpc_ctlr_handle;	} else {		php_ctlr = dev_id;		ctrl = (struct controller *)php_ctlr->callback_instance_id;	}	if (!ctrl) {		dbg("%s: dev_id %p ctlr == NULL\n", __FUNCTION__, (void*) dev_id);		return IRQ_NONE;	}		if (!php_ctlr) {		dbg("%s: php_ctlr == NULL\n", __FUNCTION__);		return IRQ_NONE;	}	rc = hp_register_read_word(php_ctlr->pci_dev, SLOT_STATUS(ctrl->cap_base), slot_status);	if (rc) {		err("%s : hp_register_read_word SLOT_STATUS failed\n", __FUNCTION__);		return IRQ_NONE;	}	intr_detect = ( ATTN_BUTTN_PRESSED | PWR_FAULT_DETECTED | MRL_SENS_CHANGED |					PRSN_DETECT_CHANGED | CMD_COMPLETED );	intr_loc = slot_status & intr_detect;	/* Check to see if it was our interrupt */	if ( !intr_loc )		return IRQ_NONE;	dbg("%s: intr_loc %x\n", __FUNCTION__, intr_loc);	/* Mask Hot-plug Interrupt Enable */	if (!pciehp_poll_mode) {		rc = hp_register_read_word(php_ctlr->pci_dev, SLOT_CTRL(ctrl->cap_base), temp_word);		if (rc) {			err("%s : hp_register_read_word SLOT_CTRL failed\n", __FUNCTION__);			return IRQ_NONE;		}		dbg("%s: Set Mask Hot-plug Interrupt Enable\n", __FUNCTION__);		dbg("%s: hp_register_read_word SLOT_CTRL with value %x\n", __FUNCTION__, temp_word);		temp_word = (temp_word & ~HP_INTR_ENABLE & ~CMD_CMPL_INTR_ENABLE) | 0x00;		rc = hp_register_write_word(php_ctlr->pci_dev, SLOT_CTRL(ctrl->cap_base), temp_word);		if (rc) {			err("%s : hp_register_write_word SLOT_CTRL failed\n", __FUNCTION__);			return IRQ_NONE;		}		dbg("%s: hp_register_write_word SLOT_CTRL with value %x\n", __FUNCTION__, temp_word);				rc = hp_register_read_word(php_ctlr->pci_dev, SLOT_STATUS(ctrl->cap_base), slot_status);		if (rc) {			err("%s : hp_register_read_word SLOT_STATUS failed\n", __FUNCTION__);			return IRQ_NONE;		}		dbg("%s: hp_register_read_word SLOT_STATUS with value %x\n", __FUNCTION__, slot_status); 				/* Clear command complete interrupt caused by this write */		temp_word = 0x1f;		rc = hp_register_write_word(php_ctlr->pci_dev, SLOT_STATUS(ctrl->cap_base), temp_word);		if (rc) {			err("%s : hp_register_write_word SLOT_STATUS failed\n", __FUNCTION__);			return IRQ_NONE;		}		dbg("%s: hp_register_write_word SLOT_STATUS with value %x\n", __FUNCTION__, temp_word);	}		if (intr_loc & CMD_COMPLETED) {		/* 		 * Command Complete Interrupt Pending 		 */		dbg("%s: In Command Complete Interrupt Pending\n", __FUNCTION__);		wake_up_interruptible(&ctrl->queue);	}	if ((php_ctlr->switch_change_callback) && (intr_loc & MRL_SENS_CHANGED))		schedule_flag += php_ctlr->switch_change_callback(			hp_slot, php_ctlr->callback_instance_id);	if ((php_ctlr->attention_button_callback) && (intr_loc & ATTN_BUTTN_PRESSED))		schedule_flag += php_ctlr->attention_button_callback(			hp_slot, php_ctlr->callback_instance_id);	if ((php_ctlr->presence_change_callback) && (intr_loc & PRSN_DETECT_CHANGED))		schedule_flag += php_ctlr->presence_change_callback(			hp_slot , php_ctlr->callback_instance_id);	if ((php_ctlr->power_fault_callback) && (intr_loc & PWR_FAULT_DETECTED))		schedule_flag += php_ctlr->power_fault_callback(			hp_slot, php_ctlr->callback_instance_id);	/* Clear all events after serving them */	temp_word = 0x1F;	rc = hp_register_write_word(php_ctlr->pci_dev, SLOT_STATUS(ctrl->cap_base), temp_word);	if (rc) {		err("%s : hp_register_write_word SLOT_STATUS failed\n", __FUNCTION__);		return IRQ_NONE;	}	/* Unmask Hot-plug Interrupt Enable */	if (!pciehp_poll_mode) {		rc = hp_register_read_word(php_ctlr->pci_dev, SLOT_CTRL(ctrl->cap_base), temp_word);		if (rc) {			err("%s : hp_register_read_word SLOT_CTRL failed\n", __FUNCTION__);			return IRQ_NONE;		}		dbg("%s: Unmask Hot-plug Interrupt Enable\n", __FUNCTION__);		dbg("%s: hp_register_read_word SLOT_CTRL with value %x\n", __FUNCTION__, temp_word);		temp_word = (temp_word & ~HP_INTR_ENABLE) | HP_INTR_ENABLE;		rc = hp_register_write_word(php_ctlr->pci_dev, SLOT_CTRL(ctrl->cap_base), temp_word);		if (rc) {			err("%s : hp_register_write_word SLOT_CTRL failed\n", __FUNCTION__);			return IRQ_NONE;		}		dbg("%s: hp_register_write_word SLOT_CTRL with value %x\n", __FUNCTION__, temp_word); 				rc = hp_register_read_word(php_ctlr->pci_dev, SLOT_STATUS(ctrl->cap_base), slot_status);		if (rc) {			err("%s : hp_register_read_word SLOT_STATUS failed\n", __FUNCTION__);			return IRQ_NONE;		}		dbg("%s: hp_register_read_word SLOT_STATUS with value %x\n", __FUNCTION__, slot_status); 				/* Clear command complete interrupt caused by this write */		temp_word = 0x1F;		rc = hp_register_write_word(php_ctlr->pci_dev, SLOT_STATUS(ctrl->cap_base), temp_word);		if (rc) {			err("%s : hp_register_write_word SLOT_STATUS failed\n", __FUNCTION__);			return IRQ_NONE;		}		dbg("%s: hp_register_write_word SLOT_STATUS with value %x\n", __FUNCTION__, temp_word); 	}		return IRQ_HANDLED;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/1a9ed1bfe2fb17cc30227a12a3c1212128bb78b6/pciehp_hpc.c/clean/drivers/pci/hotplug/pciehp_hpc.c