dbg("%s: Slot %x with intr, temp_dword = %x\n", __FUNCTION__, hp_slot, temp_dword); 
dbg("%s: Slot %x with intr, slot register = %x\n", __FUNCTION__, hp_slot, temp_dword); 
static irqreturn_t shpc_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;	u8 temp_byte;	u32 temp_dword, intr_loc, intr_loc2;	int hp_slot;	if (!dev_id)		return IRQ_NONE;	if (!shpchp_poll_mode) { 		ctrl = (struct controller *)dev_id;		php_ctlr = ctrl->hpc_ctlr_handle;	} else { 		php_ctlr = (struct php_ctlr_state_s *) dev_id;		ctrl = (struct controller *)php_ctlr->callback_instance_id;	}	if (!ctrl)		return IRQ_NONE;		if (!php_ctlr || !php_ctlr->creg)		return IRQ_NONE;	/* Check to see if it was our interrupt */	intr_loc = readl(php_ctlr->creg + INTR_LOC);  	if (!intr_loc)		return IRQ_NONE;	dbg("%s: shpc_isr proceeds\n", __FUNCTION__);	dbg("%s: intr_loc = %x\n",__FUNCTION__, intr_loc); 	if(!shpchp_poll_mode) {		/* Mask Global Interrupt Mask - see implementation note on p. 139 */		/* of SHPC spec rev 1.0*/		temp_dword = readl(php_ctlr->creg + SERR_INTR_ENABLE);		dbg("%s: Before masking global interrupt, temp_dword = %x\n",			__FUNCTION__, temp_dword); 		temp_dword |= 0x00000001;		dbg("%s: After masking global interrupt, temp_dword = %x\n",			__FUNCTION__, temp_dword); 		writel(temp_dword, php_ctlr->creg + SERR_INTR_ENABLE);		intr_loc2 = readl(php_ctlr->creg + INTR_LOC);  		dbg("%s: intr_loc2 = %x\n",__FUNCTION__, intr_loc2); 	}	if (intr_loc & 0x0001) {		/* 		 * Command Complete Interrupt Pending 		 * RO only - clear by writing 0 to the Command Completion		 * Detect bit in Controller SERR-INT register		 */		temp_dword = readl(php_ctlr->creg + SERR_INTR_ENABLE);		dbg("%s: Before clearing CCIP, temp_dword = %x\n",			__FUNCTION__, temp_dword); 		temp_dword &= 0xfffeffff;		dbg("%s: After clearing CCIP, temp_dword = %x\n",			__FUNCTION__, temp_dword); 		writel(temp_dword, php_ctlr->creg + SERR_INTR_ENABLE);		wake_up_interruptible(&ctrl->queue);	}	if ((intr_loc = (intr_loc >> 1)) == 0) {		/* Unmask Global Interrupt Mask */		temp_dword = readl(php_ctlr->creg + SERR_INTR_ENABLE);		dbg("%s: 1-Before unmasking global interrupt, temp_dword = %x\n",			__FUNCTION__, temp_dword); 		temp_dword &= 0xfffffffe;		dbg("%s: 1-After unmasking global interrupt, temp_dword = %x\n",			__FUNCTION__, temp_dword); 		writel(temp_dword, php_ctlr->creg + SERR_INTR_ENABLE);		return IRQ_NONE;	}	for (hp_slot = 0; hp_slot < ctrl->num_slots; hp_slot++) { 	/* To find out which slot has interrupt pending */		if ((intr_loc >> hp_slot) & 0x01) {			temp_dword = readl(php_ctlr->creg + SLOT1 + (4*hp_slot));			dbg("%s: Slot %x with intr, temp_dword = %x\n",				__FUNCTION__, hp_slot, temp_dword); 			temp_byte = (temp_dword >> 16) & 0xFF;			dbg("%s: Slot with intr, temp_byte = %x\n",				__FUNCTION__, temp_byte); 			if ((php_ctlr->switch_change_callback) && (temp_byte & 0x08))				schedule_flag += php_ctlr->switch_change_callback(					hp_slot, php_ctlr->callback_instance_id);			if ((php_ctlr->attention_button_callback) && (temp_byte & 0x04))				schedule_flag += php_ctlr->attention_button_callback(					hp_slot, php_ctlr->callback_instance_id);			if ((php_ctlr->presence_change_callback) && (temp_byte & 0x01))				schedule_flag += php_ctlr->presence_change_callback(					hp_slot , php_ctlr->callback_instance_id);			if ((php_ctlr->power_fault_callback) && (temp_byte & 0x12))				schedule_flag += php_ctlr->power_fault_callback(					hp_slot, php_ctlr->callback_instance_id);						/* Clear all slot events */			temp_dword = 0xe01f3fff;			dbg("%s: Clearing slot events, temp_dword = %x\n",				__FUNCTION__, temp_dword); 			writel(temp_dword, php_ctlr->creg + SLOT1 + (4*hp_slot));			intr_loc2 = readl(php_ctlr->creg + INTR_LOC);  			dbg("%s: intr_loc2 = %x\n",__FUNCTION__, intr_loc2); 		}	}	if (!shpchp_poll_mode) {		/* Unmask Global Interrupt Mask */		temp_dword = readl(php_ctlr->creg + SERR_INTR_ENABLE);		dbg("%s: 2-Before unmasking global interrupt, temp_dword = %x\n",			__FUNCTION__, temp_dword); 		temp_dword &= 0xfffffffe;		dbg("%s: 2-After unmasking global interrupt, temp_dword = %x\n",			__FUNCTION__, temp_dword); 		writel(temp_dword, php_ctlr->creg + SERR_INTR_ENABLE);	}		return IRQ_HANDLED;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/7c8942f993dc069db0e0327a343bbec8a6e96074/shpchp_hpc.c/clean/drivers/pci/hotplug/shpchp_hpc.c