print_command (cmd->cmd->cmnd); 
__scsi_print_command (cmd->cmd->cmnd); 
intr_scsi (struct Scsi_Host *host, struct NCR53c7x0_cmd *cmd) {    NCR53c7x0_local_declare();    struct NCR53c7x0_hostdata *hostdata =     	(struct NCR53c7x0_hostdata *) host->hostdata[0];    unsigned char sstat0_sist0, sist1, 		/* Registers */	    fatal; 				/* Did a fatal interrupt 						   occur ? */       NCR53c7x0_local_setup(host);    fatal = 0;    sstat0_sist0 = NCR53c7x0_read8(SSTAT0_REG);    sist1 = 0;    if (hostdata->options & OPTION_DEBUG_INTR) 	printk ("scsi%d : SIST0 0x%0x, SIST1 0x%0x\n", host->host_no,	    sstat0_sist0, sist1);    /* 250ms selection timeout */    if (sstat0_sist0 & SSTAT0_700_STO) {	fatal = 1;	if (hostdata->options & OPTION_DEBUG_INTR) {	    printk ("scsi%d : Selection Timeout\n", host->host_no);    	    if (cmd) {    	    	printk("scsi%d : target %d, lun %d, command ",		    host->host_no, cmd->cmd->device->id, cmd->cmd->device->lun);    	    	print_command (cmd->cmd->cmnd);		printk("scsi%d : dsp = 0x%x (virt 0x%p)\n", host->host_no,		    NCR53c7x0_read32(DSP_REG),		    bus_to_virt(NCR53c7x0_read32(DSP_REG)));    	    } else {    	    	printk("scsi%d : no command\n", host->host_no);    	    }    	}/* * XXX - question : how do we want to handle the Illegal Instruction * 	interrupt, which may occur before or after the Selection Timeout * 	interrupt? */	if (1) {	    hostdata->idle = 1;	    hostdata->expecting_sto = 0;	    if (hostdata->test_running) {		hostdata->test_running = 0;		hostdata->test_completed = 3;	    } else if (cmd) {		abnormal_finished(cmd, DID_BAD_TARGET << 16);	    }#if 0	    	    hostdata->intrs = 0;#endif	}    } /* * FIXME : in theory, we can also get a UDC when a STO occurs. */    if (sstat0_sist0 & SSTAT0_UDC) {	fatal = 1;	if (cmd) {	    printk("scsi%d : target %d lun %d unexpected disconnect\n",		host->host_no, cmd->cmd->device->id, cmd->cmd->device->lun);	    print_lots (host);	    abnormal_finished(cmd, DID_ERROR << 16);	} else 	     printk("scsi%d : unexpected disconnect (no command)\n",		host->host_no);	hostdata->dsp = (u32 *) hostdata->schedule;	hostdata->dsp_changed = 1;    }    /* SCSI PARITY error */    if (sstat0_sist0 & SSTAT0_PAR) {	fatal = 1;	if (cmd && cmd->cmd) {	    printk("scsi%d : target %d lun %d parity error.\n",		host->host_no, cmd->cmd->device->id, cmd->cmd->device->lun);	    abnormal_finished (cmd, DID_PARITY << 16); 	} else	    printk("scsi%d : parity error\n", host->host_no);	/* Should send message out, parity error */	/* XXX - Reduce synchronous transfer rate! */	hostdata->dsp = hostdata->script + hostdata->E_initiator_abort /    	    sizeof(u32);	hostdata->dsp_changed = 1;     /* SCSI GROSS error */    }     if (sstat0_sist0 & SSTAT0_SGE) {	fatal = 1;	printk("scsi%d : gross error, saved2_dsa = 0x%x\n", host->host_no,					(unsigned int)hostdata->saved2_dsa);	print_lots (host);		/*          * A SCSI gross error may occur when we have 	 *	 * - A synchronous offset which causes the SCSI FIFO to be overwritten.	 *	 * - A REQ which causes the maximum synchronous offset programmed in 	 * 	the SXFER register to be exceeded.	 *	 * - A phase change with an outstanding synchronous offset.	 *	 * - Residual data in the synchronous data FIFO, with a transfer	 *	other than a synchronous receive is started.$#	 */			/* XXX Should deduce synchronous transfer rate! */	hostdata->dsp = hostdata->script + hostdata->E_initiator_abort /    	    sizeof(u32);	hostdata->dsp_changed = 1;    /* Phase mismatch */    }     if (sstat0_sist0 & SSTAT0_MA) {	fatal = 1;	if (hostdata->options & OPTION_DEBUG_INTR)	    printk ("scsi%d : SSTAT0_MA\n", host->host_no);	intr_phase_mismatch (host, cmd);    }#if 0    if (sstat0_sist0 & SIST0_800_RSL) 	printk ("scsi%d : Oh no Mr. Bill!\n", host->host_no);#endif    /* * If a fatal SCSI interrupt occurs, we must insure that the DMA and * SCSI FIFOs were flushed. */    if (fatal) {	if (!hostdata->dstat_valid) {	    hostdata->dstat = NCR53c7x0_read8(DSTAT_REG);	    hostdata->dstat_valid = 1;	}	if (!(hostdata->dstat & DSTAT_DFE)) {	  printk ("scsi%d : DMA FIFO not empty\n", host->host_no);	  /*	   * Really need to check this code for 710  RGH.	   * Havn't seen any problems, but maybe we should FLUSH before	   * clearing sometimes.	   */          NCR53c7x0_write8 (CTEST8_REG, CTEST8_10_CLF);          while (NCR53c7x0_read8 (CTEST8_REG) & CTEST8_10_CLF)		;	  hostdata->dstat |= DSTAT_DFE;    	}    }}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/db9dff366ba78085d0323364fadbf09bec0e77ee/53c7xx.c/buggy/drivers/scsi/53c7xx.c