printk(KERN_WARNING "scsi%d Unexpected SDTR msg\n", host->host_no); 
shost_printk(KERN_WARNING, host, "Unexpected SDTR msg\n"); 
process_extended_message(struct Scsi_Host *host, 			 struct NCR_700_Host_Parameters *hostdata,			 struct scsi_cmnd *SCp, __u32 dsp, __u32 dsps){	__u32 resume_offset = dsp, temp = dsp + 8;	__u8 pun = 0xff, lun = 0xff;	if(SCp != NULL) {		pun = SCp->device->id;		lun = SCp->device->lun;	}	switch(hostdata->msgin[2]) {	case A_SDTR_MSG:		if(SCp != NULL && NCR_700_is_flag_set(SCp->device, NCR_700_DEV_BEGIN_SYNC_NEGOTIATION)) {			struct scsi_target *starget = SCp->device->sdev_target;			__u8 period = hostdata->msgin[3];			__u8 offset = hostdata->msgin[4];			if(offset == 0 || period == 0) {				offset = 0;				period = 0;			}			spi_offset(starget) = offset;			spi_period(starget) = period;						if(NCR_700_is_flag_set(SCp->device, NCR_700_DEV_PRINT_SYNC_NEGOTIATION)) {				spi_display_xfer_agreement(starget);				NCR_700_clear_flag(SCp->device, NCR_700_DEV_PRINT_SYNC_NEGOTIATION);			}						NCR_700_set_flag(SCp->device, NCR_700_DEV_NEGOTIATED_SYNC);			NCR_700_clear_flag(SCp->device, NCR_700_DEV_BEGIN_SYNC_NEGOTIATION);						NCR_700_writeb(NCR_700_get_SXFER(SCp->device),				       host, SXFER_REG);		} else {			/* SDTR message out of the blue, reject it */			printk(KERN_WARNING "scsi%d Unexpected SDTR msg\n",			       host->host_no);			hostdata->msgout[0] = A_REJECT_MSG;			dma_cache_sync(hostdata->msgout, 1, DMA_TO_DEVICE);			script_patch_16(hostdata->script, MessageCount, 1);			/* SendMsgOut returns, so set up the return			 * address */			resume_offset = hostdata->pScript + Ent_SendMessageWithATN;		}		break;		case A_WDTR_MSG:		printk(KERN_INFO "scsi%d: (%d:%d), Unsolicited WDTR after CMD, Rejecting\n",		       host->host_no, pun, lun);		hostdata->msgout[0] = A_REJECT_MSG;		dma_cache_sync(hostdata->msgout, 1, DMA_TO_DEVICE);		script_patch_16(hostdata->script, MessageCount, 1);		resume_offset = hostdata->pScript + Ent_SendMessageWithATN;		break;	default:		printk(KERN_INFO "scsi%d (%d:%d): Unexpected message %s: ",		       host->host_no, pun, lun,		       NCR_700_phase[(dsps & 0xf00) >> 8]);		scsi_print_msg(hostdata->msgin);		printk("\n");		/* just reject it */		hostdata->msgout[0] = A_REJECT_MSG;		dma_cache_sync(hostdata->msgout, 1, DMA_TO_DEVICE);		script_patch_16(hostdata->script, MessageCount, 1);		/* SendMsgOut returns, so set up the return		 * address */		resume_offset = hostdata->pScript + Ent_SendMessageWithATN;	}	NCR_700_writel(temp, host, TEMP_REG);	return resume_offset;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/017560fca496f72ed9dd734ffde63ce39dfe0411/53c700.c/buggy/drivers/scsi/53c700.c