print_msg ((unsigned char *) hostdata->msg_buf); 
scsi_print_msg ((unsigned char *) hostdata->msg_buf); 
NCR53c7x0_dstat_sir_intr (struct Scsi_Host *host, struct     NCR53c7x0_cmd *cmd) {    NCR53c7x0_local_declare();    int print;    Scsi_Cmnd *c = cmd ? cmd->cmd : NULL;    struct NCR53c7x0_hostdata *hostdata = (struct NCR53c7x0_hostdata *)	host->hostdata[0];		    u32 dsps,*dsp;	/* Argument of the INT instruction */    NCR53c7x0_local_setup(host);    dsps = NCR53c7x0_read32(DSPS_REG);    dsp = (u32 *) bus_to_virt(NCR53c7x0_read32(DSP_REG));    /* RGH 150597:  Frig.  Commands which fail with Check Condition are     * Flagged as successful - hack dsps to indicate check condition */#if 0    /* RGH 200597:  Need to disable for BVME6000, as it gets Check Conditions     * and then dies.  Seems to handle Check Condition at startup, but     * not mid kernel build. */    if (dsps == A_int_norm_emulateintfly && cmd && cmd->result == 2)        dsps = A_int_err_check_condition;#endif    if (hostdata->options & OPTION_DEBUG_INTR) 	printk ("scsi%d : DSPS = 0x%x\n", host->host_no, dsps);    switch (dsps) {    case A_int_msg_1:	print = 1;	switch (hostdata->msg_buf[0]) {	/* 	 * Unless we've initiated synchronous negotiation, I don't	 * think that this should happen.	 */	case MESSAGE_REJECT:	    hostdata->dsp = hostdata->script + hostdata->E_accept_message /		sizeof(u32);	    hostdata->dsp_changed = 1;	    if (cmd && (cmd->flags & CMD_FLAG_SDTR)) {		printk ("scsi%d : target %d rejected SDTR\n", host->host_no, 		    c->device->id);		cmd->flags &= ~CMD_FLAG_SDTR;		asynchronous (host, c->device->id);		print = 0;	    } 	    break;	case INITIATE_RECOVERY:	    printk ("scsi%d : extended contingent allegiance not supported yet, rejecting\n",		host->host_no);	    /* Fall through to default */	    hostdata->dsp = hostdata->script + hostdata->E_reject_message /		sizeof(u32);	    hostdata->dsp_changed = 1;	    break;	default:	    printk ("scsi%d : unsupported message, rejecting\n",		host->host_no);	    hostdata->dsp = hostdata->script + hostdata->E_reject_message /		sizeof(u32);	    hostdata->dsp_changed = 1;	}	if (print) {	    printk ("scsi%d : received message", host->host_no);	    if (c) 	    	printk (" from target %d lun %d ", c->device->id, c->device->lun);	    print_msg ((unsigned char *) hostdata->msg_buf);	    printk("\n");	}		return SPECIFIC_INT_NOTHING;    case A_int_msg_sdtr:/* * At this point, hostdata->msg_buf contains * 0 EXTENDED MESSAGE * 1 length  * 2 SDTR * 3 period * 4ns * 4 offset */	if (cmd) {	    char buf[80];	    sprintf (buf, "scsi%d : target %d %s ", host->host_no, c->device->id,		(cmd->flags & CMD_FLAG_SDTR) ? "accepting" : "requesting");	    print_synchronous (buf, (unsigned char *) hostdata->msg_buf);	/* 	 * Initiator initiated, won't happen unless synchronous 	 * 	transfers are enabled.  If we get a SDTR message in	 * 	response to our SDTR, we should program our parameters	 * 	such that 	 *		offset <= requested offset	 *		period >= requested period		 	   	 */	    if (cmd->flags & CMD_FLAG_SDTR) {		cmd->flags &= ~CMD_FLAG_SDTR; 		if (hostdata->msg_buf[4]) 		    synchronous (host, c->device->id, (unsigned char *) 		    	hostdata->msg_buf);		else 		    asynchronous (host, c->device->id);		hostdata->dsp = hostdata->script + hostdata->E_accept_message /		    sizeof(u32);		hostdata->dsp_changed = 1;		return SPECIFIC_INT_NOTHING;	    } else {		if (hostdata->options & OPTION_SYNCHRONOUS)  {		    cmd->flags |= CMD_FLAG_DID_SDTR;		    synchronous (host, c->device->id, (unsigned char *) 			hostdata->msg_buf);		} else {		    hostdata->msg_buf[4] = 0;		/* 0 offset = async */		    asynchronous (host, c->device->id);		}		patch_dsa_32 (cmd->dsa, dsa_msgout_other, 0, 5);		patch_dsa_32 (cmd->dsa, dsa_msgout_other, 1, (u32) 		    virt_to_bus ((void *)&hostdata->msg_buf));		hostdata->dsp = hostdata->script + 		    hostdata->E_respond_message / sizeof(u32);		hostdata->dsp_changed = 1;	    }	    return SPECIFIC_INT_NOTHING;	}	/* Fall through to abort if we couldn't find a cmd, and 	   therefore a dsa structure to twiddle */    case A_int_msg_wdtr:	hostdata->dsp = hostdata->script + hostdata->E_reject_message /	    sizeof(u32);	hostdata->dsp_changed = 1;	return SPECIFIC_INT_NOTHING;    case A_int_err_unexpected_phase:	if (hostdata->options & OPTION_DEBUG_INTR) 	    printk ("scsi%d : unexpected phase\n", host->host_no);	return SPECIFIC_INT_ABORT;    case A_int_err_selected:	if ((hostdata->chip / 100) == 8)	    printk ("scsi%d : selected by target %d\n", host->host_no,	        (int) NCR53c7x0_read8(SDID_REG_800) &7);	else            printk ("scsi%d : selected by target LCRC=0x%02x\n", host->host_no,                (int) NCR53c7x0_read8(LCRC_REG_10));	hostdata->dsp = hostdata->script + hostdata->E_target_abort /     	    sizeof(u32);	hostdata->dsp_changed = 1;	return SPECIFIC_INT_NOTHING;    case A_int_err_unexpected_reselect:	if ((hostdata->chip / 100) == 8)	    printk ("scsi%d : unexpected reselect by target %d lun %d\n", 	        host->host_no, (int) NCR53c7x0_read8(SDID_REG_800) & 7,	        hostdata->reselected_identify & 7);	else            printk ("scsi%d : unexpected reselect LCRC=0x%02x\n", host->host_no,                (int) NCR53c7x0_read8(LCRC_REG_10));	hostdata->dsp = hostdata->script + hostdata->E_initiator_abort /    	    sizeof(u32);	hostdata->dsp_changed = 1;	return SPECIFIC_INT_NOTHING;/* * Since contingent allegiance conditions are cleared by the next  * command issued to a target, we must issue a REQUEST SENSE  * command after receiving a CHECK CONDITION status, before * another command is issued. *  * Since this NCR53c7x0_cmd will be freed after use, we don't  * care if we step on the various fields, so modify a few things. */    case A_int_err_check_condition: #if 0	if (hostdata->options & OPTION_DEBUG_INTR) #endif	    printk ("scsi%d : CHECK CONDITION\n", host->host_no);	if (!c) {	    printk("scsi%d : CHECK CONDITION with no SCSI command\n",		host->host_no);	    return SPECIFIC_INT_PANIC;	}	/* 	 * FIXME : this uses the normal one-byte selection message.	 * 	We may want to renegotiate for synchronous & WIDE transfers	 * 	since these could be the crux of our problem.	 *	 hostdata->NOP_insn* FIXME : once SCSI-II tagged queuing is implemented, we'll	 * 	have to set this up so that the rest of the DSA	 *	agrees with this being an untagged queue'd command.	 */    	patch_dsa_32 (cmd->dsa, dsa_msgout, 0, 1);    	/*     	 * Modify the table indirect for COMMAND OUT phase, since     	 * Request Sense is a six byte command.    	 */    	patch_dsa_32 (cmd->dsa, dsa_cmdout, 0, 6);        /*         * The CDB is now mirrored in our local non-cached         * structure, but keep the old structure up to date as well,         * just in case anyone looks at it.         */	/*	 * XXX Need to worry about data buffer alignment/cache state	 * XXX here, but currently never get A_int_err_check_condition,	 * XXX so ignore problem for now.         */	cmd->cmnd[0] = c->cmnd[0] = REQUEST_SENSE;	cmd->cmnd[0] = c->cmnd[1] &= 0xe0;	/* Zero all but LUN */	cmd->cmnd[0] = c->cmnd[2] = 0;	cmd->cmnd[0] = c->cmnd[3] = 0;	cmd->cmnd[0] = c->cmnd[4] = sizeof(c->sense_buffer);	cmd->cmnd[0] = c->cmnd[5] = 0; 	/*	 * Disable dataout phase, and program datain to transfer to the 	 * sense buffer, and add a jump to other_transfer after the     	 * command so overflow/underrun conditions are detected.	 */    	patch_dsa_32 (cmd->dsa, dsa_dataout, 0, 	    virt_to_bus(hostdata->script) + hostdata->E_other_transfer);    	patch_dsa_32 (cmd->dsa, dsa_datain, 0, 	    virt_to_bus(cmd->data_transfer_start));    	cmd->data_transfer_start[0] = (((DCMD_TYPE_BMI | DCMD_BMI_OP_MOVE_I |     	    DCMD_BMI_IO)) << 24) | sizeof(c->sense_buffer);    	cmd->data_transfer_start[1] = (u32) virt_to_bus(c->sense_buffer);	cmd->data_transfer_start[2] = ((DCMD_TYPE_TCI | DCMD_TCI_OP_JUMP)     	    << 24) | DBC_TCI_TRUE;	cmd->data_transfer_start[3] = (u32) virt_to_bus(hostdata->script) + 	    hostdata->E_other_transfer;    	/*    	 * Currently, this command is flagged as completed, ie     	 * it has valid status and message data.  Reflag it as    	 * incomplete.  Q - need to do something so that original	 * status, etc are used.    	 */	cmd->result = cmd->cmd->result = 0xffff;			/* 	 * Restart command as a REQUEST SENSE.	 */	hostdata->dsp = (u32 *) hostdata->script + hostdata->E_select /	    sizeof(u32);	hostdata->dsp_changed = 1;	return SPECIFIC_INT_NOTHING;    case A_int_debug_break:	return SPECIFIC_INT_BREAK;    case A_int_norm_aborted:	hostdata->dsp = (u32 *) hostdata->schedule;	hostdata->dsp_changed = 1;	if (cmd)	    abnormal_finished (cmd, DID_ERROR << 16);	return SPECIFIC_INT_NOTHING;    case A_int_norm_emulateintfly:	NCR53c7x0_intfly(host);	return SPECIFIC_INT_NOTHING;    case A_int_test_1:    case A_int_test_2:	hostdata->idle = 1;	hostdata->test_completed = (dsps - A_int_test_1) / 0x00010000 + 1;	if (hostdata->options & OPTION_DEBUG_INTR)	    printk("scsi%d : test%d complete\n", host->host_no,		hostdata->test_completed);	return SPECIFIC_INT_NOTHING;#ifdef A_int_debug_reselected_ok    case A_int_debug_reselected_ok:	if (hostdata->options & (OPTION_DEBUG_SCRIPT|OPTION_DEBUG_INTR|    	    	OPTION_DEBUG_DISCONNECT)) {	    /* 	     * Note - this dsa is not based on location relative to 	     * the command structure, but to location relative to the 	     * DSA register 	     */		    u32 *dsa;	    dsa = (u32 *) bus_to_virt (NCR53c7x0_read32(DSA_REG));	    printk("scsi%d : reselected_ok (DSA = 0x%x (virt 0x%p)\n", 		host->host_no, NCR53c7x0_read32(DSA_REG), dsa);	    printk("scsi%d : resume address is 0x%x (virt 0x%p)\n",		    host->host_no, cmd->saved_data_pointer,		    bus_to_virt(cmd->saved_data_pointer));	    print_insn (host, hostdata->script + Ent_reselected_ok /     	    	    sizeof(u32), "", 1);	    if ((hostdata->chip / 100) == 8)    	        printk ("scsi%d : sxfer=0x%x, scntl3=0x%x\n",		    host->host_no, NCR53c7x0_read8(SXFER_REG),		    NCR53c7x0_read8(SCNTL3_REG_800));	    else    	        printk ("scsi%d : sxfer=0x%x, cannot read SBCL\n",		    host->host_no, NCR53c7x0_read8(SXFER_REG));	    if (c) {		print_insn (host, (u32 *) 		    hostdata->sync[c->device->id].script, "", 1);		print_insn (host, (u32 *) 		    hostdata->sync[c->device->id].script + 2, "", 1);	    }	}    	return SPECIFIC_INT_RESTART;#endif#ifdef A_int_debug_reselect_check    case A_int_debug_reselect_check:	if (hostdata->options & (OPTION_DEBUG_SCRIPT|OPTION_DEBUG_INTR)) {	    u32 *dsa;#if 0	    u32 *code;#endif	    /* 	     * Note - this dsa is not based on location relative to 	     * the command structure, but to location relative to the 	     * DSA register 	     */		    dsa = bus_to_virt (NCR53c7x0_read32(DSA_REG));	    printk("scsi%d : reselected_check_next (DSA = 0x%lx (virt 0x%p))\n",		host->host_no, virt_to_bus(dsa), dsa);	    if (dsa) {		printk("scsi%d : resume address is 0x%x (virt 0x%p)\n",		    host->host_no, cmd->saved_data_pointer,		    bus_to_virt (cmd->saved_data_pointer));#if 0		printk("scsi%d : template code :\n", host->host_no);		for (code = dsa + (Ent_dsa_code_check_reselect - Ent_dsa_zero) 		    / sizeof(u32); code < (dsa + Ent_dsa_zero / sizeof(u32)); 		    code += print_insn (host, code, "", 1));#endif	    }	    print_insn (host, hostdata->script + Ent_reselected_ok /     	    	    sizeof(u32), "", 1);	}    	return SPECIFIC_INT_RESTART;#endif#ifdef A_int_debug_dsa_schedule    case A_int_debug_dsa_schedule:	if (hostdata->options & (OPTION_DEBUG_SCRIPT|OPTION_DEBUG_INTR)) {	    u32 *dsa;	    /* 	     * Note - this dsa is not based on location relative to 	     * the command structure, but to location relative to the 	     * DSA register 	     */		    dsa = (u32 *) bus_to_virt (NCR53c7x0_read32(DSA_REG));	    printk("scsi%d : dsa_schedule (old DSA = 0x%lx (virt 0x%p))\n", 		host->host_no, virt_to_bus(dsa), dsa);	    if (dsa) 		printk("scsi%d : resume address is 0x%x (virt 0x%p)\n"		       "         (temp was 0x%x (virt 0x%p))\n",		    host->host_no, cmd->saved_data_pointer,		    bus_to_virt (cmd->saved_data_pointer),		    NCR53c7x0_read32 (TEMP_REG),		    bus_to_virt (NCR53c7x0_read32(TEMP_REG)));	}    	return SPECIFIC_INT_RESTART;#endif#ifdef A_int_debug_scheduled    case A_int_debug_scheduled:	if (hostdata->options & (OPTION_DEBUG_SCRIPT|OPTION_DEBUG_INTR)) {	    printk("scsi%d : new I/O 0x%x (virt 0x%p) scheduled\n", 		host->host_no, NCR53c7x0_read32(DSA_REG),	    	bus_to_virt(NCR53c7x0_read32(DSA_REG)));	}	return SPECIFIC_INT_RESTART;#endif#ifdef A_int_debug_idle    case A_int_debug_idle:	if (hostdata->options & (OPTION_DEBUG_SCRIPT|OPTION_DEBUG_INTR)) {	    printk("scsi%d : idle\n", host->host_no);	}	return SPECIFIC_INT_RESTART;#endif#ifdef A_int_debug_cmd    case A_int_debug_cmd:	if (hostdata->options & (OPTION_DEBUG_SCRIPT|OPTION_DEBUG_INTR)) {	    printk("scsi%d : command sent\n");	}    	return SPECIFIC_INT_RESTART;#endif#ifdef A_int_debug_dsa_loaded    case A_int_debug_dsa_loaded:	if (hostdata->options & (OPTION_DEBUG_SCRIPT|OPTION_DEBUG_INTR)) {	    printk("scsi%d : DSA loaded with 0x%x (virt 0x%p)\n", host->host_no,		NCR53c7x0_read32(DSA_REG), 		bus_to_virt(NCR53c7x0_read32(DSA_REG)));	}	return SPECIFIC_INT_RESTART; #endif#ifdef A_int_debug_reselected    case A_int_debug_reselected:	if (hostdata->options & (OPTION_DEBUG_SCRIPT|OPTION_DEBUG_INTR|	    OPTION_DEBUG_DISCONNECT)) {	    if ((hostdata->chip / 100) == 8)		printk("scsi%d : reselected by target %d lun %d\n",		    host->host_no, (int) NCR53c7x0_read8(SDID_REG_800) & ~0x80, 		    (int) hostdata->reselected_identify & 7);	    else		printk("scsi%d : reselected by LCRC=0x%02x lun %d\n",                    host->host_no, (int) NCR53c7x0_read8(LCRC_REG_10),                    (int) hostdata->reselected_identify & 7);	    print_queues(host);	}    	return SPECIFIC_INT_RESTART;#endif#ifdef A_int_debug_disconnect_msg    case A_int_debug_disconnect_msg:	if (hostdata->options & (OPTION_DEBUG_SCRIPT|OPTION_DEBUG_INTR)) {	    if (c)		printk("scsi%d : target %d lun %d disconnecting\n", 		    host->host_no, c->device->id, c->device->lun);	    else		printk("scsi%d : unknown target disconnecting\n",		    host->host_no);	}	return SPECIFIC_INT_RESTART;#endif#ifdef A_int_debug_disconnected    case A_int_debug_disconnected:	if (hostdata->options & (OPTION_DEBUG_SCRIPT|OPTION_DEBUG_INTR|		OPTION_DEBUG_DISCONNECT)) {	    printk ("scsi%d : disconnected, new queues are\n", 		host->host_no);	    print_queues(host);#if 0	    /* Not valid on ncr53c710! */    	    printk ("scsi%d : sxfer=0x%x, scntl3=0x%x\n",		host->host_no, NCR53c7x0_read8(SXFER_REG),		NCR53c7x0_read8(SCNTL3_REG_800));#endif	    if (c) {		print_insn (host, (u32 *) 		    hostdata->sync[c->device->id].script, "", 1);		print_insn (host, (u32 *) 		    hostdata->sync[c->device->id].script + 2, "", 1);	    }	}	return SPECIFIC_INT_RESTART;#endif#ifdef A_int_debug_panic    case A_int_debug_panic:	printk("scsi%d : int_debug_panic received\n", host->host_no);	print_lots (host);	return SPECIFIC_INT_PANIC;#endif#ifdef A_int_debug_saved    case A_int_debug_saved:    	if (hostdata->options & (OPTION_DEBUG_SCRIPT|OPTION_DEBUG_INTR|    	    OPTION_DEBUG_DISCONNECT)) {    	    printk ("scsi%d : saved data pointer 0x%x (virt 0x%p)\n",    	    	host->host_no, cmd->saved_data_pointer,		bus_to_virt (cmd->saved_data_pointer));    	    print_progress (c);    	}    	return SPECIFIC_INT_RESTART;#endif#ifdef A_int_debug_restored    case A_int_debug_restored:    	if (hostdata->options & (OPTION_DEBUG_SCRIPT|OPTION_DEBUG_INTR|    	    OPTION_DEBUG_DISCONNECT)) {    	    if (cmd) {		int size;    	    	printk ("scsi%d : restored data pointer 0x%x (virt 0x%p)\n",    	    	    host->host_no, cmd->saved_data_pointer, bus_to_virt (		    cmd->saved_data_pointer));		size = print_insn (host, (u32 *) 		    bus_to_virt(cmd->saved_data_pointer), "", 1);		size = print_insn (host, (u32 *) 		    bus_to_virt(cmd->saved_data_pointer) + size, "", 1);    	    	print_progress (c);	    }#if 0	    printk ("scsi%d : datapath residual %d\n",		host->host_no, datapath_residual (host)) ;#endif    	}    	return SPECIFIC_INT_RESTART;#endif#ifdef A_int_debug_sync    case A_int_debug_sync:    	if (hostdata->options & (OPTION_DEBUG_SCRIPT|OPTION_DEBUG_INTR|    	    OPTION_DEBUG_DISCONNECT|OPTION_DEBUG_SDTR)) {	    unsigned char sxfer = NCR53c7x0_read8 (SXFER_REG), scntl3;	    if ((hostdata->chip / 100) == 8) {		scntl3 = NCR53c7x0_read8 (SCNTL3_REG_800);		if (c) {		  if (sxfer != hostdata->sync[c->device->id].sxfer_sanity ||		    scntl3 != hostdata->sync[c->device->id].scntl3_sanity) {		   	printk ("scsi%d :  sync sanity check failed sxfer=0x%x, scntl3=0x%x",			    host->host_no, sxfer, scntl3);			NCR53c7x0_write8 (SXFER_REG, sxfer);			NCR53c7x0_write8 (SCNTL3_REG_800, scntl3);		    }		} else     	    	  printk ("scsi%d : unknown command sxfer=0x%x, scntl3=0x%x\n",		    host->host_no, (int) sxfer, (int) scntl3);	    } else {		if (c) {		  if (sxfer != hostdata->sync[c->device->id].sxfer_sanity) {		   	printk ("scsi%d :  sync sanity check failed sxfer=0x%x",			    host->host_no, sxfer);			NCR53c7x0_write8 (SXFER_REG, sxfer);			NCR53c7x0_write8 (SBCL_REG,				hostdata->sync[c->device->id].sscf_710);		    }		} else     	    	  printk ("scsi%d : unknown command sxfer=0x%x\n",		    host->host_no, (int) sxfer);	    }	}    	return SPECIFIC_INT_RESTART;#endif#ifdef A_int_debug_datain	case A_int_debug_datain:	    if (hostdata->options & (OPTION_DEBUG_SCRIPT|OPTION_DEBUG_INTR|		OPTION_DEBUG_DISCONNECT|OPTION_DEBUG_SDTR)) {		int size;		if ((hostdata->chip / 100) == 8)		  printk ("scsi%d : In do_datain (%s) sxfer=0x%x, scntl3=0x%x\n"			"         datapath residual=%d\n",		    host->host_no, sbcl_to_phase (NCR53c7x0_read8 (SBCL_REG)),		    (int) NCR53c7x0_read8(SXFER_REG), 		    (int) NCR53c7x0_read8(SCNTL3_REG_800),		    datapath_residual (host)) ;		else		  printk ("scsi%d : In do_datain (%s) sxfer=0x%x\n"			"         datapath residual=%d\n",		    host->host_no, sbcl_to_phase (NCR53c7x0_read8 (SBCL_REG)),		    (int) NCR53c7x0_read8(SXFER_REG), 		    datapath_residual (host)) ;		print_insn (host, dsp, "", 1);		size = print_insn (host, (u32 *) bus_to_virt(dsp[1]), "", 1);		print_insn (host, (u32 *) bus_to_virt(dsp[1]) + size, "", 1);	   } 	return SPECIFIC_INT_RESTART;#endif#ifdef A_int_debug_check_dsa	case A_int_debug_check_dsa:	    if (NCR53c7x0_read8 (SCNTL1_REG) & SCNTL1_CON) {		int sdid;		int tmp;		char *where;		if (hostdata->chip / 100 == 8)		    sdid = NCR53c7x0_read8 (SDID_REG_800) & 15;		else {		    tmp = NCR53c7x0_read8 (SDID_REG_700);		    if (!tmp)			panic ("SDID_REG_700 = 0");		    tmp >>= 1;		    sdid = 0;		    while (tmp) {			tmp >>= 1;			sdid++;		    }		}		where = dsp - NCR53c7x0_insn_size(NCR53c7x0_read8 			(DCMD_REG)) == hostdata->script + 		    	Ent_select_check_dsa / sizeof(u32) ?		    "selection" : "reselection";		if (c && sdid != c->device->id) {		    printk ("scsi%d : SDID target %d != DSA target %d at %s\n",			host->host_no, sdid, c->device->id, where);		    print_lots(host);		    dump_events (host, 20);		    return SPECIFIC_INT_PANIC;		}	    }	    return SPECIFIC_INT_RESTART;#endif    default:	if ((dsps & 0xff000000) == 0x03000000) {	     printk ("scsi%d : misc debug interrupt 0x%x\n",		host->host_no, dsps);	    return SPECIFIC_INT_RESTART;	} else if ((dsps & 0xff000000) == 0x05000000) {	    if (hostdata->events) {		struct NCR53c7x0_event *event;		++hostdata->event_index;		if (hostdata->event_index >= hostdata->event_size)		    hostdata->event_index = 0;		event = (struct NCR53c7x0_event *) hostdata->events + 		    hostdata->event_index;		event->event = (enum ncr_event) dsps;		event->dsa = bus_to_virt(NCR53c7x0_read32(DSA_REG));		if (NCR53c7x0_read8 (SCNTL1_REG) & SCNTL1_CON) {		    if (hostdata->chip / 100 == 8)			event->target = NCR53c7x0_read8(SSID_REG_800);		    else {			unsigned char tmp, sdid;		        tmp = NCR53c7x0_read8 (SDID_REG_700);		        if (!tmp)			    panic ("SDID_REG_700 = 0");		        tmp >>= 1;		        sdid = 0;		        while (tmp) {			    tmp >>= 1;			    sdid++;		        }			event->target = sdid;		    }		}		else 			event->target = 255;		if (event->event == EVENT_RESELECT)		    event->lun = hostdata->reselected_identify & 0xf;		else if (c)		    event->lun = c->device->lun;		else		    event->lun = 255;		do_gettimeofday(&(event->time));		if (c) {		    event->pid = c->pid;		    memcpy ((void *) event->cmnd, (void *) c->cmnd, 			sizeof (event->cmnd));		} else {		    event->pid = -1;		}	    }	    return SPECIFIC_INT_RESTART;	}	printk ("scsi%d : unknown user interrupt 0x%x\n", 	    host->host_no, (unsigned) dsps);	return SPECIFIC_INT_PANIC;    }}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/1409277c4aad2e87ad27b2b8a6901ce78eaf8081/53c7xx.c/buggy/drivers/scsi/53c7xx.c