taglinefilesource code
SCpnt358kernel/blk_drv/scsi/aha1542.cint aha1542_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt362kernel/blk_drv/scsi/aha1542.cunchar *cmd = (unchar *) SCpnt->cmnd;
SCpnt363kernel/blk_drv/scsi/aha1542.cunchar target = SCpnt->target;
SCpnt364kernel/blk_drv/scsi/aha1542.cunchar lun = SCpnt->lun;
SCpnt365kernel/blk_drv/scsi/aha1542.cvoid *buff = SCpnt->request_buffer;
SCpnt366kernel/blk_drv/scsi/aha1542.cint bufflen = SCpnt->request_bufflen;
SCpnt372kernel/blk_drv/scsi/aha1542.cSCpnt->result = DID_TIME_OUT << 16;
SCpnt373kernel/blk_drv/scsi/aha1542.cdone(SCpnt); return 0;});
SCpnt382kernel/blk_drv/scsi/aha1542.cSCpnt->result = 0;
SCpnt383kernel/blk_drv/scsi/aha1542.cdone(SCpnt); 
SCpnt422kernel/blk_drv/scsi/aha1542.cSCint[mbo] = SCpnt;  /* This will effectively prevent someone else from
SCpnt444kernel/blk_drv/scsi/aha1542.cif (SCpnt->use_sg) {
SCpnt452kernel/blk_drv/scsi/aha1542.cSCpnt->host_scribble = scsi_malloc(512);
SCpnt453kernel/blk_drv/scsi/aha1542.csgpnt = (struct scatterlist *) SCpnt->request_buffer;
SCpnt454kernel/blk_drv/scsi/aha1542.ccptr = (struct chain *) SCpnt->host_scribble; 
SCpnt456kernel/blk_drv/scsi/aha1542.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt457kernel/blk_drv/scsi/aha1542.cif(sgpnt[i].length == 0 || SCpnt->use_sg > 16 || 
SCpnt460kernel/blk_drv/scsi/aha1542.cprintk("Bad segment list supplied to aha1542.c (%d, %d)\n",SCpnt->use_sg,i);
SCpnt461kernel/blk_drv/scsi/aha1542.cfor(i=0;i<SCpnt->use_sg++;i++){
SCpnt473kernel/blk_drv/scsi/aha1542.cany2scsi(ccb[mbo].datalen, SCpnt->use_sg * sizeof(struct chain));
SCpnt482kernel/blk_drv/scsi/aha1542.cSCpnt->host_scribble = NULL;
SCpnt501kernel/blk_drv/scsi/aha1542.cSCpnt->scsi_done = done;
SCpnt514kernel/blk_drv/scsi/aha1542.cstatic void internal_done(Scsi_Cmnd * SCpnt)
SCpnt516kernel/blk_drv/scsi/aha1542.cinternal_done_errcode = SCpnt->result;
SCpnt520kernel/blk_drv/scsi/aha1542.cint aha1542_command(Scsi_Cmnd * SCpnt)
SCpnt524kernel/blk_drv/scsi/aha1542.caha1542_queuecommand(SCpnt, internal_done);
SCpnt749kernel/blk_drv/scsi/aha1542.cint aha1542_abort(Scsi_Cmnd * SCpnt, int i)
SCpnt759kernel/blk_drv/scsi/aha1542.cif (SCpnt == SCint[mbo]){
SCpnt197kernel/blk_drv/scsi/aha1740.cSCtmp = ecbptr->SCpnt;
SCpnt237kernel/blk_drv/scsi/aha1740.cint aha1740_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt240kernel/blk_drv/scsi/aha1740.cunchar *cmd = (unchar *) SCpnt->cmnd;
SCpnt241kernel/blk_drv/scsi/aha1740.cunchar target = SCpnt->target;
SCpnt242kernel/blk_drv/scsi/aha1740.cvoid *buff = SCpnt->request_buffer;
SCpnt243kernel/blk_drv/scsi/aha1740.cint bufflen = SCpnt->request_bufflen;
SCpnt255kernel/blk_drv/scsi/aha1740.cSCpnt->result = 0;
SCpnt256kernel/blk_drv/scsi/aha1740.cdone(SCpnt); 
SCpnt308kernel/blk_drv/scsi/aha1740.cif (SCpnt->use_sg)
SCpnt317kernel/blk_drv/scsi/aha1740.cSCpnt->host_scribble = scsi_malloc(512);
SCpnt318kernel/blk_drv/scsi/aha1740.csgpnt = (struct scatterlist *) SCpnt->request_buffer;
SCpnt319kernel/blk_drv/scsi/aha1740.ccptr = (struct aha1740_chain *) SCpnt->host_scribble; 
SCpnt321kernel/blk_drv/scsi/aha1740.cfor(i=0; i<SCpnt->use_sg; i++)
SCpnt326kernel/blk_drv/scsi/aha1740.cecb[ecbno].datalen = SCpnt->use_sg * sizeof(struct aha1740_chain);
SCpnt336kernel/blk_drv/scsi/aha1740.cSCpnt->host_scribble = NULL;
SCpnt340kernel/blk_drv/scsi/aha1740.cecb[ecbno].lun = SCpnt->lun;
SCpnt348kernel/blk_drv/scsi/aha1740.cecb[ecbno].SCpnt = SCpnt;
SCpnt402kernel/blk_drv/scsi/aha1740.cstatic void internal_done(Scsi_Cmnd * SCpnt)
SCpnt404kernel/blk_drv/scsi/aha1740.cinternal_done_errcode = SCpnt->result;
SCpnt408kernel/blk_drv/scsi/aha1740.cint aha1740_command(Scsi_Cmnd * SCpnt)
SCpnt410kernel/blk_drv/scsi/aha1740.caha1740_queuecommand(SCpnt, internal_done);
SCpnt469kernel/blk_drv/scsi/aha1740.cint aha1740_abort(Scsi_Cmnd * SCpnt, int i)
SCpnt142kernel/blk_drv/scsi/aha1740.hScsi_Cmnd *SCpnt;    /* Link to the SCSI Command Block */
SCpnt983kernel/blk_drv/scsi/fdomain.cint fdomain_16x0_queue( Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt990kernel/blk_drv/scsi/fdomain.cSCpnt->target,
SCpnt991kernel/blk_drv/scsi/fdomain.c*(unsigned char *)SCpnt->cmnd,
SCpnt992kernel/blk_drv/scsi/fdomain.cSCpnt->use_sg,
SCpnt993kernel/blk_drv/scsi/fdomain.cSCpnt->request_bufflen );
SCpnt998kernel/blk_drv/scsi/fdomain.ccurrent_SC            = SCpnt; /* Save this for the done function */
SCpnt1034kernel/blk_drv/scsi/fdomain.cint fdomain_16x0_command( Scsi_Cmnd *SCpnt )
SCpnt1036kernel/blk_drv/scsi/fdomain.cconst char     *cmd_pt = SCpnt->cmnd;
SCpnt1037kernel/blk_drv/scsi/fdomain.cconst char     *the_command = SCpnt->cmnd;
SCpnt1038kernel/blk_drv/scsi/fdomain.cunsigned char  *out_buf_pt = SCpnt->request_buffer;
SCpnt1039kernel/blk_drv/scsi/fdomain.cunsigned char  *in_buf_pt = SCpnt->request_buffer;
SCpnt1040kernel/blk_drv/scsi/fdomain.cunsigned char  target = SCpnt->target;
SCpnt1041kernel/blk_drv/scsi/fdomain.cvoid           *buff = SCpnt->request_buffer;
SCpnt1042kernel/blk_drv/scsi/fdomain.cint            bufflen = SCpnt->request_bufflen;
SCpnt1052kernel/blk_drv/scsi/fdomain.ccurrent_SC = SCpnt;
SCpnt1223kernel/blk_drv/scsi/fdomain.cint fdomain_16x0_abort( Scsi_Cmnd *SCpnt, int code )
SCpnt33kernel/blk_drv/scsi/scsi.cstatic void scsi_done (Scsi_Cmnd *SCpnt);
SCpnt36kernel/blk_drv/scsi/scsi.cstatic void scsi_times_out (Scsi_Cmnd * SCpnt);
SCpnt142kernel/blk_drv/scsi/scsi.cstatic void scan_scsis_done (Scsi_Cmnd * SCpnt)
SCpnt146kernel/blk_drv/scsi/scsi.cprintk ("scan_scsis_done(%d, %06x)\n", SCpnt->host, SCpnt->result);
SCpnt148kernel/blk_drv/scsi/scsi.cSCpnt->request.dev = 0xfffe;
SCpnt382kernel/blk_drv/scsi/scsi.cstatic void scsi_times_out (Scsi_Cmnd * SCpnt)
SCpnt385kernel/blk_drv/scsi/scsi.cswitch (SCpnt->internal_timeout & (IN_ABORT | IN_RESET))
SCpnt390kernel/blk_drv/scsi/scsi.cSCpnt->host);
SCpnt392kernel/blk_drv/scsi/scsi.cif (!scsi_abort  (SCpnt, DID_TIME_OUT))
SCpnt396kernel/blk_drv/scsi/scsi.cSCpnt->host);
SCpnt397kernel/blk_drv/scsi/scsi.cif (!scsi_reset (SCpnt)) 
SCpnt401kernel/blk_drv/scsi/scsi.cprintk("Unable to reset scsi host %d\n",SCpnt->host);
SCpnt419kernel/blk_drv/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt428kernel/blk_drv/scsi/scsi.cSCpnt = host_queue[host];
SCpnt429kernel/blk_drv/scsi/scsi.cwhile(SCpnt){
SCpnt430kernel/blk_drv/scsi/scsi.cif(SCpnt->target == scsi_devices[index].id &&
SCpnt431kernel/blk_drv/scsi/scsi.cSCpnt->lun == scsi_devices[index].lun)
SCpnt432kernel/blk_drv/scsi/scsi.cif(SCpnt->request.dev < 0) break;
SCpnt433kernel/blk_drv/scsi/scsi.cSCpnt = SCpnt->next;
SCpnt436kernel/blk_drv/scsi/scsi.cif (!SCpnt) return NULL;
SCpnt442kernel/blk_drv/scsi/scsi.cmemcpy(&SCpnt->request, req, sizeof(struct request));
SCpnt445kernel/blk_drv/scsi/scsi.cSCpnt->request.dev = 0xffff; /* Busy, but no request */
SCpnt446kernel/blk_drv/scsi/scsi.cSCpnt->request.waiting = NULL;  /* And no one is waiting for the device either */
SCpnt449kernel/blk_drv/scsi/scsi.cSCpnt->use_sg = 0;  /* Reset the scatter-gather flag */
SCpnt450kernel/blk_drv/scsi/scsi.cSCpnt->transfersize = 0;
SCpnt451kernel/blk_drv/scsi/scsi.cSCpnt->underflow = 0;
SCpnt452kernel/blk_drv/scsi/scsi.creturn SCpnt;
SCpnt468kernel/blk_drv/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt482kernel/blk_drv/scsi/scsi.cSCpnt = host_queue[host];
SCpnt483kernel/blk_drv/scsi/scsi.cwhile(SCpnt){
SCpnt484kernel/blk_drv/scsi/scsi.cif(SCpnt->target == scsi_devices[index].id &&
SCpnt485kernel/blk_drv/scsi/scsi.cSCpnt->lun == scsi_devices[index].lun) {
SCpnt486kernel/blk_drv/scsi/scsi.cSCwait = SCpnt;
SCpnt487kernel/blk_drv/scsi/scsi.cif(SCpnt->request.dev < 0) break;
SCpnt489kernel/blk_drv/scsi/scsi.cSCpnt = SCpnt->next;
SCpnt497kernel/blk_drv/scsi/scsi.cif (!SCpnt || SCpnt->request.dev >= 0)  /* Might have changed */
SCpnt510kernel/blk_drv/scsi/scsi.cmemcpy(&SCpnt->request, req, sizeof(struct request));
SCpnt514kernel/blk_drv/scsi/scsi.cSCpnt->request.dev = 0xffff; /* Busy */
SCpnt515kernel/blk_drv/scsi/scsi.cSCpnt->request.waiting = NULL;  /* And no one is waiting for this to complete */
SCpnt522kernel/blk_drv/scsi/scsi.cSCpnt->use_sg = 0;  /* Reset the scatter-gather flag */
SCpnt523kernel/blk_drv/scsi/scsi.cSCpnt->transfersize = 0;      /* No default transfer size */
SCpnt524kernel/blk_drv/scsi/scsi.cSCpnt->underflow = 0;         /* Do not flag underflow conditions */
SCpnt525kernel/blk_drv/scsi/scsi.creturn SCpnt;
SCpnt532kernel/blk_drv/scsi/scsi.cinline void internal_cmnd (Scsi_Cmnd * SCpnt)
SCpnt540kernel/blk_drv/scsi/scsi.chost = SCpnt->host;
SCpnt552kernel/blk_drv/scsi/scsi.cupdate_timeout(SCpnt, SCpnt->timeout_per_command);
SCpnt560kernel/blk_drv/scsi/scsi.c"bufflen = %d, done = %08x)\n", SCpnt->host, SCpnt->target, SCpnt->cmnd, SCpnt->buffer, SCpnt->bufflen, SCpnt->done);
SCpnt569kernel/blk_drv/scsi/scsi.cscsi_hosts[host].queuecommand (SCpnt, scsi_done);
SCpnt577kernel/blk_drv/scsi/scsi.ctemp=scsi_hosts[host].command (SCpnt);
SCpnt578kernel/blk_drv/scsi/scsi.cSCpnt->result = temp;
SCpnt584kernel/blk_drv/scsi/scsi.cscsi_done(SCpnt);
SCpnt591kernel/blk_drv/scsi/scsi.cstatic void scsi_request_sense (Scsi_Cmnd * SCpnt)
SCpnt594kernel/blk_drv/scsi/scsi.cSCpnt->flags |= WAS_SENSE;
SCpnt595kernel/blk_drv/scsi/scsi.cupdate_timeout(SCpnt, SENSE_TIMEOUT);
SCpnt599kernel/blk_drv/scsi/scsi.cmemcpy ((void *) SCpnt->cmnd , (void *) generic_sense,
SCpnt602kernel/blk_drv/scsi/scsi.cSCpnt->cmnd[1] = SCpnt->lun << 5;  
SCpnt603kernel/blk_drv/scsi/scsi.cSCpnt->cmnd[4] = sizeof(SCpnt->sense_buffer);
SCpnt605kernel/blk_drv/scsi/scsi.cSCpnt->request_buffer = &SCpnt->sense_buffer;
SCpnt606kernel/blk_drv/scsi/scsi.cSCpnt->request_bufflen = sizeof(SCpnt->sense_buffer);
SCpnt607kernel/blk_drv/scsi/scsi.cinternal_cmnd (SCpnt);
SCpnt619kernel/blk_drv/scsi/scsi.cvoid scsi_do_cmd (Scsi_Cmnd * SCpnt, const void *cmnd , 
SCpnt624kernel/blk_drv/scsi/scsi.cint host = SCpnt->host;
SCpnt629kernel/blk_drv/scsi/scsi.cint target = SCpnt->target;
SCpnt676kernel/blk_drv/scsi/scsi.cmemcpy ((void *) SCpnt->data_cmnd , (void *) cmnd, 10);
SCpnt678kernel/blk_drv/scsi/scsi.cSCpnt->host = host;
SCpnt679kernel/blk_drv/scsi/scsi.cSCpnt->target = target;
SCpnt680kernel/blk_drv/scsi/scsi.cSCpnt->lun = (SCpnt->data_cmnd[1] >> 5);
SCpnt682kernel/blk_drv/scsi/scsi.cSCpnt->bufflen = bufflen;
SCpnt683kernel/blk_drv/scsi/scsi.cSCpnt->buffer = buffer;
SCpnt684kernel/blk_drv/scsi/scsi.cSCpnt->flags=0;
SCpnt685kernel/blk_drv/scsi/scsi.cSCpnt->retries=0;
SCpnt686kernel/blk_drv/scsi/scsi.cSCpnt->allowed=retries;
SCpnt687kernel/blk_drv/scsi/scsi.cSCpnt->done = done;
SCpnt688kernel/blk_drv/scsi/scsi.cSCpnt->timeout_per_command = timeout;
SCpnt690kernel/blk_drv/scsi/scsi.cmemcpy ((void *) SCpnt->cmnd , (void *) cmnd, 10);
SCpnt691kernel/blk_drv/scsi/scsi.cSCpnt->request_buffer = buffer;
SCpnt692kernel/blk_drv/scsi/scsi.cSCpnt->request_bufflen = bufflen;
SCpnt696kernel/blk_drv/scsi/scsi.cSCpnt->internal_timeout = 0;
SCpnt697kernel/blk_drv/scsi/scsi.cinternal_cmnd (SCpnt);
SCpnt712kernel/blk_drv/scsi/scsi.cstatic void reset (Scsi_Cmnd * SCpnt)
SCpnt715kernel/blk_drv/scsi/scsi.cprintk("reset(%d)\n", SCpnt->host);
SCpnt718kernel/blk_drv/scsi/scsi.cSCpnt->flags |= (WAS_RESET | IS_RESETTING);
SCpnt719kernel/blk_drv/scsi/scsi.cscsi_reset(SCpnt);
SCpnt725kernel/blk_drv/scsi/scsi.cscsi_request_sense (SCpnt);
SCpnt730kernel/blk_drv/scsi/scsi.cstatic int check_sense (Scsi_Cmnd * SCpnt)
SCpnt732kernel/blk_drv/scsi/scsi.cif (((SCpnt->sense_buffer[0] & 0x70) >> 4) == 7) {
SCpnt733kernel/blk_drv/scsi/scsi.cif (SCpnt->sense_buffer[2] &0xe0)
SCpnt735kernel/blk_drv/scsi/scsi.cswitch (SCpnt->sense_buffer[2] & 0xf)
SCpnt787kernel/blk_drv/scsi/scsi.cstatic void scsi_done (Scsi_Cmnd * SCpnt)
SCpnt793kernel/blk_drv/scsi/scsi.cint host = SCpnt->host;
SCpnt794kernel/blk_drv/scsi/scsi.cint result = SCpnt->result;
SCpnt795kernel/blk_drv/scsi/scsi.coldto = update_timeout(SCpnt, 0);
SCpnt807kernel/blk_drv/scsi/scsi.cupdate_timeout(SCpnt, 0);
SCpnt814kernel/blk_drv/scsi/scsi.cif (SCpnt->flags & IS_RESETTING)
SCpnt816kernel/blk_drv/scsi/scsi.cSCpnt->flags &= ~IS_RESETTING;
SCpnt821kernel/blk_drv/scsi/scsi.cif (status_byte(result) && (SCpnt->flags & 
SCpnt824kernel/blk_drv/scsi/scsi.cSCpnt->flags &= ~WAS_SENSE;
SCpnt825kernel/blk_drv/scsi/scsi.cSCpnt->internal_timeout &= ~SENSE_TIMEOUT;
SCpnt827kernel/blk_drv/scsi/scsi.cif (!(SCpnt->flags & WAS_RESET))
SCpnt829kernel/blk_drv/scsi/scsi.creset(SCpnt);
SCpnt844kernel/blk_drv/scsi/scsi.cif (SCpnt->flags & WAS_SENSE)
SCpnt850kernel/blk_drv/scsi/scsi.cSCpnt->flags &= ~WAS_SENSE;
SCpnt851kernel/blk_drv/scsi/scsi.cSCpnt->internal_timeout &= ~SENSE_TIMEOUT;
SCpnt853kernel/blk_drv/scsi/scsi.cswitch (checked = check_sense(SCpnt))
SCpnt860kernel/blk_drv/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt902kernel/blk_drv/scsi/scsi.cscsi_request_sense (SCpnt);
SCpnt918kernel/blk_drv/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt923kernel/blk_drv/scsi/scsi.creset(SCpnt);
SCpnt947kernel/blk_drv/scsi/scsi.cif (SCpnt->flags & WAS_TIMEDOUT)  
SCpnt959kernel/blk_drv/scsi/scsi.cSCpnt->flags  |= WAS_TIMEDOUT;
SCpnt984kernel/blk_drv/scsi/scsi.cscsi_request_sense (SCpnt);
SCpnt1004kernel/blk_drv/scsi/scsi.cSCpnt->allowed, SCpnt->retries);
SCpnt1007kernel/blk_drv/scsi/scsi.cif ((++SCpnt->retries) < SCpnt->allowed)
SCpnt1009kernel/blk_drv/scsi/scsi.cif ((SCpnt->retries >= (SCpnt->allowed >> 1))
SCpnt1010kernel/blk_drv/scsi/scsi.c&& !(SCpnt->flags & WAS_RESET))
SCpnt1012kernel/blk_drv/scsi/scsi.creset(SCpnt);
SCpnt1025kernel/blk_drv/scsi/scsi.cif (SCpnt->flags & WAS_SENSE)      
SCpnt1026kernel/blk_drv/scsi/scsi.cscsi_request_sense(SCpnt);   
SCpnt1029kernel/blk_drv/scsi/scsi.cmemcpy ((void *) SCpnt->cmnd,
SCpnt1030kernel/blk_drv/scsi/scsi.c(void*) SCpnt->data_cmnd, 
SCpnt1031kernel/blk_drv/scsi/scsi.csizeof(SCpnt->data_cmnd));
SCpnt1032kernel/blk_drv/scsi/scsi.cSCpnt->request_buffer = SCpnt->buffer;
SCpnt1033kernel/blk_drv/scsi/scsi.cSCpnt->request_bufflen = SCpnt->bufflen;
SCpnt1034kernel/blk_drv/scsi/scsi.cinternal_cmnd (SCpnt);
SCpnt1044kernel/blk_drv/scsi/scsi.cprintk("Calling done function - at address %08x\n", SCpnt->done);
SCpnt1048kernel/blk_drv/scsi/scsi.cSCpnt->result = result | ((exit & 0xff) << 24);
SCpnt1049kernel/blk_drv/scsi/scsi.cSCpnt->done (SCpnt);
SCpnt1075kernel/blk_drv/scsi/scsi.cint scsi_abort (Scsi_Cmnd * SCpnt, int why)
SCpnt1078kernel/blk_drv/scsi/scsi.cint host = SCpnt->host;
SCpnt1083kernel/blk_drv/scsi/scsi.cif (SCpnt->internal_timeout & IN_ABORT) 
SCpnt1086kernel/blk_drv/scsi/scsi.cwhile (SCpnt->internal_timeout & IN_ABORT);
SCpnt1090kernel/blk_drv/scsi/scsi.cSCpnt->internal_timeout |= IN_ABORT;
SCpnt1091kernel/blk_drv/scsi/scsi.coldto = update_timeout(SCpnt, ABORT_TIMEOUT);
SCpnt1095kernel/blk_drv/scsi/scsi.cif (!host_busy[host] || !scsi_hosts[host].abort(SCpnt, why))
SCpnt1101kernel/blk_drv/scsi/scsi.cSCpnt->internal_timeout &= ~IN_ABORT;
SCpnt1102kernel/blk_drv/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1109kernel/blk_drv/scsi/scsi.cint scsi_reset (Scsi_Cmnd * SCpnt)
SCpnt1113kernel/blk_drv/scsi/scsi.cint host = SCpnt->host;
SCpnt1120kernel/blk_drv/scsi/scsi.cif (SCpnt->internal_timeout & IN_RESET)
SCpnt1123kernel/blk_drv/scsi/scsi.cwhile (SCpnt->internal_timeout & IN_RESET);
SCpnt1127kernel/blk_drv/scsi/scsi.cSCpnt->internal_timeout |= IN_RESET;
SCpnt1128kernel/blk_drv/scsi/scsi.coldto = update_timeout(SCpnt, RESET_TIMEOUT);  
SCpnt1155kernel/blk_drv/scsi/scsi.cSCpnt->internal_timeout &= ~IN_RESET;
SCpnt1156kernel/blk_drv/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1171kernel/blk_drv/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt1183kernel/blk_drv/scsi/scsi.cSCpnt = host_queue[host];
SCpnt1184kernel/blk_drv/scsi/scsi.cwhile (SCpnt){
SCpnt1185kernel/blk_drv/scsi/scsi.cif (SCpnt->timeout != 0 && SCpnt->timeout <= time_elapsed)
SCpnt1188kernel/blk_drv/scsi/scsi.cSCpnt->timeout = 0;
SCpnt1189kernel/blk_drv/scsi/scsi.cscsi_times_out(SCpnt);
SCpnt1193kernel/blk_drv/scsi/scsi.cSCpnt =  SCpnt->next;
SCpnt1219kernel/blk_drv/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt1245kernel/blk_drv/scsi/scsi.cSCpnt = host_queue[host];
SCpnt1246kernel/blk_drv/scsi/scsi.cwhile (SCpnt){
SCpnt1247kernel/blk_drv/scsi/scsi.cif (SCpnt->timeout > 0 && (SCpnt->timeout -= used) < least)
SCpnt1248kernel/blk_drv/scsi/scsi.cleast = SCpnt->timeout;
SCpnt1249kernel/blk_drv/scsi/scsi.cSCpnt =  SCpnt->next;
SCpnt1349kernel/blk_drv/scsi/scsi.cScsi_Cmnd * SCpnt;
SCpnt1371kernel/blk_drv/scsi/scsi.cSCpnt = last_cmnd;
SCpnt1391kernel/blk_drv/scsi/scsi.cSCpnt->host = scsi_devices[i].host_no;
SCpnt1392kernel/blk_drv/scsi/scsi.cSCpnt->target = scsi_devices[i].id;
SCpnt1393kernel/blk_drv/scsi/scsi.cSCpnt->lun = scsi_devices[i].lun;
SCpnt1394kernel/blk_drv/scsi/scsi.cSCpnt->index = i;
SCpnt1395kernel/blk_drv/scsi/scsi.cSCpnt->request.dev = -1; /* Mark not busy */
SCpnt1396kernel/blk_drv/scsi/scsi.cSCpnt->use_sg = 0;
SCpnt1397kernel/blk_drv/scsi/scsi.cSCpnt->underflow = 0;
SCpnt1398kernel/blk_drv/scsi/scsi.cSCpnt->transfersize = 0;
SCpnt1401kernel/blk_drv/scsi/scsi.chost_queue[host]->prev = SCpnt;
SCpnt1402kernel/blk_drv/scsi/scsi.cSCpnt->next = host_queue[host];
SCpnt1403kernel/blk_drv/scsi/scsi.cSCpnt->prev = NULL;
SCpnt1404kernel/blk_drv/scsi/scsi.chost_queue[host] = SCpnt;
SCpnt1405kernel/blk_drv/scsi/scsi.cSCpnt++;
SCpnt1410kernel/blk_drv/scsi/scsi.cmemory_start = (int) SCpnt;
SCpnt447kernel/blk_drv/scsi/scsi.hstatic void end_scsi_request(Scsi_Cmnd * SCpnt, int uptodate, int sectors)
SCpnt453kernel/blk_drv/scsi/scsi.hreq = &SCpnt->request;
SCpnt490kernel/blk_drv/scsi/scsi.hwake_up(&scsi_devices[SCpnt->index].device_wait);
SCpnt49kernel/blk_drv/scsi/scsi_debug.cif ((SCpnt->request.dev & 0xf) != 0) start = starts[(SCpnt->request.dev & 0xf) - 1];    \
SCpnt55kernel/blk_drv/scsi/scsi_debug.cif (bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\
SCpnt61kernel/blk_drv/scsi/scsi_debug.cif ((SCpnt->request.dev & 0xfff0) != ((target + NR_REAL) << 4) +(MAJOR_NR << 8)){  \
SCpnt62kernel/blk_drv/scsi/scsi_debug.cprintk("Dev #s %x %x ",SCpnt->request.dev, target);      \
SCpnt68kernel/blk_drv/scsi/scsi_debug.cif (bufflen != 1024 && (!SCpnt->use_sg)) {printk("%x %d\n ",bufflen, SCpnt->use_sg); panic("Bad bufflen");};     \
SCpnt70kernel/blk_drv/scsi/scsi_debug.cif ((SCpnt->request.dev & 0xf) > npart) panic ("Bad partition");  \
SCpnt71kernel/blk_drv/scsi/scsi_debug.cif ((SCpnt->request.dev & 0xf) != 0) start = starts[(SCpnt->request.dev & 0xf) - 1];    \
SCpnt72kernel/blk_drv/scsi/scsi_debug.cif (SCpnt->request.cmd != RW) panic ("Wrong  operation");    \
SCpnt73kernel/blk_drv/scsi/scsi_debug.cif (SCpnt->request.sector + start != block) panic("Wrong block.");  \
SCpnt74kernel/blk_drv/scsi/scsi_debug.cif (SCpnt->request.current_nr_sectors != 2 && (!SCpnt->use_sg)) panic ("Wrong # blocks");  \
SCpnt75kernel/blk_drv/scsi/scsi_debug.cif (SCpnt->request.bh){              \
SCpnt76kernel/blk_drv/scsi/scsi_debug.cif (SCpnt->request.bh->b_size != 1024) panic ("Wrong bh size");  \
SCpnt77kernel/blk_drv/scsi/scsi_debug.cif ((SCpnt->request.bh->b_blocknr << 1) + start != block)           \
SCpnt78kernel/blk_drv/scsi/scsi_debug.c{  printk("Wrong bh block# %d %d ",SCpnt->request.bh->b_blocknr, block);  \
SCpnt80kernel/blk_drv/scsi/scsi_debug.cif (SCpnt->request.bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\
SCpnt92kernel/blk_drv/scsi/scsi_debug.cstatic void scsi_dump(Scsi_Cmnd * SCpnt, int flag){
SCpnt99kernel/blk_drv/scsi/scsi_debug.cprintk("use_sg: %d",SCpnt->use_sg);
SCpnt100kernel/blk_drv/scsi/scsi_debug.cif (SCpnt->use_sg){
SCpnt101kernel/blk_drv/scsi/scsi_debug.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt102kernel/blk_drv/scsi/scsi_debug.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt108kernel/blk_drv/scsi/scsi_debug.cprintk("nosg: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer,
SCpnt109kernel/blk_drv/scsi/scsi_debug.cSCpnt->bufflen);
SCpnt110kernel/blk_drv/scsi/scsi_debug.clpnt = (int *) SCpnt->request.buffer;
SCpnt113kernel/blk_drv/scsi/scsi_debug.clpnt = (unsigned int *) SCpnt;
SCpnt137kernel/blk_drv/scsi/scsi_debug.cint scsi_debug_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt139kernel/blk_drv/scsi/scsi_debug.cunchar *cmd = (unchar *) SCpnt->cmnd;
SCpnt147kernel/blk_drv/scsi/scsi_debug.cint target = SCpnt->target;
SCpnt148kernel/blk_drv/scsi/scsi_debug.cint bufflen = SCpnt->request_bufflen;
SCpnt153kernel/blk_drv/scsi/scsi_debug.cDEB(if (target > 1) { SCpnt->result = DID_TIME_OUT << 16;done(SCpnt);return 0;});
SCpnt155kernel/blk_drv/scsi/scsi_debug.cbuff = (unsigned char *) SCpnt->request_buffer;
SCpnt157kernel/blk_drv/scsi/scsi_debug.cif(target>=2 || SCpnt->lun != 0) {
SCpnt158kernel/blk_drv/scsi/scsi_debug.cSCpnt->result =  DID_NO_CONNECT << 16;
SCpnt159kernel/blk_drv/scsi/scsi_debug.cdone(SCpnt);
SCpnt168kernel/blk_drv/scsi/scsi_debug.cprintk("scsi_debug: Requesting sense buffer (%x %x %x %d):", SCpnt, buff, done, bufflen);
SCpnt176kernel/blk_drv/scsi/scsi_debug.cSCpnt->result = 0;
SCpnt177kernel/blk_drv/scsi/scsi_debug.cdone(SCpnt); 
SCpnt203kernel/blk_drv/scsi/scsi_debug.cif(NR_REAL < 0) NR_REAL = (SCpnt->request.dev >> 4) & 0x0f;
SCpnt222kernel/blk_drv/scsi/scsi_debug.cprintk("(r%d)",SCpnt->request.nr_sectors);
SCpnt224kernel/blk_drv/scsi/scsi_debug.cif(SCpnt->use_sg){
SCpnt229kernel/blk_drv/scsi/scsi_debug.cbh = SCpnt->request.bh;
SCpnt252kernel/blk_drv/scsi/scsi_debug.cif (SCpnt->use_sg) printk("Block %x (%d %d)\n",block, SCpnt->request.nr_sectors,
SCpnt253kernel/blk_drv/scsi/scsi_debug.cSCpnt->request.current_nr_sectors);
SCpnt277kernel/blk_drv/scsi/scsi_debug.cmemcpy(buff+64, SCpnt, sizeof(Scsi_Cmnd));
SCpnt279kernel/blk_drv/scsi/scsi_debug.cif(SCpnt->use_sg){
SCpnt291kernel/blk_drv/scsi/scsi_debug.cif (SCpnt->use_sg && !scsi_debug_errsts)
SCpnt292kernel/blk_drv/scsi/scsi_debug.cif(bh) scsi_dump(SCpnt, 0);
SCpnt304kernel/blk_drv/scsi/scsi_debug.cprintk("(w%d)",SCpnt->request.nr_sectors);
SCpnt305kernel/blk_drv/scsi/scsi_debug.cif (SCpnt->use_sg){
SCpnt306kernel/blk_drv/scsi/scsi_debug.cif ((bufflen >> 9) != SCpnt->request.nr_sectors)
SCpnt314kernel/blk_drv/scsi/scsi_debug.cscsi_dump(SCpnt,1);
SCpnt322kernel/blk_drv/scsi/scsi_debug.cSCpnt->result =  DID_NO_CONNECT << 16;
SCpnt323kernel/blk_drv/scsi/scsi_debug.cdone(SCpnt);
SCpnt335kernel/blk_drv/scsi/scsi_debug.cSCint[i] = SCpnt;
SCpnt355kernel/blk_drv/scsi/scsi_debug.cSCpnt->result = scsi_debug_errsts;
SCpnt367kernel/blk_drv/scsi/scsi_debug.cstatic void internal_done(Scsi_Cmnd * SCpnt)
SCpnt369kernel/blk_drv/scsi/scsi_debug.cinternal_done_errcode = SCpnt->result;
SCpnt373kernel/blk_drv/scsi/scsi_debug.cint scsi_debug_command(Scsi_Cmnd * SCpnt)
SCpnt376kernel/blk_drv/scsi/scsi_debug.cscsi_debug_queuecommand(SCpnt, internal_done);
SCpnt462kernel/blk_drv/scsi/scsi_debug.cint scsi_debug_abort(Scsi_Cmnd * SCpnt,int i)
SCpnt467kernel/blk_drv/scsi/scsi_debug.cSCpnt->result = i << 16;
SCpnt469kernel/blk_drv/scsi/scsi_debug.cif(SCpnt == SCint[j]) {
SCpnt471kernel/blk_drv/scsi/scsi_debug.cmy_done(SCpnt);
SCpnt73kernel/blk_drv/scsi/scsi_ioctl.cstatic void scsi_ioctl_done (Scsi_Cmnd * SCpnt)
SCpnt78kernel/blk_drv/scsi/scsi_ioctl.creq = &SCpnt->request;
SCpnt92kernel/blk_drv/scsi/scsi_ioctl.cScsi_Cmnd * SCpnt;
SCpnt96kernel/blk_drv/scsi/scsi_ioctl.cSCpnt = allocate_device(NULL, dev->index, 1);
SCpnt97kernel/blk_drv/scsi/scsi_ioctl.cscsi_do_cmd(SCpnt,  cmd, NULL,  0,
SCpnt101kernel/blk_drv/scsi/scsi_ioctl.cif (SCpnt->request.dev != 0xfffe){
SCpnt102kernel/blk_drv/scsi/scsi_ioctl.cSCpnt->request.waiting = current;
SCpnt104kernel/blk_drv/scsi/scsi_ioctl.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt107kernel/blk_drv/scsi/scsi_ioctl.cif(driver_byte(SCpnt->result) != 0)
SCpnt108kernel/blk_drv/scsi/scsi_ioctl.cswitch(SCpnt->sense_buffer[2] & 0xf) {
SCpnt121kernel/blk_drv/scsi/scsi_ioctl.cSCpnt->result = 0; /* This is no longer considered an error */
SCpnt130kernel/blk_drv/scsi/scsi_ioctl.cSCpnt->result);
SCpnt132kernel/blk_drv/scsi/scsi_ioctl.csense_class(SCpnt->sense_buffer[0]),
SCpnt133kernel/blk_drv/scsi/scsi_ioctl.csense_error(SCpnt->sense_buffer[0]),
SCpnt134kernel/blk_drv/scsi/scsi_ioctl.cSCpnt->sense_buffer[2] & 0xf);
SCpnt138kernel/blk_drv/scsi/scsi_ioctl.cresult = SCpnt->result;
SCpnt139kernel/blk_drv/scsi/scsi_ioctl.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt140kernel/blk_drv/scsi/scsi_ioctl.cwake_up(&scsi_devices[SCpnt->index].device_wait);
SCpnt149kernel/blk_drv/scsi/scsi_ioctl.cScsi_Cmnd * SCpnt;
SCpnt180kernel/blk_drv/scsi/scsi_ioctl.cSCpnt = allocate_device(NULL, dev->index, 1);
SCpnt182kernel/blk_drv/scsi/scsi_ioctl.cscsi_do_cmd(SCpnt,  cmd,  buf,  ((outlen > MAX_BUF) ? 
SCpnt186kernel/blk_drv/scsi/scsi_ioctl.cif (SCpnt->request.dev != 0xfffe){
SCpnt187kernel/blk_drv/scsi/scsi_ioctl.cSCpnt->request.waiting = current;
SCpnt189kernel/blk_drv/scsi/scsi_ioctl.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt196kernel/blk_drv/scsi/scsi_ioctl.cresult = SCpnt->result;
SCpnt197kernel/blk_drv/scsi/scsi_ioctl.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt199kernel/blk_drv/scsi/scsi_ioctl.cwake_up(&scsi_devices[SCpnt->index].device_wait);
SCpnt57kernel/blk_drv/scsi/sd.cstatic void requeue_sd_request (Scsi_Cmnd * SCpnt);
SCpnt138kernel/blk_drv/scsi/sd.cstatic void rw_intr (Scsi_Cmnd *SCpnt)
SCpnt140kernel/blk_drv/scsi/sd.cint result = SCpnt->result;
SCpnt141kernel/blk_drv/scsi/sd.cint this_count = SCpnt->bufflen >> 9;
SCpnt144kernel/blk_drv/scsi/sd.cprintk("sd%d : rw_intr(%d, %x)\n", MINOR(SCpnt->request.dev), SCpnt->host, result);
SCpnt156kernel/blk_drv/scsi/sd.cprintk("sd%d : %d sectors remain.\n", MINOR(SCpnt->request.dev), SCpnt->request.nr_sectors);
SCpnt157kernel/blk_drv/scsi/sd.cprintk("use_sg is %d\n ",SCpnt->use_sg);
SCpnt159kernel/blk_drv/scsi/sd.cif (SCpnt->use_sg) {
SCpnt162kernel/blk_drv/scsi/sd.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt163kernel/blk_drv/scsi/sd.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt168kernel/blk_drv/scsi/sd.cif (SCpnt->request.cmd == READ)
SCpnt173kernel/blk_drv/scsi/sd.cscsi_free(SCpnt->buffer, SCpnt->sglist_len);  /* Free list of scatter-gather pointers */
SCpnt175kernel/blk_drv/scsi/sd.cif (SCpnt->buffer != SCpnt->request.buffer) {
SCpnt177kernel/blk_drv/scsi/sd.cprintk("nosg: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer,
SCpnt178kernel/blk_drv/scsi/sd.cSCpnt->bufflen);
SCpnt180kernel/blk_drv/scsi/sd.cif (SCpnt->request.cmd == READ)
SCpnt181kernel/blk_drv/scsi/sd.cmemcpy(SCpnt->request.buffer, SCpnt->buffer,
SCpnt182kernel/blk_drv/scsi/sd.cSCpnt->bufflen);
SCpnt183kernel/blk_drv/scsi/sd.cscsi_free(SCpnt->buffer, SCpnt->bufflen);
SCpnt191kernel/blk_drv/scsi/sd.cif (SCpnt->request.nr_sectors > this_count)
SCpnt193kernel/blk_drv/scsi/sd.cSCpnt->request.errors = 0;
SCpnt195kernel/blk_drv/scsi/sd.cif (!SCpnt->request.bh)
SCpnt199kernel/blk_drv/scsi/sd.cMINOR(SCpnt->request.dev));
SCpnt206kernel/blk_drv/scsi/sd.cSCpnt->request.sector, this_count);
SCpnt210kernel/blk_drv/scsi/sd.cend_scsi_request(SCpnt, 1, this_count);
SCpnt211kernel/blk_drv/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt216kernel/blk_drv/scsi/sd.cif (SCpnt->use_sg) {
SCpnt219kernel/blk_drv/scsi/sd.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt220kernel/blk_drv/scsi/sd.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt222kernel/blk_drv/scsi/sd.cprintk("err: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer,
SCpnt223kernel/blk_drv/scsi/sd.cSCpnt->bufflen);
SCpnt229kernel/blk_drv/scsi/sd.cscsi_free(SCpnt->buffer, SCpnt->sglist_len);  /* Free list of scatter-gather pointers */
SCpnt232kernel/blk_drv/scsi/sd.cprintk("nosgerr: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer,
SCpnt233kernel/blk_drv/scsi/sd.cSCpnt->bufflen);
SCpnt235kernel/blk_drv/scsi/sd.cif (SCpnt->buffer != SCpnt->request.buffer)
SCpnt236kernel/blk_drv/scsi/sd.cscsi_free(SCpnt->buffer, SCpnt->bufflen);
SCpnt249kernel/blk_drv/scsi/sd.cfor(i=0;i<10;i++) printk(" %d",SCpnt->sense_buffer[i]);
SCpnt257kernel/blk_drv/scsi/sd.cif rscsi_disks[DEVICE_NR(SCpnt->request.dev)].remap
SCpnt266kernel/blk_drv/scsi/sd.cif ((SCpnt->sense_buffer[0] & 0x7f) == 0x70) {
SCpnt267kernel/blk_drv/scsi/sd.cif ((SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) {
SCpnt271kernel/blk_drv/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->changed = 1;
SCpnt272kernel/blk_drv/scsi/sd.cend_scsi_request(SCpnt, 0, this_count);
SCpnt273kernel/blk_drv/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt286kernel/blk_drv/scsi/sd.cif (SCpnt->sense_buffer[2] == ILLEGAL_REQUEST) {
SCpnt287kernel/blk_drv/scsi/sd.cif (rscsi_disks[DEVICE_NR(SCpnt->request.dev)].ten) {
SCpnt288kernel/blk_drv/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.dev)].ten = 0;
SCpnt289kernel/blk_drv/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt297kernel/blk_drv/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->host_no,
SCpnt298kernel/blk_drv/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->id,
SCpnt299kernel/blk_drv/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->lun, result);
SCpnt303kernel/blk_drv/scsi/sd.csense_class(SCpnt->sense_buffer[0]),
SCpnt304kernel/blk_drv/scsi/sd.csense_error(SCpnt->sense_buffer[0]),
SCpnt305kernel/blk_drv/scsi/sd.cSCpnt->sense_buffer[2] & 0xf);
SCpnt307kernel/blk_drv/scsi/sd.cend_scsi_request(SCpnt, 0, SCpnt->request.current_nr_sectors);
SCpnt308kernel/blk_drv/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt321kernel/blk_drv/scsi/sd.cScsi_Cmnd * SCpnt = NULL;
SCpnt345kernel/blk_drv/scsi/sd.cSCpnt = allocate_device(&CURRENT,
SCpnt347kernel/blk_drv/scsi/sd.celse SCpnt = NULL;
SCpnt357kernel/blk_drv/scsi/sd.cif (!SCpnt && NR_SD > 1){
SCpnt363kernel/blk_drv/scsi/sd.cSCpnt = request_queueable(req,
SCpnt365kernel/blk_drv/scsi/sd.cif(SCpnt) break;
SCpnt369kernel/blk_drv/scsi/sd.cif (SCpnt) {
SCpnt378kernel/blk_drv/scsi/sd.cif (!SCpnt) return; /* Could not find anything to do */
SCpnt383kernel/blk_drv/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt387kernel/blk_drv/scsi/sd.cstatic void requeue_sd_request (Scsi_Cmnd * SCpnt)
SCpnt395kernel/blk_drv/scsi/sd.cif(SCpnt->request.dev <= 0)
SCpnt398kernel/blk_drv/scsi/sd.cdev =  MINOR(SCpnt->request.dev);
SCpnt399kernel/blk_drv/scsi/sd.cblock = SCpnt->request.sector;
SCpnt406kernel/blk_drv/scsi/sd.cif (dev >= (NR_SD << 4) || block + SCpnt->request.nr_sectors > sd[dev].nr_sects)
SCpnt408kernel/blk_drv/scsi/sd.cend_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt421kernel/blk_drv/scsi/sd.cend_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt426kernel/blk_drv/scsi/sd.cprintk("sd%d : real dev = /dev/sd%d, block = %d\n", MINOR(SCpnt->request.dev), dev, block);
SCpnt429kernel/blk_drv/scsi/sd.cswitch (SCpnt->request.cmd)
SCpnt434kernel/blk_drv/scsi/sd.cend_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt443kernel/blk_drv/scsi/sd.cprintk ("Unknown sd command %d\n", SCpnt->request.cmd);
SCpnt447kernel/blk_drv/scsi/sd.cSCpnt->this_count = 0;
SCpnt449kernel/blk_drv/scsi/sd.cif (!SCpnt->request.bh || 
SCpnt450kernel/blk_drv/scsi/sd.c(SCpnt->request.nr_sectors == SCpnt->request.current_nr_sectors)) {
SCpnt453kernel/blk_drv/scsi/sd.cthis_count = SCpnt->request.nr_sectors;
SCpnt454kernel/blk_drv/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt455kernel/blk_drv/scsi/sd.cSCpnt->use_sg = 0;
SCpnt457kernel/blk_drv/scsi/sd.c} else if (scsi_hosts[SCpnt->host].sg_tablesize == 0 ||
SCpnt468kernel/blk_drv/scsi/sd.cif (scsi_hosts[SCpnt->host].sg_tablesize != 0 &&
SCpnt473kernel/blk_drv/scsi/sd.cthis_count = SCpnt->request.current_nr_sectors;
SCpnt474kernel/blk_drv/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt475kernel/blk_drv/scsi/sd.cSCpnt->use_sg = 0;
SCpnt483kernel/blk_drv/scsi/sd.cbh = SCpnt->request.bh;
SCpnt487kernel/blk_drv/scsi/sd.cwhile(bh && count < scsi_hosts[SCpnt->host].sg_tablesize) {
SCpnt493kernel/blk_drv/scsi/sd.cSCpnt->use_sg = count;  /* Number of chains */
SCpnt495kernel/blk_drv/scsi/sd.cwhile( count < (SCpnt->use_sg * sizeof(struct scatterlist))) 
SCpnt497kernel/blk_drv/scsi/sd.cSCpnt->sglist_len = count;
SCpnt501kernel/blk_drv/scsi/sd.cSCpnt->use_sg = 0;  /* No memory left - bail out */
SCpnt502kernel/blk_drv/scsi/sd.cthis_count = SCpnt->request.current_nr_sectors;
SCpnt503kernel/blk_drv/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt507kernel/blk_drv/scsi/sd.cbh = SCpnt->request.bh;
SCpnt508kernel/blk_drv/scsi/sd.cfor(count = 0, bh = SCpnt->request.bh; count < SCpnt->use_sg; 
SCpnt514kernel/blk_drv/scsi/sd.cISA_DMA_THRESHOLD & (scsi_hosts[SCpnt->host].unchecked_isa_dma)) {
SCpnt535kernel/blk_drv/scsi/sd.cthis_count = SCpnt->request.current_nr_sectors;
SCpnt536kernel/blk_drv/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt537kernel/blk_drv/scsi/sd.cSCpnt->use_sg = 0;
SCpnt538kernel/blk_drv/scsi/sd.cscsi_free(buff, SCpnt->sglist_len);
SCpnt542kernel/blk_drv/scsi/sd.cif (SCpnt->request.cmd == WRITE)
SCpnt552kernel/blk_drv/scsi/sd.cif(SCpnt->use_sg == 0){
SCpnt554kernel/blk_drv/scsi/sd.c(scsi_hosts[SCpnt->host].unchecked_isa_dma)) {
SCpnt557kernel/blk_drv/scsi/sd.cif (SCpnt->request.cmd == WRITE)
SCpnt558kernel/blk_drv/scsi/sd.cmemcpy(buff, (char *)SCpnt->request.buffer, this_count << 9);
SCpnt563kernel/blk_drv/scsi/sd.cprintk("sd%d : %s %d/%d 512 byte blocks.\n", MINOR(SCpnt->request.dev),
SCpnt564kernel/blk_drv/scsi/sd.c(SCpnt->request.cmd == WRITE) ? "writing" : "reading",
SCpnt565kernel/blk_drv/scsi/sd.cthis_count, SCpnt->request.nr_sectors);
SCpnt568kernel/blk_drv/scsi/sd.ccmd[1] = (SCpnt->lun << 5) & 0xe0;
SCpnt614kernel/blk_drv/scsi/sd.cSCpnt->transfersize = rscsi_disks[dev].sector_size;
SCpnt615kernel/blk_drv/scsi/sd.cSCpnt->underflow = this_count << 9; 
SCpnt617kernel/blk_drv/scsi/sd.cscsi_do_cmd (SCpnt, (void *) cmd, buff, 
SCpnt654kernel/blk_drv/scsi/sd.cstatic void sd_init_done (Scsi_Cmnd * SCpnt)
SCpnt659kernel/blk_drv/scsi/sd.creq = &SCpnt->request;
SCpnt676kernel/blk_drv/scsi/sd.cScsi_Cmnd * SCpnt;
SCpnt682kernel/blk_drv/scsi/sd.cSCpnt = allocate_device(NULL, rscsi_disks[i].device->index, 1);
SCpnt689kernel/blk_drv/scsi/sd.cSCpnt->request.dev = 0xffff;  /* Mark as really busy again */
SCpnt690kernel/blk_drv/scsi/sd.cSCpnt->sense_buffer[0] = 0;
SCpnt691kernel/blk_drv/scsi/sd.cSCpnt->sense_buffer[2] = 0;
SCpnt693kernel/blk_drv/scsi/sd.cscsi_do_cmd (SCpnt,
SCpnt699kernel/blk_drv/scsi/sd.cwhile(SCpnt->request.dev != 0xfffe);
SCpnt701kernel/blk_drv/scsi/sd.cif (SCpnt->request.dev != 0xfffe){
SCpnt702kernel/blk_drv/scsi/sd.cSCpnt->request.waiting = current;
SCpnt704kernel/blk_drv/scsi/sd.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt707kernel/blk_drv/scsi/sd.cthe_result = SCpnt->result;
SCpnt712kernel/blk_drv/scsi/sd.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt714kernel/blk_drv/scsi/sd.cwake_up(&scsi_devices[SCpnt->index].device_wait); 
SCpnt744kernel/blk_drv/scsi/sd.cprintk("sd%d : extended sense code = %1x \n", i, SCpnt->sense_buffer[2] & 0xf);
SCpnt755kernel/blk_drv/scsi/sd.cSCpnt->sense_buffer[2] == NOT_READY)
SCpnt385kernel/blk_drv/scsi/seagate.cint seagate_st0x_queue_command (Scsi_Cmnd * SCpnt,  void (*done)(Scsi_Cmnd *))
SCpnt391kernel/blk_drv/scsi/seagate.ccurrent_target = SCpnt->target;
SCpnt392kernel/blk_drv/scsi/seagate.ccurrent_lun = SCpnt->lun;
SCpnt393kernel/blk_drv/scsi/seagate.c(const void *) current_cmnd = SCpnt->cmnd;
SCpnt394kernel/blk_drv/scsi/seagate.ccurrent_data = SCpnt->request_buffer;
SCpnt395kernel/blk_drv/scsi/seagate.ccurrent_bufflen = SCpnt->request_bufflen;
SCpnt396kernel/blk_drv/scsi/seagate.cSCint = SCpnt;
SCpnt446kernel/blk_drv/scsi/seagate.cint seagate_st0x_command (Scsi_Cmnd * SCpnt) {
SCpnt447kernel/blk_drv/scsi/seagate.creturn internal_command (SCpnt->target, SCpnt->lun, SCpnt->cmnd, SCpnt->request_buffer,
SCpnt448kernel/blk_drv/scsi/seagate.cSCpnt->request_bufflen, 
SCpnt1345kernel/blk_drv/scsi/seagate.cint seagate_st0x_abort (Scsi_Cmnd * SCpnt, int code)
SCpnt43kernel/blk_drv/scsi/sr.cvoid requeue_sr_request (Scsi_Cmnd * SCpnt);
SCpnt109kernel/blk_drv/scsi/sr.cstatic void rw_intr (Scsi_Cmnd * SCpnt)
SCpnt111kernel/blk_drv/scsi/sr.cint result = SCpnt->result;
SCpnt112kernel/blk_drv/scsi/sr.cint this_count = SCpnt->this_count;
SCpnt115kernel/blk_drv/scsi/sr.cprintk("sr.c done: %x %x\n",result, SCpnt->request.bh->b_data);
SCpnt119kernel/blk_drv/scsi/sr.cif (SCpnt->use_sg == 0) {
SCpnt120kernel/blk_drv/scsi/sr.cif (SCpnt->buffer != SCpnt->request.buffer)
SCpnt123kernel/blk_drv/scsi/sr.coffset = (SCpnt->request.sector % 4) << 9;
SCpnt124kernel/blk_drv/scsi/sr.cmemcpy((char *)SCpnt->request.buffer, 
SCpnt125kernel/blk_drv/scsi/sr.cSCpnt->buffer + offset, 
SCpnt132kernel/blk_drv/scsi/sr.cSCpnt->request.nr_sectors > this_count && 
SCpnt133kernel/blk_drv/scsi/sr.cSCpnt->request.bh &&
SCpnt134kernel/blk_drv/scsi/sr.cSCpnt->request.bh->b_reqnext &&
SCpnt135kernel/blk_drv/scsi/sr.cSCpnt->request.bh->b_reqnext->b_size == 1024) {
SCpnt136kernel/blk_drv/scsi/sr.cmemcpy((char *)SCpnt->request.bh->b_reqnext->b_data, 
SCpnt137kernel/blk_drv/scsi/sr.cSCpnt->buffer + 1024, 
SCpnt142kernel/blk_drv/scsi/sr.cscsi_free(SCpnt->buffer, 2048);
SCpnt147kernel/blk_drv/scsi/sr.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt148kernel/blk_drv/scsi/sr.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt156kernel/blk_drv/scsi/sr.cscsi_free(SCpnt->buffer, SCpnt->sglist_len);  /* Free list of scatter-gather pointers */
SCpnt157kernel/blk_drv/scsi/sr.cif(SCpnt->request.sector % 4) this_count -= 2;
SCpnt159kernel/blk_drv/scsi/sr.cif(this_count > SCpnt->request.nr_sectors)
SCpnt164kernel/blk_drv/scsi/sr.cprintk("(%x %x %x) ",SCpnt->request.bh, SCpnt->request.nr_sectors, 
SCpnt167kernel/blk_drv/scsi/sr.cif (SCpnt->request.nr_sectors > this_count)
SCpnt169kernel/blk_drv/scsi/sr.cSCpnt->request.errors = 0;
SCpnt170kernel/blk_drv/scsi/sr.cif (!SCpnt->request.bh)
SCpnt173kernel/blk_drv/scsi/sr.cSCpnt->request.sector, this_count);
SCpnt178kernel/blk_drv/scsi/sr.cend_scsi_request(SCpnt, 1, this_count);  /* All done */
SCpnt179kernel/blk_drv/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt186kernel/blk_drv/scsi/sr.cif (SCpnt->use_sg) {
SCpnt189kernel/blk_drv/scsi/sr.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt190kernel/blk_drv/scsi/sr.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt195kernel/blk_drv/scsi/sr.cscsi_free(SCpnt->buffer, SCpnt->sglist_len);  /* Free list of scatter-gather pointers */
SCpnt197kernel/blk_drv/scsi/sr.cif (SCpnt->buffer != SCpnt->request.buffer)
SCpnt198kernel/blk_drv/scsi/sr.cscsi_free(SCpnt->buffer, SCpnt->bufflen);
SCpnt202kernel/blk_drv/scsi/sr.cif ((SCpnt->sense_buffer[0] & 0x7f) == 0x70) {
SCpnt203kernel/blk_drv/scsi/sr.cif ((SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) {
SCpnt207kernel/blk_drv/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->changed = 1;
SCpnt208kernel/blk_drv/scsi/sr.cend_scsi_request(SCpnt, 0, this_count);
SCpnt209kernel/blk_drv/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt214kernel/blk_drv/scsi/sr.cif (SCpnt->sense_buffer[2] == ILLEGAL_REQUEST) {
SCpnt216kernel/blk_drv/scsi/sr.cif (scsi_CDs[DEVICE_NR(SCpnt->request.dev)].ten) {
SCpnt217kernel/blk_drv/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.dev)].ten = 0;
SCpnt218kernel/blk_drv/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt222kernel/blk_drv/scsi/sr.cprintk("CD-ROM error: Drive reports %d.\n", SCpnt->sense_buffer[2]);        
SCpnt223kernel/blk_drv/scsi/sr.cend_scsi_request(SCpnt, 0, this_count);
SCpnt224kernel/blk_drv/scsi/sr.crequeue_sr_request(SCpnt); /* Do next request */
SCpnt230kernel/blk_drv/scsi/sr.cif (SCpnt->sense_buffer[2] == NOT_READY) {
SCpnt232kernel/blk_drv/scsi/sr.cend_scsi_request(SCpnt, 0, this_count);
SCpnt233kernel/blk_drv/scsi/sr.crequeue_sr_request(SCpnt); /* Do next request */
SCpnt241kernel/blk_drv/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->host_no, 
SCpnt242kernel/blk_drv/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->id,
SCpnt243kernel/blk_drv/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->lun,
SCpnt248kernel/blk_drv/scsi/sr.csense_class(SCpnt->sense_buffer[0]), 
SCpnt249kernel/blk_drv/scsi/sr.csense_error(SCpnt->sense_buffer[0]),
SCpnt250kernel/blk_drv/scsi/sr.cSCpnt->sense_buffer[2] & 0xf);
SCpnt252kernel/blk_drv/scsi/sr.cend_scsi_request(SCpnt, 0, SCpnt->request.current_nr_sectors);
SCpnt253kernel/blk_drv/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt277kernel/blk_drv/scsi/sr.cScsi_Cmnd * SCpnt = NULL;
SCpnt291kernel/blk_drv/scsi/sr.cSCpnt = allocate_device(&CURRENT,
SCpnt293kernel/blk_drv/scsi/sr.celse SCpnt = NULL;
SCpnt304kernel/blk_drv/scsi/sr.cif (!SCpnt && NR_SR > 1){
SCpnt310kernel/blk_drv/scsi/sr.cSCpnt = request_queueable(req,
SCpnt312kernel/blk_drv/scsi/sr.cif(SCpnt) break;
SCpnt316kernel/blk_drv/scsi/sr.cif (SCpnt) {
SCpnt325kernel/blk_drv/scsi/sr.cif (!SCpnt)
SCpnt331kernel/blk_drv/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt335kernel/blk_drv/scsi/sr.cvoid requeue_sr_request (Scsi_Cmnd * SCpnt)
SCpnt344kernel/blk_drv/scsi/sr.cif(SCpnt->request.dev <= 0)
SCpnt347kernel/blk_drv/scsi/sr.cdev =  MINOR(SCpnt->request.dev);
SCpnt348kernel/blk_drv/scsi/sr.cblock = SCpnt->request.sector;  
SCpnt355kernel/blk_drv/scsi/sr.cend_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt363kernel/blk_drv/scsi/sr.cend_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt374kernel/blk_drv/scsi/sr.cend_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt379kernel/blk_drv/scsi/sr.cswitch (SCpnt->request.cmd)
SCpnt382kernel/blk_drv/scsi/sr.cend_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt389kernel/blk_drv/scsi/sr.cprintk ("Unknown sr command %d\n", SCpnt->request.cmd);
SCpnt393kernel/blk_drv/scsi/sr.ccmd[1] = (SCpnt->lun << 5) & 0xe0;
SCpnt411kernel/blk_drv/scsi/sr.cSCpnt->use_sg = 0;
SCpnt413kernel/blk_drv/scsi/sr.cif (scsi_hosts[SCpnt->host].sg_tablesize > 0 &&
SCpnt419kernel/blk_drv/scsi/sr.cbh = SCpnt->request.bh;
SCpnt425kernel/blk_drv/scsi/sr.cthis_count = SCpnt->request.sector % 4;
SCpnt427kernel/blk_drv/scsi/sr.cwhile(bh && count < scsi_hosts[SCpnt->host].sg_tablesize) {
SCpnt436kernel/blk_drv/scsi/sr.cif (count < scsi_hosts[SCpnt->host].sg_tablesize) {
SCpnt445kernel/blk_drv/scsi/sr.cSCpnt->use_sg = count;  /* Number of chains */
SCpnt447kernel/blk_drv/scsi/sr.cwhile( count < (SCpnt->use_sg * sizeof(struct scatterlist))) 
SCpnt449kernel/blk_drv/scsi/sr.cSCpnt->sglist_len = count;
SCpnt453kernel/blk_drv/scsi/sr.cSCpnt->use_sg = 0;  /* No memory left - bail out */
SCpnt457kernel/blk_drv/scsi/sr.cbh = SCpnt->request.bh;
SCpnt458kernel/blk_drv/scsi/sr.cif(SCpnt->request.sector % 4) {
SCpnt459kernel/blk_drv/scsi/sr.csgpnt[count].length = (SCpnt->request.sector % 4) << 9;
SCpnt466kernel/blk_drv/scsi/sr.cfor(bh = SCpnt->request.bh; count < SCpnt->use_sg; 
SCpnt477kernel/blk_drv/scsi/sr.cif (count+1 != SCpnt->use_sg) panic("Bad sr request list");
SCpnt481kernel/blk_drv/scsi/sr.cISA_DMA_THRESHOLD & (scsi_hosts[SCpnt->host].unchecked_isa_dma)) {
SCpnt502kernel/blk_drv/scsi/sr.cSCpnt->use_sg = 0;
SCpnt503kernel/blk_drv/scsi/sr.cscsi_free(buffer, SCpnt->sglist_len);
SCpnt509kernel/blk_drv/scsi/sr.cprintk("SG: %d %d %d %d %d *** ",SCpnt->use_sg, SCpnt->request.sector,
SCpnt511kernel/blk_drv/scsi/sr.cSCpnt->request.current_nr_sectors,
SCpnt512kernel/blk_drv/scsi/sr.cSCpnt->request.nr_sectors);
SCpnt513kernel/blk_drv/scsi/sr.cfor(count=0; count<SCpnt->use_sg; count++)
SCpnt522kernel/blk_drv/scsi/sr.cif (SCpnt->use_sg == 0){
SCpnt524kernel/blk_drv/scsi/sr.cif (!SCpnt->request.bh)    
SCpnt525kernel/blk_drv/scsi/sr.cthis_count = SCpnt->request.nr_sectors;
SCpnt527kernel/blk_drv/scsi/sr.cthis_count = (SCpnt->request.bh->b_size >> 9);
SCpnt543kernel/blk_drv/scsi/sr.cbuffer = SCpnt->request.buffer;
SCpnt545kernel/blk_drv/scsi/sr.c(scsi_hosts[SCpnt->host].unchecked_isa_dma))
SCpnt595kernel/blk_drv/scsi/sr.cSCpnt->this_count = this_count;
SCpnt596kernel/blk_drv/scsi/sr.cscsi_do_cmd (SCpnt, (void *) cmd, buffer, 
SCpnt612kernel/blk_drv/scsi/sr.cstatic void sr_init_done (Scsi_Cmnd * SCpnt)
SCpnt617kernel/blk_drv/scsi/sr.creq = &SCpnt->request;
SCpnt634kernel/blk_drv/scsi/sr.cScsi_Cmnd * SCpnt;
SCpnt648kernel/blk_drv/scsi/sr.cSCpnt = allocate_device(NULL, scsi_CDs[i].device->index, 1);
SCpnt655kernel/blk_drv/scsi/sr.cSCpnt->request.dev = 0xffff;  /* Mark as really busy */
SCpnt657kernel/blk_drv/scsi/sr.cscsi_do_cmd (SCpnt,
SCpnt663kernel/blk_drv/scsi/sr.cwhile(SCpnt->request.dev != 0xfffe);
SCpnt665kernel/blk_drv/scsi/sr.cif (SCpnt->request.dev != 0xfffe){
SCpnt666kernel/blk_drv/scsi/sr.cSCpnt->request.waiting = current;
SCpnt668kernel/blk_drv/scsi/sr.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt671kernel/blk_drv/scsi/sr.cthe_result = SCpnt->result;
SCpnt676kernel/blk_drv/scsi/sr.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt678kernel/blk_drv/scsi/sr.cwake_up(&scsi_devices[SCpnt->index].device_wait); 
SCpnt20kernel/blk_drv/scsi/sr_ioctl.cstatic void sr_ioctl_done(Scsi_Cmnd * SCpnt)
SCpnt25kernel/blk_drv/scsi/sr_ioctl.creq = &SCpnt->request;
SCpnt42kernel/blk_drv/scsi/sr_ioctl.cScsi_Cmnd * SCpnt;
SCpnt45kernel/blk_drv/scsi/sr_ioctl.cSCpnt = allocate_device(NULL, scsi_CDs[target].device->index, 1);
SCpnt46kernel/blk_drv/scsi/sr_ioctl.cscsi_do_cmd(SCpnt,
SCpnt51kernel/blk_drv/scsi/sr_ioctl.cif (SCpnt->request.dev != 0xfffe){
SCpnt52kernel/blk_drv/scsi/sr_ioctl.cSCpnt->request.waiting = current;
SCpnt54kernel/blk_drv/scsi/sr_ioctl.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt57kernel/blk_drv/scsi/sr_ioctl.cresult = SCpnt->result;
SCpnt61kernel/blk_drv/scsi/sr_ioctl.cswitch(SCpnt->sense_buffer[2] & 0xf) {
SCpnt79kernel/blk_drv/scsi/sr_ioctl.csense_class(SCpnt->sense_buffer[0]), 
SCpnt80kernel/blk_drv/scsi/sr_ioctl.csense_error(SCpnt->sense_buffer[0]),
SCpnt81kernel/blk_drv/scsi/sr_ioctl.cSCpnt->sense_buffer[2] & 0xf);
SCpnt85kernel/blk_drv/scsi/sr_ioctl.cresult = SCpnt->result;
SCpnt86kernel/blk_drv/scsi/sr_ioctl.cSCpnt->request.dev = -1; /* Deallocate */
SCpnt87kernel/blk_drv/scsi/sr_ioctl.cwake_up(&scsi_devices[SCpnt->index].device_wait);
SCpnt92kernel/blk_drv/scsi/st.cstatic void st_sleep_done (Scsi_Cmnd * SCpnt)
SCpnt96kernel/blk_drv/scsi/st.cif ((st_nbr = SCpnt->request.dev) < NR_ST && st_nbr >= 0) {
SCpnt98kernel/blk_drv/scsi/st.c(SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt99kernel/blk_drv/scsi/st.c(SCpnt->sense_buffer[2] & 0x40))
SCpnt102kernel/blk_drv/scsi/st.cscsi_tapes[st_nbr].buffer->last_result = SCpnt->result;
SCpnt104kernel/blk_drv/scsi/st.cSCpnt->request.dev = -1;
SCpnt106kernel/blk_drv/scsi/st.cSCpnt->request.dev = 0xffff;
SCpnt193kernel/blk_drv/scsi/st.cScsi_Cmnd *SCpnt;
SCpnt210kernel/blk_drv/scsi/st.cSCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1);
SCpnt220kernel/blk_drv/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt228kernel/blk_drv/scsi/st.cSCpnt->request.dev = dev;
SCpnt229kernel/blk_drv/scsi/st.cscsi_do_cmd (SCpnt,
SCpnt233kernel/blk_drv/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting );
SCpnt235kernel/blk_drv/scsi/st.cif (SCpnt->result != 0) {
SCpnt238kernel/blk_drv/scsi/st.cst_chk_result(dev, SCpnt->result, SCpnt->sense_buffer);
SCpnt246kernel/blk_drv/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt291kernel/blk_drv/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt322kernel/blk_drv/scsi/st.cSCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1);
SCpnt323kernel/blk_drv/scsi/st.cif (!SCpnt) {
SCpnt328kernel/blk_drv/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt331kernel/blk_drv/scsi/st.cSCpnt->request.dev = dev;
SCpnt332kernel/blk_drv/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt336kernel/blk_drv/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting );
SCpnt338kernel/blk_drv/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt339kernel/blk_drv/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == UNIT_ATTENTION) { /* New media? */
SCpnt341kernel/blk_drv/scsi/st.cdecode_sns(dev, SCpnt->sense_buffer);
SCpnt343kernel/blk_drv/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt346kernel/blk_drv/scsi/st.cSCpnt->request.dev = dev;
SCpnt347kernel/blk_drv/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt351kernel/blk_drv/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting );
SCpnt354kernel/blk_drv/scsi/st.cif (SCpnt->result != 0) {
SCpnt356kernel/blk_drv/scsi/st.cdecode_sns(dev, SCpnt->sense_buffer);
SCpnt358kernel/blk_drv/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt359kernel/blk_drv/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == NO_TAPE)
SCpnt362kernel/blk_drv/scsi/st.cprintk("st%d: Error %x.\n", dev, SCpnt->result);
SCpnt365kernel/blk_drv/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt369kernel/blk_drv/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt372kernel/blk_drv/scsi/st.cSCpnt->request.dev = dev;
SCpnt373kernel/blk_drv/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt377kernel/blk_drv/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting );
SCpnt379kernel/blk_drv/scsi/st.cif (!SCpnt->result && !SCpnt->sense_buffer[0]) {
SCpnt396kernel/blk_drv/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt400kernel/blk_drv/scsi/st.cSCpnt->request.dev = dev;
SCpnt401kernel/blk_drv/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt405kernel/blk_drv/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting );
SCpnt407kernel/blk_drv/scsi/st.ci = st_chk_result(dev, SCpnt->result, SCpnt->sense_buffer);
SCpnt415kernel/blk_drv/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt486kernel/blk_drv/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt501kernel/blk_drv/scsi/st.cSCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1);
SCpnt503kernel/blk_drv/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt507kernel/blk_drv/scsi/st.cSCpnt->request.dev = dev;
SCpnt508kernel/blk_drv/scsi/st.cscsi_do_cmd( SCpnt,
SCpnt512kernel/blk_drv/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting );
SCpnt514kernel/blk_drv/scsi/st.cif (SCpnt->result) {
SCpnt517kernel/blk_drv/scsi/st.cst_chk_result(dev, SCpnt->result, SCpnt->sense_buffer);
SCpnt520kernel/blk_drv/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt552kernel/blk_drv/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt589kernel/blk_drv/scsi/st.cSCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1);
SCpnt611kernel/blk_drv/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt612kernel/blk_drv/scsi/st.cSCpnt->request.dev = dev;
SCpnt613kernel/blk_drv/scsi/st.cscsi_do_cmd (SCpnt,
SCpnt618kernel/blk_drv/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting );
SCpnt620kernel/blk_drv/scsi/st.cif (SCpnt->result || SCpnt->sense_buffer[0] != 0) {
SCpnt623kernel/blk_drv/scsi/st.cst_chk_result(dev, SCpnt->result, SCpnt->sense_buffer);
SCpnt625kernel/blk_drv/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt626kernel/blk_drv/scsi/st.c(SCpnt->sense_buffer[2] & 0x40))
SCpnt630kernel/blk_drv/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt651kernel/blk_drv/scsi/st.cdo_count = st_chk_result(dev, SCpnt->result, SCpnt->sense_buffer);
SCpnt653kernel/blk_drv/scsi/st.cSCpnt->request.dev = -1;
SCpnt668kernel/blk_drv/scsi/st.cSCpnt->result = scsi_tapes[dev].buffer->last_result = -1;
SCpnt669kernel/blk_drv/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt670kernel/blk_drv/scsi/st.cSCpnt->request.dev = dev;
SCpnt671kernel/blk_drv/scsi/st.cscsi_do_cmd (SCpnt,
SCpnt678kernel/blk_drv/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt691kernel/blk_drv/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt719kernel/blk_drv/scsi/st.cSCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1);
SCpnt734kernel/blk_drv/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt735kernel/blk_drv/scsi/st.cSCpnt->request.dev = dev;
SCpnt736kernel/blk_drv/scsi/st.cscsi_do_cmd (SCpnt,
SCpnt741kernel/blk_drv/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting );
SCpnt746kernel/blk_drv/scsi/st.cif (SCpnt->result != 0 || SCpnt->sense_buffer[0] != 0) {
SCpnt749kernel/blk_drv/scsi/st.cSCpnt->sense_buffer[0], SCpnt->sense_buffer[1],
SCpnt750kernel/blk_drv/scsi/st.cSCpnt->sense_buffer[2], SCpnt->sense_buffer[3],
SCpnt751kernel/blk_drv/scsi/st.cSCpnt->sense_buffer[4], SCpnt->sense_buffer[5],
SCpnt752kernel/blk_drv/scsi/st.cSCpnt->sense_buffer[6], SCpnt->sense_buffer[7]);
SCpnt754kernel/blk_drv/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70) { /* extended sense */
SCpnt756kernel/blk_drv/scsi/st.cif ((SCpnt->sense_buffer[2] & 0xe0) != 0) { /* EOF, EOM, or ILI */
SCpnt757kernel/blk_drv/scsi/st.ctransfer = (SCpnt->sense_buffer[3] << 24) |
SCpnt758kernel/blk_drv/scsi/st.c(SCpnt->sense_buffer[4] << 16) |
SCpnt759kernel/blk_drv/scsi/st.c(SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6];
SCpnt761kernel/blk_drv/scsi/st.cif (SCpnt->sense_buffer[2] & 0x20) {
SCpnt763kernel/blk_drv/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt766kernel/blk_drv/scsi/st.celse if (SCpnt->sense_buffer[2] & 0x40) {
SCpnt776kernel/blk_drv/scsi/st.celse if (SCpnt->sense_buffer[2] & 0x80) {
SCpnt790kernel/blk_drv/scsi/st.cSCpnt->sense_buffer[2] & 0x0f);
SCpnt791kernel/blk_drv/scsi/st.cdecode_sns(dev, SCpnt->sense_buffer);
SCpnt793kernel/blk_drv/scsi/st.cSCpnt->request.dev = -1;
SCpnt801kernel/blk_drv/scsi/st.ctransfer = st_chk_result(dev, SCpnt->result, SCpnt->sense_buffer);
SCpnt802kernel/blk_drv/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt830kernel/blk_drv/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt840kernel/blk_drv/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt855kernel/blk_drv/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt1045kernel/blk_drv/scsi/st.cSCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1);
SCpnt1046kernel/blk_drv/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt1047kernel/blk_drv/scsi/st.cSCpnt->request.dev = dev;
SCpnt1048kernel/blk_drv/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt1052kernel/blk_drv/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting );
SCpnt1054kernel/blk_drv/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt1056kernel/blk_drv/scsi/st.cioctl_result = st_chk_result(dev, SCpnt->result, SCpnt->sense_buffer);
SCpnt1096kernel/blk_drv/scsi/st.cScsi_Cmnd *SCpnt;
SCpnt1153kernel/blk_drv/scsi/st.cSCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1);
SCpnt1155kernel/blk_drv/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt1165kernel/blk_drv/scsi/st.cSCpnt->request.dev = dev;
SCpnt1166kernel/blk_drv/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt1167kernel/blk_drv/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt1171kernel/blk_drv/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting );
SCpnt1173kernel/blk_drv/scsi/st.cif (SCpnt->result || SCpnt->sense_buffer[0]) {
SCpnt1194kernel/blk_drv/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt38kernel/blk_drv/scsi/st.hScsi_Cmnd SCpnt;
SCpnt177kernel/blk_drv/scsi/ultrastor.cstatic inline void build_sg_list(Scsi_Cmnd *SCpnt);
SCpnt336kernel/blk_drv/scsi/ultrastor.cstatic inline void build_sg_list(Scsi_Cmnd *SCpnt)
SCpnt343kernel/blk_drv/scsi/ultrastor.csl = (struct scatterlist *) SCpnt->request_buffer;
SCpnt344kernel/blk_drv/scsi/ultrastor.cSCpnt->host_scribble = scsi_malloc(512);
SCpnt345kernel/blk_drv/scsi/ultrastor.cif (SCpnt->host_scribble == NULL)
SCpnt349kernel/blk_drv/scsi/ultrastor.csglist = (ultrastor_sg_list *) SCpnt->host_scribble;
SCpnt350kernel/blk_drv/scsi/ultrastor.cfor (i = 0; i < SCpnt->use_sg; i++) {
SCpnt355kernel/blk_drv/scsi/ultrastor.cmscp.number_of_sg_list = (char) SCpnt->use_sg;
SCpnt362kernel/blk_drv/scsi/ultrastor.cint ultrastor_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt388kernel/blk_drv/scsi/ultrastor.cmscp.target_id = SCpnt->target;
SCpnt390kernel/blk_drv/scsi/ultrastor.cmscp.lun = SCpnt->lun;
SCpnt391kernel/blk_drv/scsi/ultrastor.cif (SCpnt->use_sg) {
SCpnt394kernel/blk_drv/scsi/ultrastor.cbuild_sg_list(SCpnt);
SCpnt399kernel/blk_drv/scsi/ultrastor.cmscp.transfer_data = *(Longword *)&SCpnt->request_buffer;
SCpnt400kernel/blk_drv/scsi/ultrastor.cmscp.transfer_data_length = *(Longword *)&SCpnt->request_bufflen;
SCpnt401kernel/blk_drv/scsi/ultrastor.cSCpnt->host_scribble = NULL;
SCpnt406kernel/blk_drv/scsi/ultrastor.cmscp.length_of_scsi_cdbs = COMMAND_SIZE(*(unsigned char *)SCpnt->cmnd);
SCpnt407kernel/blk_drv/scsi/ultrastor.cmemcpy(mscp.scsi_cdbs, SCpnt->cmnd, mscp.length_of_scsi_cdbs);
SCpnt434kernel/blk_drv/scsi/ultrastor.cSCint = SCpnt;
SCpnt443kernel/blk_drv/scsi/ultrastor.cint ultrastor_abort(Scsi_Cmnd *SCpnt, int code)
SCpnt452kernel/blk_drv/scsi/ultrastor.cif (SCpnt->host_scribble)
SCpnt453kernel/blk_drv/scsi/ultrastor.cscsi_free(SCpnt->host_scribble, 512);
SCpnt283kernel/blk_drv/scsi/wd7000.cstatic void wd7000_scsi_done(Scsi_Cmnd * SCpnt)
SCpnt285kernel/blk_drv/scsi/wd7000.cDEB(printk("wd7000_scsi_done: %06x\n",SCpnt);)
SCpnt286kernel/blk_drv/scsi/wd7000.cSCpnt->SCp.phase = 0;
SCpnt296kernel/blk_drv/scsi/wd7000.cScsi_Cmnd *SCpnt;
SCpnt326kernel/blk_drv/scsi/wd7000.cSCpnt = scb->SCpnt;
SCpnt327kernel/blk_drv/scsi/wd7000.cif (--(SCpnt->SCp.phase) <= 0)  {  /* all scbs for SCpnt are done */
SCpnt331kernel/blk_drv/scsi/wd7000.cSCpnt->result = errstatus;
SCpnt333kernel/blk_drv/scsi/wd7000.cif (SCpnt->host_scribble != NULL)
SCpnt334kernel/blk_drv/scsi/wd7000.cscsi_free(SCpnt->host_scribble,WD7000_SCRIBBLE);
SCpnt337kernel/blk_drv/scsi/wd7000.cSCpnt->scsi_done(SCpnt);
SCpnt351kernel/blk_drv/scsi/wd7000.cint wd7000_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt359kernel/blk_drv/scsi/wd7000.ccdb = (unchar *) SCpnt->cmnd;
SCpnt361kernel/blk_drv/scsi/wd7000.cidlun = ((SCpnt->target << 5) & 0xe0) | (SCpnt->lun & 7);
SCpnt362kernel/blk_drv/scsi/wd7000.cSCpnt->scsi_done = done;
SCpnt363kernel/blk_drv/scsi/wd7000.cSCpnt->SCp.phase = 1;
SCpnt368kernel/blk_drv/scsi/wd7000.cscb->SCpnt = SCpnt;         /* so we can find stuff later */
SCpnt369kernel/blk_drv/scsi/wd7000.cSCpnt->host_scribble = NULL;
SCpnt371kernel/blk_drv/scsi/wd7000.cSCpnt->request_bufflen, SCpnt->bufflen);)
SCpnt373kernel/blk_drv/scsi/wd7000.cif (SCpnt->use_sg)  {
SCpnt374kernel/blk_drv/scsi/wd7000.cstruct scatterlist *sg = (struct scatterlist *) SCpnt->request_buffer;
SCpnt381kernel/blk_drv/scsi/wd7000.cprintk("Using scatter/gather with %d elements.\n",SCpnt->use_sg);
SCpnt388kernel/blk_drv/scsi/wd7000.cif (SCpnt->use_sg > WD7000_SG)
SCpnt391kernel/blk_drv/scsi/wd7000.cSCpnt->host_scribble = scsi_malloc(WD7000_SCRIBBLE);
SCpnt392kernel/blk_drv/scsi/wd7000.csgb = (Sgb *) SCpnt->host_scribble;
SCpnt398kernel/blk_drv/scsi/wd7000.cany2scsi(scb->maxlen, SCpnt->use_sg * sizeof (Sgb) );
SCpnt400kernel/blk_drv/scsi/wd7000.cfor (i = 0;  i < SCpnt->use_sg;  i++)  {
SCpnt406kernel/blk_drv/scsi/wd7000.cscsi2int(scb->maxlen), SCpnt->use_sg);)
SCpnt409kernel/blk_drv/scsi/wd7000.cany2scsi(scb->dataptr, SCpnt->request_buffer);
SCpnt410kernel/blk_drv/scsi/wd7000.cany2scsi(scb->maxlen, SCpnt->request_bufflen);
SCpnt417kernel/blk_drv/scsi/wd7000.cint wd7000_command(Scsi_Cmnd *SCpnt)
SCpnt419kernel/blk_drv/scsi/wd7000.cwd7000_queuecommand(SCpnt, wd7000_scsi_done);
SCpnt421kernel/blk_drv/scsi/wd7000.cwhile (SCpnt->SCp.phase > 0);  /* phase counts scbs down to 0 */
SCpnt423kernel/blk_drv/scsi/wd7000.creturn SCpnt->result;
SCpnt577kernel/blk_drv/scsi/wd7000.cint wd7000_abort(Scsi_Cmnd * SCpnt, int i)
SCpnt580kernel/blk_drv/scsi/wd7000.cprintk("wd7000_abort: Scsi_Cmnd = 0x%08x, code = %d ", SCpnt, i);
SCpnt581kernel/blk_drv/scsi/wd7000.cprintk("id %d lun %d cdb", SCpnt->target, SCpnt->lun);
SCpnt582kernel/blk_drv/scsi/wd7000.c{  int j;  unchar *cdbj = (unchar *) SCpnt->cmnd;
SCpnt584kernel/blk_drv/scsi/wd7000.cprintk(" result %08x\n", SCpnt->result);
SCpnt141kernel/blk_drv/scsi/wd7000.hScsi_Cmnd *SCpnt;             /* Scsi_Cmnd using this SCB */