if (channel == scmd->device->channel) 
if (channel == scmd_channel(scmd)) 
static int scsi_eh_bus_reset(struct Scsi_Host *shost,			     struct list_head *work_q,			     struct list_head *done_q){	struct scsi_cmnd *scmd, *chan_scmd, *next;	unsigned int channel;	int rtn;	/*	 * we really want to loop over the various channels, and do this on	 * a channel by channel basis.  we should also check to see if any	 * of the failed commands are on soft_reset devices, and if so, skip	 * the reset.  	 */	for (channel = 0; channel <= shost->max_channel; channel++) {		chan_scmd = NULL;		list_for_each_entry(scmd, work_q, eh_entry) {			if (channel == scmd->device->channel) {				chan_scmd = scmd;				break;				/*				 * FIXME add back in some support for				 * soft_reset devices.				 */			}		}		if (!chan_scmd)			continue;		SCSI_LOG_ERROR_RECOVERY(3, printk("%s: Sending BRST chan:"						  " %d\n", current->comm,						  channel));		rtn = scsi_try_bus_reset(chan_scmd);		if (rtn == SUCCESS) {			list_for_each_entry_safe(scmd, next, work_q, eh_entry) {				if (channel == scmd->device->channel)					if (!scsi_device_online(scmd->device) ||					    !scsi_eh_tur(scmd))						scsi_eh_finish_cmd(scmd,								   done_q);			}		} else {			SCSI_LOG_ERROR_RECOVERY(3, printk("%s: BRST"							  " failed chan: %d\n",							  current->comm,							  channel));		}	}	return list_empty(work_q);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/422c0d61d591cbfb70f029e13505fb437e169d68/scsi_error.c/buggy/drivers/scsi/scsi_error.c