m = m << req_p->device->id; 
m = m << scmd_id(req_p); 
static int atp870u_queuecommand(struct scsi_cmnd * req_p, 			 void (*done) (struct scsi_cmnd *)){	unsigned char c;	unsigned int tmport,m;		struct atp_unit *dev;	struct Scsi_Host *host;	c = req_p->device->channel;		req_p->sense_buffer[0]=0;	req_p->resid = 0;	if (req_p->device->channel > 1) {		req_p->result = 0x00040000;		done(req_p);#ifdef ED_DBGP				printk("atp870u_queuecommand : req_p->device->channel > 1\n");	#endif					return 0;	}	host = req_p->device->host;	dev = (struct atp_unit *)&host->hostdata;					m = 1;	m = m << req_p->device->id;	/*	 *      Fake a timeout for missing targets	 */	if ((m & dev->active_id[c]) == 0) {		req_p->result = 0x00040000;		done(req_p);		return 0;	}	if (done) {		req_p->scsi_done = done;	} else {#ifdef ED_DBGP				printk( "atp870u_queuecommand: done can't be NULL\n");#endif				req_p->result = 0;		done(req_p);		return 0;	}		/*	 *	Count new command	 */	dev->quend[c]++;	if (dev->quend[c] >= qcnt) {		dev->quend[c] = 0;	}		/*	 *	Check queue state	 */	if (dev->quhd[c] == dev->quend[c]) {		if (dev->quend[c] == 0) {			dev->quend[c] = qcnt;		}#ifdef ED_DBGP				printk("atp870u_queuecommand : dev->quhd[c] == dev->quend[c]\n");#endif				dev->quend[c]--;		req_p->result = 0x00020000;		done(req_p);			return 0;	}	dev->quereq[c][dev->quend[c]] = req_p;	tmport = dev->ioport[c] + 0x1c;#ifdef ED_DBGP		printk("dev->ioport[c] = %x inb(tmport) = %x dev->in_int[%d] = %d dev->in_snd[%d] = %d\n",dev->ioport[c],inb(tmport),c,dev->in_int[c],c,dev->in_snd[c]);#endif	if ((inb(tmport) == 0) && (dev->in_int[c] == 0) && (dev->in_snd[c] == 0)) {#ifdef ED_DBGP		printk("Call sent_s870(atp870u_queuecommand)\n");#endif				send_s870(dev,c);	}#ifdef ED_DBGP		printk("atp870u_queuecommand : exit\n");#endif		return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/422c0d61d591cbfb70f029e13505fb437e169d68/atp870u.c/buggy/drivers/scsi/atp870u.c