esp->config3[SCptr->device->id])); 
esp->config3[scmd_id(SCptr)])); 
static int check_multibyte_msg(struct NCR_ESP *esp,			       struct ESP_regs *eregs){	Scsi_Cmnd *SCptr = esp->current_SC;	struct esp_device *esp_dev = SCptr->device->hostdata;	unchar regval = 0;	int message_out = 0;	ESPSDTR(("chk multibyte msg: "));	if(esp->cur_msgin[2] == EXTENDED_SDTR) {		int period = esp->cur_msgin[3];		int offset = esp->cur_msgin[4];		ESPSDTR(("is sync nego response, "));		if(!esp->snip) {			int rval;			/* Target negotiates first! */			ESPSDTR(("target jumps the gun, "));			message_out = EXTENDED_MESSAGE; /* we must respond */			rval = target_with_ants_in_pants(esp, SCptr, esp_dev);			if(rval)				return rval;		}		ESPSDTR(("examining sdtr, "));		/* Offset cannot be larger than ESP fifo size. */		if(offset > 15) {			ESPSDTR(("offset too big %2x, ", offset));			offset = 15;			ESPSDTR(("sending back new offset\n"));			build_sync_nego_msg(esp, period, offset);			return EXTENDED_MESSAGE;		}		if(offset && period > esp->max_period) {			/* Yeee, async for this slow device. */			ESPSDTR(("period too long %2x, ", period));			build_sync_nego_msg(esp, 0, 0);			ESPSDTR(("hoping for msgout\n"));			esp_advance_phase(esp->current_SC, in_the_dark);			return EXTENDED_MESSAGE;		} else if (offset && period < esp->min_period) {			ESPSDTR(("period too short %2x, ", period));			period = esp->min_period;			if(esp->erev > esp236)				regval = 4;			else				regval = 5;		} else if(offset) {			int tmp;			ESPSDTR(("period is ok, "));			tmp = esp->ccycle / 1000;			regval = (((period << 2) + tmp - 1) / tmp);			if(regval && (esp->erev > esp236)) {				if(period >= 50)					regval--;			}		}		if(offset) {			unchar bit;			esp_dev->sync_min_period = (regval & 0x1f);			esp_dev->sync_max_offset = (offset | esp->radelay);			if(esp->erev > esp236) {				if(esp->erev == fas100a)					bit = ESP_CONFIG3_FAST;				else					bit = ESP_CONFIG3_FSCSI;				if(period < 50)					esp->config3[SCptr->device->id] |= bit;				else					esp->config3[SCptr->device->id] &= ~bit;				esp->prev_cfg3 = esp->config3[SCptr->device->id];				esp_write(eregs->esp_cfg3, esp->prev_cfg3);			}			esp->prev_soff = esp_dev->sync_min_period;			esp_write(eregs->esp_soff, esp->prev_soff);			esp->prev_stp = esp_dev->sync_max_offset;			esp_write(eregs->esp_stp, esp->prev_stp);			ESPSDTR(("soff=%2x stp=%2x cfg3=%2x\n",				esp_dev->sync_max_offset,				esp_dev->sync_min_period,				esp->config3[SCptr->device->id]));			esp->snip = 0;		} else if(esp_dev->sync_max_offset) {			unchar bit;			/* back to async mode */			ESPSDTR(("unaccaptable sync nego, forcing async\n"));			esp_dev->sync_max_offset = 0;			esp_dev->sync_min_period = 0;			esp->prev_soff = 0;			esp_write(eregs->esp_soff, 0);			esp->prev_stp = 0;			esp_write(eregs->esp_stp, 0);			if(esp->erev > esp236) {				if(esp->erev == fas100a)					bit = ESP_CONFIG3_FAST;				else					bit = ESP_CONFIG3_FSCSI;				esp->config3[SCptr->device->id] &= ~bit;				esp->prev_cfg3 = esp->config3[SCptr->device->id];				esp_write(eregs->esp_cfg3, esp->prev_cfg3);			}		}		sync_report(esp);		ESPSDTR(("chk multibyte msg: sync is known, "));		esp_dev->sync = 1;		if(message_out) {			ESPLOG(("esp%d: sending sdtr back, hoping for msgout\n",				esp->esp_id));			build_sync_nego_msg(esp, period, offset);			esp_advance_phase(SCptr, in_the_dark);			return EXTENDED_MESSAGE;		}		ESPSDTR(("returning zero\n"));		esp_advance_phase(SCptr, in_the_dark); /* ...or else! */		return 0;	} else if(esp->cur_msgin[2] == EXTENDED_WDTR) {		ESPLOG(("esp%d: AIEEE wide msg received\n", esp->esp_id));		message_out = MESSAGE_REJECT;	} else if(esp->cur_msgin[2] == EXTENDED_MODIFY_DATA_POINTER) {		ESPLOG(("esp%d: rejecting modify data ptr msg\n", esp->esp_id));		message_out = MESSAGE_REJECT;	}	esp_advance_phase(SCptr, in_the_dark);	return message_out;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/422c0d61d591cbfb70f029e13505fb437e169d68/NCR53C9x.c/clean/drivers/scsi/NCR53C9x.c