taglinefilesource code
SCpnt2130drivers/scsi/NCR5380.cint NCR5380_reset (Scsi_Cmnd * SCpnt) {
SCpnt2135drivers/scsi/NCR5380.cinstance = SCpnt->host;
SCpnt2142drivers/scsi/NCR5380.cif (SCpnt) SCpnt->flags |= NEEDS_JUMPSTART;
SCpnt713drivers/scsi/aha152x.cint aha152x_queue( Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt726drivers/scsi/aha152x.cSCpnt->target,
SCpnt727drivers/scsi/aha152x.cSCpnt->lun,
SCpnt728drivers/scsi/aha152x.c*(unsigned char *)SCpnt->cmnd,
SCpnt729drivers/scsi/aha152x.cSCpnt->use_sg,
SCpnt730drivers/scsi/aha152x.cSCpnt->request_bufflen );
SCpnt734drivers/scsi/aha152x.cSCpnt->scsi_done =       done;
SCpnt742drivers/scsi/aha152x.cSCpnt->SCp.phase = not_issued;
SCpnt743drivers/scsi/aha152x.cif (SCpnt->use_sg)
SCpnt745drivers/scsi/aha152x.cSCpnt->SCp.buffer           = (struct scatterlist *)SCpnt->request_buffer;
SCpnt746drivers/scsi/aha152x.cSCpnt->SCp.ptr              = SCpnt->SCp.buffer->address;
SCpnt747drivers/scsi/aha152x.cSCpnt->SCp.this_residual    = SCpnt->SCp.buffer->length;
SCpnt748drivers/scsi/aha152x.cSCpnt->SCp.buffers_residual = SCpnt->use_sg - 1;
SCpnt752drivers/scsi/aha152x.cSCpnt->SCp.ptr              = (char *)SCpnt->request_buffer;
SCpnt753drivers/scsi/aha152x.cSCpnt->SCp.this_residual    = SCpnt->request_bufflen;
SCpnt754drivers/scsi/aha152x.cSCpnt->SCp.buffer           = NULL;
SCpnt755drivers/scsi/aha152x.cSCpnt->SCp.buffers_residual = 0;
SCpnt758drivers/scsi/aha152x.cSCpnt->SCp.Status              = CHECK_CONDITION;
SCpnt759drivers/scsi/aha152x.cSCpnt->SCp.Message             = 0;
SCpnt760drivers/scsi/aha152x.cSCpnt->SCp.have_data_in        = 0;
SCpnt761drivers/scsi/aha152x.cSCpnt->SCp.sent_command        = 0;
SCpnt772drivers/scsi/aha152x.cappend_SC( &issue_SC, SCpnt);
SCpnt788drivers/scsi/aha152x.cint aha152x_command( Scsi_Cmnd *SCpnt )
SCpnt798drivers/scsi/aha152x.cint aha152x_abort( Scsi_Cmnd *SCpnt, int code )
SCpnt805drivers/scsi/aha152x.cprintk("aha152x: abort(), SCpnt=0x%08x, ", (unsigned long) SCpnt );
SCpnt812drivers/scsi/aha152x.cptr && ptr!=SCpnt;
SCpnt840drivers/scsi/aha152x.cptr && ptr!=SCpnt;
SCpnt386drivers/scsi/aha1542.cint aha1542_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt390drivers/scsi/aha1542.cunchar *cmd = (unchar *) SCpnt->cmnd;
SCpnt391drivers/scsi/aha1542.cunchar target = SCpnt->target;
SCpnt392drivers/scsi/aha1542.cunchar lun = SCpnt->lun;
SCpnt393drivers/scsi/aha1542.cvoid *buff = SCpnt->request_buffer;
SCpnt394drivers/scsi/aha1542.cint bufflen = SCpnt->request_bufflen;
SCpnt401drivers/scsi/aha1542.cmb = HOSTDATA(SCpnt->host)->mb;
SCpnt402drivers/scsi/aha1542.cccb = HOSTDATA(SCpnt->host)->ccb;
SCpnt405drivers/scsi/aha1542.cSCpnt->result = DID_TIME_OUT << 16;
SCpnt406drivers/scsi/aha1542.cdone(SCpnt); return 0;});
SCpnt410drivers/scsi/aha1542.cif (bufflen != sizeof(SCpnt->sense_buffer)) {
SCpnt415drivers/scsi/aha1542.cSCpnt->result = 0;
SCpnt416drivers/scsi/aha1542.cdone(SCpnt); 
SCpnt442drivers/scsi/aha1542.cmbo = HOSTDATA(SCpnt->host)->aha1542_last_mbo_used + 1;
SCpnt446drivers/scsi/aha1542.cif(mb[mbo].status == 0 && HOSTDATA(SCpnt->host)->SCint[mbo] == NULL)
SCpnt450drivers/scsi/aha1542.c} while (mbo != HOSTDATA(SCpnt->host)->aha1542_last_mbo_used);
SCpnt452drivers/scsi/aha1542.cif(mb[mbo].status || HOSTDATA(SCpnt->host)->SCint[mbo])
SCpnt455drivers/scsi/aha1542.cHOSTDATA(SCpnt->host)->SCint[mbo] = SCpnt;  /* This will effectively prevent someone else from
SCpnt458drivers/scsi/aha1542.cHOSTDATA(SCpnt->host)->aha1542_last_mbo_used = mbo;    
SCpnt479drivers/scsi/aha1542.cif (SCpnt->use_sg) {
SCpnt487drivers/scsi/aha1542.cSCpnt->host_scribble = (unsigned char *) scsi_malloc(512);
SCpnt488drivers/scsi/aha1542.csgpnt = (struct scatterlist *) SCpnt->request_buffer;
SCpnt489drivers/scsi/aha1542.ccptr = (struct chain *) SCpnt->host_scribble; 
SCpnt491drivers/scsi/aha1542.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt492drivers/scsi/aha1542.cif(sgpnt[i].length == 0 || SCpnt->use_sg > 16 || 
SCpnt495drivers/scsi/aha1542.cprintk("Bad segment list supplied to aha1542.c (%d, %d)\n",SCpnt->use_sg,i);
SCpnt496drivers/scsi/aha1542.cfor(i=0;i<SCpnt->use_sg;i++){
SCpnt509drivers/scsi/aha1542.cany2scsi(ccb[mbo].datalen, SCpnt->use_sg * sizeof(struct chain));
SCpnt519drivers/scsi/aha1542.cSCpnt->host_scribble = NULL;
SCpnt538drivers/scsi/aha1542.cSCpnt->scsi_done = done;
SCpnt540drivers/scsi/aha1542.caha1542_out(SCpnt->host->io_port, &ahacmd, 1);    /* start scsi command */
SCpnt551drivers/scsi/aha1542.cstatic void internal_done(Scsi_Cmnd * SCpnt)
SCpnt553drivers/scsi/aha1542.cSCpnt->SCp.Status++;
SCpnt556drivers/scsi/aha1542.cint aha1542_command(Scsi_Cmnd * SCpnt)
SCpnt560drivers/scsi/aha1542.caha1542_queuecommand(SCpnt, internal_done);
SCpnt562drivers/scsi/aha1542.cSCpnt->SCp.Status = 0;
SCpnt563drivers/scsi/aha1542.cwhile (!SCpnt->SCp.Status);
SCpnt564drivers/scsi/aha1542.creturn SCpnt->result;
SCpnt819drivers/scsi/aha1542.cint aha1542_abort(Scsi_Cmnd * SCpnt, int i)
SCpnt829drivers/scsi/aha1542.cif (SCpnt == HOSTDATA(SCpnt->host)->SCint[mbo]){
SCpnt843drivers/scsi/aha1542.cint aha1542_reset(Scsi_Cmnd * SCpnt)
SCpnt846drivers/scsi/aha1542.cif(SCpnt) SCpnt->flags |= NEEDS_JUMPSTART;
SCpnt198drivers/scsi/aha1740.cSCtmp = ecbptr->SCpnt;
SCpnt238drivers/scsi/aha1740.cint aha1740_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt241drivers/scsi/aha1740.cunchar *cmd = (unchar *) SCpnt->cmnd;
SCpnt242drivers/scsi/aha1740.cunchar target = SCpnt->target;
SCpnt243drivers/scsi/aha1740.cvoid *buff = SCpnt->request_buffer;
SCpnt244drivers/scsi/aha1740.cint bufflen = SCpnt->request_bufflen;
SCpnt251drivers/scsi/aha1740.cif (bufflen != sizeof(SCpnt->sense_buffer))
SCpnt256drivers/scsi/aha1740.cSCpnt->result = 0;
SCpnt257drivers/scsi/aha1740.cdone(SCpnt); 
SCpnt309drivers/scsi/aha1740.cif (SCpnt->use_sg)
SCpnt318drivers/scsi/aha1740.cSCpnt->host_scribble = (unsigned char *) scsi_malloc(512);
SCpnt319drivers/scsi/aha1740.csgpnt = (struct scatterlist *) SCpnt->request_buffer;
SCpnt320drivers/scsi/aha1740.ccptr = (struct aha1740_chain *) SCpnt->host_scribble; 
SCpnt322drivers/scsi/aha1740.cfor(i=0; i<SCpnt->use_sg; i++)
SCpnt327drivers/scsi/aha1740.cecb[ecbno].datalen = SCpnt->use_sg * sizeof(struct aha1740_chain);
SCpnt337drivers/scsi/aha1740.cSCpnt->host_scribble = NULL;
SCpnt341drivers/scsi/aha1740.cecb[ecbno].lun = SCpnt->lun;
SCpnt349drivers/scsi/aha1740.cecb[ecbno].SCpnt = SCpnt;
SCpnt403drivers/scsi/aha1740.cstatic void internal_done(Scsi_Cmnd * SCpnt)
SCpnt405drivers/scsi/aha1740.cinternal_done_errcode = SCpnt->result;
SCpnt409drivers/scsi/aha1740.cint aha1740_command(Scsi_Cmnd * SCpnt)
SCpnt411drivers/scsi/aha1740.caha1740_queuecommand(SCpnt, internal_done);
SCpnt477drivers/scsi/aha1740.cint aha1740_abort(Scsi_Cmnd * SCpnt, int i)
SCpnt487drivers/scsi/aha1740.cint aha1740_reset(Scsi_Cmnd * SCpnt)
SCpnt490drivers/scsi/aha1740.cif (SCpnt) SCpnt->flags |= NEEDS_JUMPSTART;
SCpnt142drivers/scsi/aha1740.hScsi_Cmnd *SCpnt;    /* Link to the SCSI Command Block */
SCpnt360drivers/scsi/constants.cvoid print_sense(char * devclass, Scsi_Cmnd * SCpnt)
SCpnt364drivers/scsi/constants.cunsigned char * sense_buffer = SCpnt->sense_buffer;
SCpnt366drivers/scsi/constants.cint dev = SCpnt->request.dev;
SCpnt374drivers/scsi/constants.cif(s > sizeof(SCpnt->sense_buffer)) s = sizeof(SCpnt->sense_buffer);
SCpnt1219drivers/scsi/fdomain.cint fdomain_16x0_queue( Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt1226drivers/scsi/fdomain.cSCpnt->target,
SCpnt1227drivers/scsi/fdomain.c*(unsigned char *)SCpnt->cmnd,
SCpnt1228drivers/scsi/fdomain.cSCpnt->use_sg,
SCpnt1229drivers/scsi/fdomain.cSCpnt->request_bufflen );
SCpnt1234drivers/scsi/fdomain.ccurrent_SC            = SCpnt; /* Save this for the done function */
SCpnt1277drivers/scsi/fdomain.cstatic void internal_done( Scsi_Cmnd *SCpnt )
SCpnt1279drivers/scsi/fdomain.cinternal_done_errcode = SCpnt->result;
SCpnt1283drivers/scsi/fdomain.cint fdomain_16x0_command( Scsi_Cmnd *SCpnt )
SCpnt1285drivers/scsi/fdomain.cfdomain_16x0_queue( SCpnt, internal_done );
SCpnt1295drivers/scsi/fdomain.cvoid print_info( Scsi_Cmnd *SCpnt )
SCpnt1302drivers/scsi/fdomain.cswitch (SCpnt->SCp.phase) {
SCpnt1310drivers/scsi/fdomain.cSCpnt->SCp.phase,
SCpnt1311drivers/scsi/fdomain.cSCpnt->target,
SCpnt1312drivers/scsi/fdomain.c*(unsigned char *)SCpnt->cmnd,
SCpnt1313drivers/scsi/fdomain.cSCpnt->use_sg,
SCpnt1314drivers/scsi/fdomain.cSCpnt->request_bufflen );
SCpnt1316drivers/scsi/fdomain.cSCpnt->SCp.sent_command,
SCpnt1317drivers/scsi/fdomain.cSCpnt->SCp.have_data_in,
SCpnt1318drivers/scsi/fdomain.cSCpnt->timeout );
SCpnt1359drivers/scsi/fdomain.cint fdomain_16x0_abort( Scsi_Cmnd *SCpnt, int code )
SCpnt1380drivers/scsi/fdomain.cprint_info( SCpnt );
SCpnt1397drivers/scsi/fdomain.cint fdomain_16x0_reset( Scsi_Cmnd *SCpnt )
SCpnt1423drivers/scsi/fdomain.cif (SCpnt)
SCpnt1424drivers/scsi/fdomain.cSCpnt->flags |= NEEDS_JUMPSTART;
SCpnt37drivers/scsi/scsi.cstatic void scsi_done (Scsi_Cmnd *SCpnt);
SCpnt40drivers/scsi/scsi.cstatic void scsi_times_out (Scsi_Cmnd * SCpnt);
SCpnt171drivers/scsi/scsi.cstatic void scan_scsis_done (Scsi_Cmnd * SCpnt)
SCpnt175drivers/scsi/scsi.cprintk ("scan_scsis_done(%d, %06x)\n", SCpnt->host, SCpnt->result);
SCpnt177drivers/scsi/scsi.cSCpnt->request.dev = 0xfffe;
SCpnt489drivers/scsi/scsi.cstatic void scsi_times_out (Scsi_Cmnd * SCpnt)
SCpnt492drivers/scsi/scsi.cswitch (SCpnt->internal_timeout & (IN_ABORT | IN_RESET))
SCpnt497drivers/scsi/scsi.cSCpnt->host->host_no);
SCpnt499drivers/scsi/scsi.cif (!scsi_abort  (SCpnt, DID_TIME_OUT))
SCpnt503drivers/scsi/scsi.cSCpnt->host->host_no);
SCpnt504drivers/scsi/scsi.cif (!scsi_reset (SCpnt)) 
SCpnt508drivers/scsi/scsi.cpanic("Unable to reset scsi host %d\n",SCpnt->host->host_no);
SCpnt524drivers/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt534drivers/scsi/scsi.cSCpnt =  scsi_devices[index].host->host_queue;
SCpnt535drivers/scsi/scsi.cwhile(SCpnt){
SCpnt536drivers/scsi/scsi.cif(SCpnt->target == scsi_devices[index].id &&
SCpnt537drivers/scsi/scsi.cSCpnt->lun == scsi_devices[index].lun)
SCpnt538drivers/scsi/scsi.cif(SCpnt->request.dev < 0) break;
SCpnt539drivers/scsi/scsi.cSCpnt = SCpnt->next;
SCpnt542drivers/scsi/scsi.cif (!SCpnt) return NULL;
SCpnt548drivers/scsi/scsi.cmemcpy(&SCpnt->request, req, sizeof(struct request));
SCpnt562drivers/scsi/scsi.cSCpnt->request.bhtail = bh;
SCpnt568drivers/scsi/scsi.cSCpnt->request.nr_sectors -= req->nr_sectors;
SCpnt571drivers/scsi/scsi.cSCpnt->request.waiting = NULL; /* Wait until whole thing done */
SCpnt576drivers/scsi/scsi.cSCpnt->request.dev = 0xffff; /* Busy, but no request */
SCpnt577drivers/scsi/scsi.cSCpnt->request.waiting = NULL;  /* And no one is waiting for the device either */
SCpnt580drivers/scsi/scsi.cSCpnt->use_sg = 0;  /* Reset the scatter-gather flag */
SCpnt581drivers/scsi/scsi.cSCpnt->old_use_sg  = 0;
SCpnt582drivers/scsi/scsi.cSCpnt->transfersize = 0;
SCpnt583drivers/scsi/scsi.cSCpnt->underflow = 0;
SCpnt584drivers/scsi/scsi.creturn SCpnt;
SCpnt603drivers/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt617drivers/scsi/scsi.cSCpnt = host->host_queue;
SCpnt618drivers/scsi/scsi.cwhile(SCpnt){
SCpnt619drivers/scsi/scsi.cif(SCpnt->target == scsi_devices[index].id &&
SCpnt620drivers/scsi/scsi.cSCpnt->lun == scsi_devices[index].lun) {
SCpnt621drivers/scsi/scsi.cSCwait = SCpnt;
SCpnt622drivers/scsi/scsi.cif(SCpnt->request.dev < 0) break;
SCpnt624drivers/scsi/scsi.cSCpnt = SCpnt->next;
SCpnt632drivers/scsi/scsi.cif (!SCpnt || SCpnt->request.dev >= 0)  /* Might have changed */
SCpnt645drivers/scsi/scsi.cmemcpy(&SCpnt->request, req, sizeof(struct request));
SCpnt659drivers/scsi/scsi.cSCpnt->request.bhtail = bh;
SCpnt664drivers/scsi/scsi.cSCpnt->request.nr_sectors -= req->nr_sectors;
SCpnt667drivers/scsi/scsi.cSCpnt->request.waiting = NULL; /* Wait until whole thing done */
SCpnt675drivers/scsi/scsi.cSCpnt->request.dev = 0xffff; /* Busy */
SCpnt676drivers/scsi/scsi.cSCpnt->request.waiting = NULL;  /* And no one is waiting for this to complete */
SCpnt683drivers/scsi/scsi.cSCpnt->use_sg = 0;  /* Reset the scatter-gather flag */
SCpnt684drivers/scsi/scsi.cSCpnt->old_use_sg  = 0;
SCpnt685drivers/scsi/scsi.cSCpnt->transfersize = 0;      /* No default transfer size */
SCpnt686drivers/scsi/scsi.cSCpnt->underflow = 0;         /* Do not flag underflow conditions */
SCpnt687drivers/scsi/scsi.creturn SCpnt;
SCpnt694drivers/scsi/scsi.cinline void internal_cmnd (Scsi_Cmnd * SCpnt)
SCpnt702drivers/scsi/scsi.cif ((unsigned long) &SCpnt < current->kernel_stack_page)
SCpnt705drivers/scsi/scsi.chost = SCpnt->host;
SCpnt714drivers/scsi/scsi.cupdate_timeout(SCpnt, SCpnt->timeout_per_command);
SCpnt722drivers/scsi/scsi.c"bufflen = %d, done = %08x)\n", SCpnt->host->host_no, SCpnt->target, SCpnt->cmnd, SCpnt->buffer, SCpnt->bufflen, SCpnt->done);
SCpnt731drivers/scsi/scsi.chost->hostt->queuecommand (SCpnt, scsi_done);
SCpnt739drivers/scsi/scsi.ctemp=host->hostt->command (SCpnt);
SCpnt740drivers/scsi/scsi.cSCpnt->result = temp;
SCpnt746drivers/scsi/scsi.cscsi_done(SCpnt);
SCpnt753drivers/scsi/scsi.cstatic void scsi_request_sense (Scsi_Cmnd * SCpnt)
SCpnt756drivers/scsi/scsi.cSCpnt->flags |= WAS_SENSE | ASKED_FOR_SENSE;
SCpnt757drivers/scsi/scsi.cupdate_timeout(SCpnt, SENSE_TIMEOUT);
SCpnt761drivers/scsi/scsi.cmemcpy ((void *) SCpnt->cmnd , (void *) generic_sense,
SCpnt764drivers/scsi/scsi.cSCpnt->cmnd[1] = SCpnt->lun << 5;  
SCpnt765drivers/scsi/scsi.cSCpnt->cmnd[4] = sizeof(SCpnt->sense_buffer);
SCpnt767drivers/scsi/scsi.cSCpnt->request_buffer = &SCpnt->sense_buffer;
SCpnt768drivers/scsi/scsi.cSCpnt->request_bufflen = sizeof(SCpnt->sense_buffer);
SCpnt769drivers/scsi/scsi.cSCpnt->use_sg = 0;
SCpnt770drivers/scsi/scsi.cinternal_cmnd (SCpnt);
SCpnt771drivers/scsi/scsi.cSCpnt->use_sg = SCpnt->old_use_sg;
SCpnt783drivers/scsi/scsi.cvoid scsi_do_cmd (Scsi_Cmnd * SCpnt, const void *cmnd , 
SCpnt788drivers/scsi/scsi.cstruct Scsi_Host * host = SCpnt->host;
SCpnt793drivers/scsi/scsi.cint target = SCpnt->target;
SCpnt839drivers/scsi/scsi.cmemcpy ((void *) SCpnt->data_cmnd , (void *) cmnd, 12);
SCpnt841drivers/scsi/scsi.cSCpnt->host = host;
SCpnt842drivers/scsi/scsi.cSCpnt->target = target;
SCpnt843drivers/scsi/scsi.cSCpnt->lun = (SCpnt->data_cmnd[1] >> 5);
SCpnt845drivers/scsi/scsi.cSCpnt->bufflen = bufflen;
SCpnt846drivers/scsi/scsi.cSCpnt->buffer = buffer;
SCpnt847drivers/scsi/scsi.cSCpnt->flags=0;
SCpnt848drivers/scsi/scsi.cSCpnt->retries=0;
SCpnt849drivers/scsi/scsi.cSCpnt->allowed=retries;
SCpnt850drivers/scsi/scsi.cSCpnt->done = done;
SCpnt851drivers/scsi/scsi.cSCpnt->timeout_per_command = timeout;
SCpnt853drivers/scsi/scsi.cmemcpy ((void *) SCpnt->cmnd , (void *) cmnd, 12);
SCpnt856drivers/scsi/scsi.cmemset ((void *) SCpnt->sense_buffer, 0, sizeof SCpnt->sense_buffer);
SCpnt857drivers/scsi/scsi.cSCpnt->request_buffer = buffer;
SCpnt858drivers/scsi/scsi.cSCpnt->request_bufflen = bufflen;
SCpnt859drivers/scsi/scsi.cSCpnt->old_use_sg = SCpnt->use_sg;
SCpnt863drivers/scsi/scsi.cSCpnt->internal_timeout = 0;
SCpnt864drivers/scsi/scsi.cinternal_cmnd (SCpnt);
SCpnt879drivers/scsi/scsi.cstatic void reset (Scsi_Cmnd * SCpnt)
SCpnt882drivers/scsi/scsi.cprintk("scsi: reset(%d)\n", SCpnt->host->host_no);
SCpnt885drivers/scsi/scsi.cSCpnt->flags |= (WAS_RESET | IS_RESETTING);
SCpnt886drivers/scsi/scsi.cscsi_reset(SCpnt);
SCpnt892drivers/scsi/scsi.cif(SCpnt->flags & NEEDS_JUMPSTART) {
SCpnt893drivers/scsi/scsi.cSCpnt->flags &= ~NEEDS_JUMPSTART;
SCpnt894drivers/scsi/scsi.cscsi_request_sense (SCpnt);
SCpnt900drivers/scsi/scsi.cstatic int check_sense (Scsi_Cmnd * SCpnt)
SCpnt905drivers/scsi/scsi.cif (((SCpnt->sense_buffer[0] & 0x70) >> 4) != 7) {
SCpnt906drivers/scsi/scsi.cif(!(SCpnt->flags & ASKED_FOR_SENSE))
SCpnt912drivers/scsi/scsi.cSCpnt->flags &= ~ASKED_FOR_SENSE;
SCpnt915drivers/scsi/scsi.cprintk("scsi%d : ", SCpnt->host->host_no);
SCpnt916drivers/scsi/scsi.cprint_sense("", SCpnt);
SCpnt919drivers/scsi/scsi.cif (SCpnt->sense_buffer[2] &0xe0)
SCpnt922drivers/scsi/scsi.cswitch (SCpnt->sense_buffer[2] & 0xf)
SCpnt971drivers/scsi/scsi.cstatic void scsi_done (Scsi_Cmnd * SCpnt)
SCpnt977drivers/scsi/scsi.cstruct Scsi_Host * host = SCpnt->host;
SCpnt978drivers/scsi/scsi.cint result = SCpnt->result;
SCpnt979drivers/scsi/scsi.coldto = update_timeout(SCpnt, 0);
SCpnt992drivers/scsi/scsi.cif (SCpnt->flags & IS_RESETTING)
SCpnt994drivers/scsi/scsi.cSCpnt->flags &= ~IS_RESETTING;
SCpnt999drivers/scsi/scsi.cif (status_byte(result) && (SCpnt->flags & WAS_SENSE))
SCpnt1002drivers/scsi/scsi.cSCpnt->flags &= ~WAS_SENSE;
SCpnt1003drivers/scsi/scsi.cSCpnt->internal_timeout &= ~SENSE_TIMEOUT;
SCpnt1005drivers/scsi/scsi.cif (!(SCpnt->flags & WAS_RESET))
SCpnt1008drivers/scsi/scsi.cSCpnt->host->host_no, SCpnt->target, SCpnt->lun);
SCpnt1009drivers/scsi/scsi.creset(SCpnt);
SCpnt1024drivers/scsi/scsi.cif (SCpnt->flags & WAS_SENSE)
SCpnt1030drivers/scsi/scsi.cSCpnt->flags &= ~WAS_SENSE;
SCpnt1031drivers/scsi/scsi.cSCpnt->internal_timeout &= ~SENSE_TIMEOUT;
SCpnt1033drivers/scsi/scsi.cswitch (checked = check_sense(SCpnt))
SCpnt1041drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1078drivers/scsi/scsi.cswitch (check_sense(SCpnt))
SCpnt1081drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1094drivers/scsi/scsi.cscsi_request_sense (SCpnt);
SCpnt1106drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1112drivers/scsi/scsi.cSCpnt->host->host_no);
SCpnt1113drivers/scsi/scsi.creset(SCpnt);
SCpnt1136drivers/scsi/scsi.cif (SCpnt->flags & WAS_TIMEDOUT)  
SCpnt1148drivers/scsi/scsi.cSCpnt->flags  |= WAS_TIMEDOUT;
SCpnt1173drivers/scsi/scsi.cswitch (check_sense(SCpnt)) {
SCpnt1175drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1188drivers/scsi/scsi.cscsi_request_sense (SCpnt);
SCpnt1210drivers/scsi/scsi.cSCpnt->allowed, SCpnt->retries);
SCpnt1213drivers/scsi/scsi.cif ((++SCpnt->retries) < SCpnt->allowed)
SCpnt1215drivers/scsi/scsi.cif ((SCpnt->retries >= (SCpnt->allowed >> 1))
SCpnt1216drivers/scsi/scsi.c&& !(SCpnt->flags & WAS_RESET))
SCpnt1219drivers/scsi/scsi.cSCpnt->host->host_no);
SCpnt1220drivers/scsi/scsi.creset(SCpnt);
SCpnt1233drivers/scsi/scsi.cif (SCpnt->flags & WAS_SENSE)      
SCpnt1234drivers/scsi/scsi.cscsi_request_sense(SCpnt);   
SCpnt1237drivers/scsi/scsi.cmemcpy ((void *) SCpnt->cmnd,
SCpnt1238drivers/scsi/scsi.c(void*) SCpnt->data_cmnd, 
SCpnt1239drivers/scsi/scsi.csizeof(SCpnt->data_cmnd));
SCpnt1240drivers/scsi/scsi.cSCpnt->request_buffer = SCpnt->buffer;
SCpnt1241drivers/scsi/scsi.cSCpnt->request_bufflen = SCpnt->bufflen;
SCpnt1242drivers/scsi/scsi.cSCpnt->use_sg = SCpnt->old_use_sg;
SCpnt1243drivers/scsi/scsi.cinternal_cmnd (SCpnt);
SCpnt1253drivers/scsi/scsi.cprintk("Calling done function - at address %08x\n", SCpnt->done);
SCpnt1257drivers/scsi/scsi.cSCpnt->result = result | ((exit & 0xff) << 24);
SCpnt1258drivers/scsi/scsi.cSCpnt->use_sg = SCpnt->old_use_sg;
SCpnt1259drivers/scsi/scsi.cSCpnt->done (SCpnt);
SCpnt1285drivers/scsi/scsi.cint scsi_abort (Scsi_Cmnd * SCpnt, int why)
SCpnt1288drivers/scsi/scsi.cstruct Scsi_Host * host = SCpnt->host;
SCpnt1293drivers/scsi/scsi.cif (SCpnt->internal_timeout & IN_ABORT) 
SCpnt1296drivers/scsi/scsi.cwhile (SCpnt->internal_timeout & IN_ABORT);
SCpnt1300drivers/scsi/scsi.cSCpnt->internal_timeout |= IN_ABORT;
SCpnt1301drivers/scsi/scsi.coldto = update_timeout(SCpnt, ABORT_TIMEOUT);
SCpnt1305drivers/scsi/scsi.cif (!host->host_busy || !host->hostt->abort(SCpnt, why))
SCpnt1311drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_ABORT;
SCpnt1312drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1319drivers/scsi/scsi.cint scsi_reset (Scsi_Cmnd * SCpnt)
SCpnt1323drivers/scsi/scsi.cstruct Scsi_Host * host = SCpnt->host;
SCpnt1330drivers/scsi/scsi.cif (SCpnt->internal_timeout & IN_RESET)
SCpnt1333drivers/scsi/scsi.cwhile (SCpnt->internal_timeout & IN_RESET);
SCpnt1337drivers/scsi/scsi.cSCpnt->internal_timeout |= IN_RESET;
SCpnt1338drivers/scsi/scsi.coldto = update_timeout(SCpnt, RESET_TIMEOUT);  
SCpnt1352drivers/scsi/scsi.ctemp = host->hostt->reset(SCpnt);  
SCpnt1359drivers/scsi/scsi.ctemp = host->hostt->reset(SCpnt);
SCpnt1365drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_RESET;
SCpnt1366drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1382drivers/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt1394drivers/scsi/scsi.cSCpnt = host->host_queue;
SCpnt1395drivers/scsi/scsi.cwhile (SCpnt){
SCpnt1396drivers/scsi/scsi.cif (SCpnt->timeout > 0 && SCpnt->timeout <= time_elapsed)
SCpnt1399drivers/scsi/scsi.cSCpnt->timeout = 0;
SCpnt1400drivers/scsi/scsi.cscsi_times_out(SCpnt);
SCpnt1404drivers/scsi/scsi.cSCpnt =  SCpnt->next;
SCpnt1425drivers/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt1451drivers/scsi/scsi.cSCpnt = host->host_queue;
SCpnt1452drivers/scsi/scsi.cwhile (SCpnt){
SCpnt1453drivers/scsi/scsi.cif (SCpnt->timeout > 0 && (SCpnt->timeout -= used) < least)
SCpnt1454drivers/scsi/scsi.cleast = SCpnt->timeout;
SCpnt1455drivers/scsi/scsi.cSCpnt =  SCpnt->next;
SCpnt1555drivers/scsi/scsi.cScsi_Cmnd * SCpnt;
SCpnt1576drivers/scsi/scsi.cSCpnt = last_cmnd;
SCpnt1597drivers/scsi/scsi.cSCpnt->host = scsi_devices[i].host;
SCpnt1598drivers/scsi/scsi.cSCpnt->target = scsi_devices[i].id;
SCpnt1599drivers/scsi/scsi.cSCpnt->lun = scsi_devices[i].lun;
SCpnt1600drivers/scsi/scsi.cSCpnt->index = i;
SCpnt1601drivers/scsi/scsi.cSCpnt->request.dev = -1; /* Mark not busy */
SCpnt1602drivers/scsi/scsi.cSCpnt->use_sg = 0;
SCpnt1603drivers/scsi/scsi.cSCpnt->old_use_sg = 0;
SCpnt1604drivers/scsi/scsi.cSCpnt->underflow = 0;
SCpnt1605drivers/scsi/scsi.cSCpnt->transfersize = 0;
SCpnt1606drivers/scsi/scsi.cSCpnt->host_scribble = NULL;
SCpnt1609drivers/scsi/scsi.chost->host_queue->prev = SCpnt;
SCpnt1610drivers/scsi/scsi.cSCpnt->next = host->host_queue;
SCpnt1611drivers/scsi/scsi.cSCpnt->prev = NULL;
SCpnt1612drivers/scsi/scsi.chost->host_queue = SCpnt;
SCpnt1613drivers/scsi/scsi.cSCpnt++;
SCpnt1618drivers/scsi/scsi.cmemory_start = (int) SCpnt;
SCpnt450drivers/scsi/scsi.hstatic void end_scsi_request(Scsi_Cmnd * SCpnt, int uptodate, int sectors)
SCpnt456drivers/scsi/scsi.hreq = &SCpnt->request;
SCpnt493drivers/scsi/scsi.hwake_up(&scsi_devices[SCpnt->index].device_wait);
SCpnt49drivers/scsi/scsi_debug.cif ((SCpnt->request.dev & 0xf) != 0) start = starts[(SCpnt->request.dev & 0xf) - 1];    \
SCpnt55drivers/scsi/scsi_debug.cif (bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\
SCpnt61drivers/scsi/scsi_debug.cif ((SCpnt->request.dev & 0xfff0) != ((target + NR_REAL) << 4) +(MAJOR_NR << 8)){  \
SCpnt62drivers/scsi/scsi_debug.cprintk("Dev #s %x %x ",SCpnt->request.dev, target);      \
SCpnt68drivers/scsi/scsi_debug.cif (bufflen != 1024 && (!SCpnt->use_sg)) {printk("%x %d\n ",bufflen, SCpnt->use_sg); panic("Bad bufflen");};     \
SCpnt70drivers/scsi/scsi_debug.cif ((SCpnt->request.dev & 0xf) > npart) panic ("Bad partition");  \
SCpnt71drivers/scsi/scsi_debug.cif ((SCpnt->request.dev & 0xf) != 0) start = starts[(SCpnt->request.dev & 0xf) - 1];    \
SCpnt72drivers/scsi/scsi_debug.cif (SCpnt->request.cmd != RW) panic ("Wrong  operation");    \
SCpnt73drivers/scsi/scsi_debug.cif (SCpnt->request.sector + start != block) panic("Wrong block.");  \
SCpnt74drivers/scsi/scsi_debug.cif (SCpnt->request.current_nr_sectors != 2 && (!SCpnt->use_sg)) panic ("Wrong # blocks");  \
SCpnt75drivers/scsi/scsi_debug.cif (SCpnt->request.bh){              \
SCpnt76drivers/scsi/scsi_debug.cif (SCpnt->request.bh->b_size != 1024) panic ("Wrong bh size");  \
SCpnt77drivers/scsi/scsi_debug.cif ((SCpnt->request.bh->b_blocknr << 1) + start != block)           \
SCpnt78drivers/scsi/scsi_debug.c{  printk("Wrong bh block# %d %d ",SCpnt->request.bh->b_blocknr, block);  \
SCpnt80drivers/scsi/scsi_debug.cif (SCpnt->request.bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\
SCpnt92drivers/scsi/scsi_debug.cstatic void scsi_dump(Scsi_Cmnd * SCpnt, int flag){
SCpnt99drivers/scsi/scsi_debug.cprintk("use_sg: %d",SCpnt->use_sg);
SCpnt100drivers/scsi/scsi_debug.cif (SCpnt->use_sg){
SCpnt101drivers/scsi/scsi_debug.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt102drivers/scsi/scsi_debug.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt108drivers/scsi/scsi_debug.cprintk("nosg: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer,
SCpnt109drivers/scsi/scsi_debug.cSCpnt->bufflen);
SCpnt110drivers/scsi/scsi_debug.clpnt = (int *) SCpnt->request.buffer;
SCpnt113drivers/scsi/scsi_debug.clpnt = (unsigned int *) SCpnt;
SCpnt137drivers/scsi/scsi_debug.cint scsi_debug_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt139drivers/scsi/scsi_debug.cunchar *cmd = (unchar *) SCpnt->cmnd;
SCpnt147drivers/scsi/scsi_debug.cint target = SCpnt->target;
SCpnt148drivers/scsi/scsi_debug.cint bufflen = SCpnt->request_bufflen;
SCpnt153drivers/scsi/scsi_debug.cDEB(if (target > 1) { SCpnt->result = DID_TIME_OUT << 16;done(SCpnt);return 0;});
SCpnt155drivers/scsi/scsi_debug.cbuff = (unsigned char *) SCpnt->request_buffer;
SCpnt157drivers/scsi/scsi_debug.cif(target>=2 || SCpnt->lun != 0) {
SCpnt158drivers/scsi/scsi_debug.cSCpnt->result =  DID_NO_CONNECT << 16;
SCpnt159drivers/scsi/scsi_debug.cdone(SCpnt);
SCpnt168drivers/scsi/scsi_debug.cprintk("scsi_debug: Requesting sense buffer (%x %x %x %d):", SCpnt, buff, done, bufflen);
SCpnt176drivers/scsi/scsi_debug.cSCpnt->result = 0;
SCpnt177drivers/scsi/scsi_debug.cdone(SCpnt); 
SCpnt203drivers/scsi/scsi_debug.cif(NR_REAL < 0) NR_REAL = (SCpnt->request.dev >> 4) & 0x0f;
SCpnt222drivers/scsi/scsi_debug.cprintk("(r%d)",SCpnt->request.nr_sectors);
SCpnt224drivers/scsi/scsi_debug.cif(SCpnt->use_sg){
SCpnt229drivers/scsi/scsi_debug.cbh = SCpnt->request.bh;
SCpnt252drivers/scsi/scsi_debug.cif (SCpnt->use_sg) printk("Block %x (%d %d)\n",block, SCpnt->request.nr_sectors,
SCpnt253drivers/scsi/scsi_debug.cSCpnt->request.current_nr_sectors);
SCpnt277drivers/scsi/scsi_debug.cmemcpy(buff+64, SCpnt, sizeof(Scsi_Cmnd));
SCpnt279drivers/scsi/scsi_debug.cif(SCpnt->use_sg){
SCpnt291drivers/scsi/scsi_debug.cif (SCpnt->use_sg && !scsi_debug_errsts)
SCpnt292drivers/scsi/scsi_debug.cif(bh) scsi_dump(SCpnt, 0);
SCpnt304drivers/scsi/scsi_debug.cprintk("(w%d)",SCpnt->request.nr_sectors);
SCpnt305drivers/scsi/scsi_debug.cif (SCpnt->use_sg){
SCpnt306drivers/scsi/scsi_debug.cif ((bufflen >> 9) != SCpnt->request.nr_sectors)
SCpnt314drivers/scsi/scsi_debug.cscsi_dump(SCpnt,1);
SCpnt322drivers/scsi/scsi_debug.cSCpnt->result =  DID_NO_CONNECT << 16;
SCpnt323drivers/scsi/scsi_debug.cdone(SCpnt);
SCpnt335drivers/scsi/scsi_debug.cSCint[i] = SCpnt;
SCpnt355drivers/scsi/scsi_debug.cSCpnt->result = scsi_debug_errsts;
SCpnt367drivers/scsi/scsi_debug.cstatic void internal_done(Scsi_Cmnd * SCpnt)
SCpnt369drivers/scsi/scsi_debug.cinternal_done_errcode = SCpnt->result;
SCpnt373drivers/scsi/scsi_debug.cint scsi_debug_command(Scsi_Cmnd * SCpnt)
SCpnt376drivers/scsi/scsi_debug.cscsi_debug_queuecommand(SCpnt, internal_done);
SCpnt462drivers/scsi/scsi_debug.cint scsi_debug_abort(Scsi_Cmnd * SCpnt,int i)
SCpnt467drivers/scsi/scsi_debug.cSCpnt->result = i << 16;
SCpnt469drivers/scsi/scsi_debug.cif(SCpnt == SCint[j]) {
SCpnt471drivers/scsi/scsi_debug.cmy_done(SCpnt);
SCpnt490drivers/scsi/scsi_debug.cint scsi_debug_reset(Scsi_Cmnd * SCpnt)
SCpnt73drivers/scsi/scsi_ioctl.cstatic void scsi_ioctl_done (Scsi_Cmnd * SCpnt)
SCpnt78drivers/scsi/scsi_ioctl.creq = &SCpnt->request;
SCpnt92drivers/scsi/scsi_ioctl.cScsi_Cmnd * SCpnt;
SCpnt94drivers/scsi/scsi_ioctl.cSCpnt = allocate_device(NULL, dev->index, 1);
SCpnt95drivers/scsi/scsi_ioctl.cscsi_do_cmd(SCpnt,  cmd, NULL,  0,
SCpnt99drivers/scsi/scsi_ioctl.cif (SCpnt->request.dev != 0xfffe){
SCpnt100drivers/scsi/scsi_ioctl.cSCpnt->request.waiting = current;
SCpnt102drivers/scsi/scsi_ioctl.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt105drivers/scsi/scsi_ioctl.cif(driver_byte(SCpnt->result) != 0)
SCpnt106drivers/scsi/scsi_ioctl.cswitch(SCpnt->sense_buffer[2] & 0xf) {
SCpnt119drivers/scsi/scsi_ioctl.cSCpnt->result = 0; /* This is no longer considered an error */
SCpnt128drivers/scsi/scsi_ioctl.cSCpnt->result);
SCpnt130drivers/scsi/scsi_ioctl.csense_class(SCpnt->sense_buffer[0]),
SCpnt131drivers/scsi/scsi_ioctl.csense_error(SCpnt->sense_buffer[0]),
SCpnt132drivers/scsi/scsi_ioctl.cSCpnt->sense_buffer[2] & 0xf);
SCpnt136drivers/scsi/scsi_ioctl.cresult = SCpnt->result;
SCpnt137drivers/scsi/scsi_ioctl.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt138drivers/scsi/scsi_ioctl.cwake_up(&scsi_devices[SCpnt->index].device_wait);
SCpnt147drivers/scsi/scsi_ioctl.cScsi_Cmnd * SCpnt;
SCpnt178drivers/scsi/scsi_ioctl.cSCpnt = allocate_device(NULL, dev->index, 1);
SCpnt180drivers/scsi/scsi_ioctl.cscsi_do_cmd(SCpnt,  cmd,  buf, needed,  scsi_ioctl_done,  MAX_TIMEOUT, 
SCpnt183drivers/scsi/scsi_ioctl.cif (SCpnt->request.dev != 0xfffe){
SCpnt184drivers/scsi/scsi_ioctl.cSCpnt->request.waiting = current;
SCpnt186drivers/scsi/scsi_ioctl.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt191drivers/scsi/scsi_ioctl.cif(SCpnt->result) {
SCpnt192drivers/scsi/scsi_ioctl.cresult = verify_area(VERIFY_WRITE, cmd_in, sizeof(SCpnt->sense_buffer));
SCpnt195drivers/scsi/scsi_ioctl.cmemcpy_tofs((void *) cmd_in,  SCpnt->sense_buffer, sizeof(SCpnt->sense_buffer));
SCpnt203drivers/scsi/scsi_ioctl.cresult = SCpnt->result;
SCpnt204drivers/scsi/scsi_ioctl.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt206drivers/scsi/scsi_ioctl.cwake_up(&scsi_devices[SCpnt->index].device_wait);
SCpnt54drivers/scsi/sd.cstatic void requeue_sd_request (Scsi_Cmnd * SCpnt);
SCpnt138drivers/scsi/sd.cstatic void rw_intr (Scsi_Cmnd *SCpnt)
SCpnt140drivers/scsi/sd.cint result = SCpnt->result;
SCpnt141drivers/scsi/sd.cint this_count = SCpnt->bufflen >> 9;
SCpnt144drivers/scsi/sd.cprintk("sd%d : rw_intr(%d, %d)\n", MINOR(SCpnt->request.dev), SCpnt->host->host_no, result);
SCpnt156drivers/scsi/sd.cprintk("sd%d : %d sectors remain.\n", MINOR(SCpnt->request.dev), SCpnt->request.nr_sectors);
SCpnt157drivers/scsi/sd.cprintk("use_sg is %d\n ",SCpnt->use_sg);
SCpnt159drivers/scsi/sd.cif (SCpnt->use_sg) {
SCpnt162drivers/scsi/sd.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt163drivers/scsi/sd.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt168drivers/scsi/sd.cif (SCpnt->request.cmd == READ)
SCpnt173drivers/scsi/sd.cscsi_free(SCpnt->buffer, SCpnt->sglist_len);  /* Free list of scatter-gather pointers */
SCpnt175drivers/scsi/sd.cif (SCpnt->buffer != SCpnt->request.buffer) {
SCpnt177drivers/scsi/sd.cprintk("nosg: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer,
SCpnt178drivers/scsi/sd.cSCpnt->bufflen);
SCpnt180drivers/scsi/sd.cif (SCpnt->request.cmd == READ)
SCpnt181drivers/scsi/sd.cmemcpy(SCpnt->request.buffer, SCpnt->buffer,
SCpnt182drivers/scsi/sd.cSCpnt->bufflen);
SCpnt183drivers/scsi/sd.cscsi_free(SCpnt->buffer, SCpnt->bufflen);
SCpnt191drivers/scsi/sd.cif (SCpnt->request.nr_sectors > this_count)
SCpnt193drivers/scsi/sd.cSCpnt->request.errors = 0;
SCpnt195drivers/scsi/sd.cif (!SCpnt->request.bh)
SCpnt199drivers/scsi/sd.cMINOR(SCpnt->request.dev));
SCpnt206drivers/scsi/sd.cSCpnt->request.sector, this_count);
SCpnt209drivers/scsi/sd.cend_scsi_request(SCpnt, 1, this_count);
SCpnt210drivers/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt215drivers/scsi/sd.cif (SCpnt->use_sg) {
SCpnt218drivers/scsi/sd.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt219drivers/scsi/sd.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt221drivers/scsi/sd.cprintk("err: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer,
SCpnt222drivers/scsi/sd.cSCpnt->bufflen);
SCpnt228drivers/scsi/sd.cscsi_free(SCpnt->buffer, SCpnt->sglist_len);  /* Free list of scatter-gather pointers */
SCpnt231drivers/scsi/sd.cprintk("nosgerr: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer,
SCpnt232drivers/scsi/sd.cSCpnt->bufflen);
SCpnt234drivers/scsi/sd.cif (SCpnt->buffer != SCpnt->request.buffer)
SCpnt235drivers/scsi/sd.cscsi_free(SCpnt->buffer, SCpnt->bufflen);
SCpnt251drivers/scsi/sd.cif rscsi_disks[DEVICE_NR(SCpnt->request.dev)].remap
SCpnt260drivers/scsi/sd.cif ((SCpnt->sense_buffer[0] & 0x7f) == 0x70) {
SCpnt261drivers/scsi/sd.cif ((SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) {
SCpnt262drivers/scsi/sd.cif(rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->removable) {
SCpnt266drivers/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->changed = 1;
SCpnt267drivers/scsi/sd.cend_scsi_request(SCpnt, 0, this_count);
SCpnt268drivers/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt282drivers/scsi/sd.cif (SCpnt->sense_buffer[2] == ILLEGAL_REQUEST) {
SCpnt283drivers/scsi/sd.cif (rscsi_disks[DEVICE_NR(SCpnt->request.dev)].ten) {
SCpnt284drivers/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.dev)].ten = 0;
SCpnt285drivers/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt293drivers/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->host->host_no,
SCpnt294drivers/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->id,
SCpnt295drivers/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->lun, result);
SCpnt298drivers/scsi/sd.cprint_sense("sd", SCpnt);
SCpnt299drivers/scsi/sd.cend_scsi_request(SCpnt, 0, SCpnt->request.current_nr_sectors);
SCpnt300drivers/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt313drivers/scsi/sd.cScsi_Cmnd * SCpnt = NULL;
SCpnt338drivers/scsi/sd.cSCpnt = allocate_device(&CURRENT,
SCpnt340drivers/scsi/sd.celse SCpnt = NULL;
SCpnt350drivers/scsi/sd.cif (!SCpnt && NR_SD > 1){
SCpnt356drivers/scsi/sd.cSCpnt = request_queueable(req,
SCpnt358drivers/scsi/sd.cif(SCpnt) break;
SCpnt362drivers/scsi/sd.cif (SCpnt && req->dev == -1) {
SCpnt371drivers/scsi/sd.cif (!SCpnt) return; /* Could not find anything to do */
SCpnt376drivers/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt380drivers/scsi/sd.cstatic void requeue_sd_request (Scsi_Cmnd * SCpnt)
SCpnt388drivers/scsi/sd.cif(SCpnt->request.dev <= 0) {
SCpnt393drivers/scsi/sd.cdev =  MINOR(SCpnt->request.dev);
SCpnt394drivers/scsi/sd.cblock = SCpnt->request.sector;
SCpnt401drivers/scsi/sd.cif (dev >= (NR_SD << 4) || block + SCpnt->request.nr_sectors > sd[dev].nr_sects)
SCpnt403drivers/scsi/sd.cend_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt416drivers/scsi/sd.cend_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt421drivers/scsi/sd.cprintk("sd%d : real dev = /dev/sd%d, block = %d\n", MINOR(SCpnt->request.dev), dev, block);
SCpnt424drivers/scsi/sd.cswitch (SCpnt->request.cmd)
SCpnt429drivers/scsi/sd.cend_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt438drivers/scsi/sd.cpanic ("Unknown sd command %d\n", SCpnt->request.cmd);
SCpnt441drivers/scsi/sd.cSCpnt->this_count = 0;
SCpnt443drivers/scsi/sd.cif (!SCpnt->request.bh || 
SCpnt444drivers/scsi/sd.c(SCpnt->request.nr_sectors == SCpnt->request.current_nr_sectors)) {
SCpnt447drivers/scsi/sd.cthis_count = SCpnt->request.nr_sectors;
SCpnt448drivers/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt449drivers/scsi/sd.cSCpnt->use_sg = 0;
SCpnt451drivers/scsi/sd.c} else if (SCpnt->host->sg_tablesize == 0 ||
SCpnt462drivers/scsi/sd.cif (SCpnt->host->sg_tablesize != 0 &&
SCpnt467drivers/scsi/sd.cthis_count = SCpnt->request.current_nr_sectors;
SCpnt468drivers/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt469drivers/scsi/sd.cSCpnt->use_sg = 0;
SCpnt477drivers/scsi/sd.cbh = SCpnt->request.bh;
SCpnt481drivers/scsi/sd.cwhile(bh && count < SCpnt->host->sg_tablesize) {
SCpnt487drivers/scsi/sd.cSCpnt->use_sg = count;  /* Number of chains */
SCpnt489drivers/scsi/sd.cwhile( count < (SCpnt->use_sg * sizeof(struct scatterlist))) 
SCpnt491drivers/scsi/sd.cSCpnt->sglist_len = count;
SCpnt495drivers/scsi/sd.cSCpnt->use_sg = 0;  /* No memory left - bail out */
SCpnt496drivers/scsi/sd.cthis_count = SCpnt->request.current_nr_sectors;
SCpnt497drivers/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt501drivers/scsi/sd.cbh = SCpnt->request.bh;
SCpnt502drivers/scsi/sd.cfor(count = 0, bh = SCpnt->request.bh; count < SCpnt->use_sg; 
SCpnt508drivers/scsi/sd.cISA_DMA_THRESHOLD & (SCpnt->host->unchecked_isa_dma)) {
SCpnt529drivers/scsi/sd.cthis_count = SCpnt->request.current_nr_sectors;
SCpnt530drivers/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt531drivers/scsi/sd.cSCpnt->use_sg = 0;
SCpnt532drivers/scsi/sd.cscsi_free(buff, SCpnt->sglist_len);
SCpnt536drivers/scsi/sd.cif (SCpnt->request.cmd == WRITE)
SCpnt546drivers/scsi/sd.cif(SCpnt->use_sg == 0){
SCpnt548drivers/scsi/sd.c(SCpnt->host->unchecked_isa_dma)) {
SCpnt551drivers/scsi/sd.cif (SCpnt->request.cmd == WRITE)
SCpnt552drivers/scsi/sd.cmemcpy(buff, (char *)SCpnt->request.buffer, this_count << 9);
SCpnt557drivers/scsi/sd.cprintk("sd%d : %s %d/%d 512 byte blocks.\n", MINOR(SCpnt->request.dev),
SCpnt558drivers/scsi/sd.c(SCpnt->request.cmd == WRITE) ? "writing" : "reading",
SCpnt559drivers/scsi/sd.cthis_count, SCpnt->request.nr_sectors);
SCpnt562drivers/scsi/sd.ccmd[1] = (SCpnt->lun << 5) & 0xe0;
SCpnt608drivers/scsi/sd.cSCpnt->transfersize = rscsi_disks[dev].sector_size;
SCpnt609drivers/scsi/sd.cSCpnt->underflow = this_count << 9; 
SCpnt611drivers/scsi/sd.cscsi_do_cmd (SCpnt, (void *) cmd, buff, 
SCpnt648drivers/scsi/sd.cstatic void sd_init_done (Scsi_Cmnd * SCpnt)
SCpnt653drivers/scsi/sd.creq = &SCpnt->request;
SCpnt671drivers/scsi/sd.cScsi_Cmnd * SCpnt;
SCpnt677drivers/scsi/sd.cSCpnt = allocate_device(NULL, rscsi_disks[i].device->index, 1);
SCpnt688drivers/scsi/sd.cSCpnt->request.dev = 0xffff;  /* Mark as really busy again */
SCpnt689drivers/scsi/sd.cSCpnt->sense_buffer[0] = 0;
SCpnt690drivers/scsi/sd.cSCpnt->sense_buffer[2] = 0;
SCpnt692drivers/scsi/sd.cscsi_do_cmd (SCpnt,
SCpnt697drivers/scsi/sd.cwhile(SCpnt->request.dev != 0xfffe);
SCpnt699drivers/scsi/sd.cthe_result = SCpnt->result;
SCpnt704drivers/scsi/sd.cSCpnt->sense_buffer[2] == NOT_READY) {
SCpnt713drivers/scsi/sd.cSCpnt->request.dev = 0xffff;  /* Mark as really busy again */
SCpnt714drivers/scsi/sd.cSCpnt->sense_buffer[0] = 0;
SCpnt715drivers/scsi/sd.cSCpnt->sense_buffer[2] = 0;
SCpnt717drivers/scsi/sd.cscsi_do_cmd (SCpnt,
SCpnt722drivers/scsi/sd.cwhile(SCpnt->request.dev != 0xfffe);
SCpnt747drivers/scsi/sd.cSCpnt->request.dev = 0xffff;  /* Mark as really busy again */
SCpnt748drivers/scsi/sd.cSCpnt->sense_buffer[0] = 0;
SCpnt749drivers/scsi/sd.cSCpnt->sense_buffer[2] = 0;
SCpnt751drivers/scsi/sd.cscsi_do_cmd (SCpnt,
SCpnt757drivers/scsi/sd.cwhile(SCpnt->request.dev != 0xfffe);
SCpnt759drivers/scsi/sd.cif (SCpnt->request.dev != 0xfffe){
SCpnt760drivers/scsi/sd.cSCpnt->request.waiting = current;
SCpnt762drivers/scsi/sd.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt765drivers/scsi/sd.cthe_result = SCpnt->result;
SCpnt770drivers/scsi/sd.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt772drivers/scsi/sd.cwake_up(&scsi_devices[SCpnt->index].device_wait); 
SCpnt800drivers/scsi/sd.cprintk("sd%d : extended sense code = %1x \n", i, SCpnt->sense_buffer[2] & 0xf);
SCpnt811drivers/scsi/sd.cSCpnt->sense_buffer[2] == NOT_READY)
SCpnt514drivers/scsi/seagate.cint seagate_st0x_queue_command (Scsi_Cmnd * SCpnt,  void (*done)(Scsi_Cmnd *))
SCpnt520drivers/scsi/seagate.ccurrent_target = SCpnt->target;
SCpnt521drivers/scsi/seagate.ccurrent_lun = SCpnt->lun;
SCpnt522drivers/scsi/seagate.c(const void *) current_cmnd = SCpnt->cmnd;
SCpnt523drivers/scsi/seagate.ccurrent_data = (unsigned char *) SCpnt->request_buffer;
SCpnt524drivers/scsi/seagate.ccurrent_bufflen = SCpnt->request_bufflen;
SCpnt525drivers/scsi/seagate.cSCint = SCpnt;
SCpnt575drivers/scsi/seagate.cint seagate_st0x_command (Scsi_Cmnd * SCpnt) {
SCpnt576drivers/scsi/seagate.creturn internal_command (SCpnt->target, SCpnt->lun, SCpnt->cmnd, SCpnt->request_buffer,
SCpnt577drivers/scsi/seagate.cSCpnt->request_bufflen, 
SCpnt1549drivers/scsi/seagate.cint seagate_st0x_abort (Scsi_Cmnd * SCpnt, int code)
SCpnt1563drivers/scsi/seagate.cint seagate_st0x_reset (Scsi_Cmnd * SCpnt)
SCpnt1593drivers/scsi/seagate.cif(SCpnt) SCpnt->flags |= NEEDS_JUMPSTART;
SCpnt186drivers/scsi/sg.cstatic void sg_command_done(Scsi_Cmnd * SCpnt)
SCpnt188drivers/scsi/sg.cint dev=SCpnt->request.dev;
SCpnt193drivers/scsi/sg.cSCpnt->request.dev=-1;
SCpnt196drivers/scsi/sg.cif (SCpnt->sense_buffer[0])
SCpnt201drivers/scsi/sg.cdevice->header.result=SCpnt->result;
SCpnt203drivers/scsi/sg.cSCpnt->request.dev=-1;
SCpnt210drivers/scsi/sg.cScsi_Cmnd *SCpnt;
SCpnt251drivers/scsi/sg.cif (!(SCpnt=allocate_device(NULL,device->device->index, !(filp->f_flags & O_NONBLOCK))))
SCpnt262drivers/scsi/sg.cSCpnt->request.dev=dev;
SCpnt263drivers/scsi/sg.cSCpnt->sense_buffer[0]=0;
SCpnt272drivers/scsi/sg.cscsi_do_cmd (SCpnt,(void *) cmnd,
SCpnt46drivers/scsi/sr.cvoid requeue_sr_request (Scsi_Cmnd * SCpnt);
SCpnt113drivers/scsi/sr.cstatic void rw_intr (Scsi_Cmnd * SCpnt)
SCpnt115drivers/scsi/sr.cint result = SCpnt->result;
SCpnt116drivers/scsi/sr.cint this_count = SCpnt->this_count;
SCpnt119drivers/scsi/sr.cprintk("sr.c done: %x %x\n",result, SCpnt->request.bh->b_data);
SCpnt123drivers/scsi/sr.cif (SCpnt->use_sg == 0) {
SCpnt124drivers/scsi/sr.cif (SCpnt->buffer != SCpnt->request.buffer)
SCpnt127drivers/scsi/sr.coffset = (SCpnt->request.sector % 4) << 9;
SCpnt128drivers/scsi/sr.cmemcpy((char *)SCpnt->request.buffer, 
SCpnt129drivers/scsi/sr.c(char *)SCpnt->buffer + offset, 
SCpnt136drivers/scsi/sr.cSCpnt->request.nr_sectors > this_count && 
SCpnt137drivers/scsi/sr.cSCpnt->request.bh &&
SCpnt138drivers/scsi/sr.cSCpnt->request.bh->b_reqnext &&
SCpnt139drivers/scsi/sr.cSCpnt->request.bh->b_reqnext->b_size == 1024) {
SCpnt140drivers/scsi/sr.cmemcpy((char *)SCpnt->request.bh->b_reqnext->b_data, 
SCpnt141drivers/scsi/sr.c(char *)SCpnt->buffer + 1024, 
SCpnt146drivers/scsi/sr.cscsi_free(SCpnt->buffer, 2048);
SCpnt151drivers/scsi/sr.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt152drivers/scsi/sr.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt160drivers/scsi/sr.cscsi_free(SCpnt->buffer, SCpnt->sglist_len);  /* Free list of scatter-gather pointers */
SCpnt161drivers/scsi/sr.cif(SCpnt->request.sector % 4) this_count -= 2;
SCpnt163drivers/scsi/sr.cif(this_count > SCpnt->request.nr_sectors)
SCpnt168drivers/scsi/sr.cprintk("(%x %x %x) ",SCpnt->request.bh, SCpnt->request.nr_sectors, 
SCpnt171drivers/scsi/sr.cif (SCpnt->request.nr_sectors > this_count)
SCpnt173drivers/scsi/sr.cSCpnt->request.errors = 0;
SCpnt174drivers/scsi/sr.cif (!SCpnt->request.bh)
SCpnt176drivers/scsi/sr.cSCpnt->request.sector, this_count);
SCpnt179drivers/scsi/sr.cend_scsi_request(SCpnt, 1, this_count);  /* All done */
SCpnt180drivers/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt187drivers/scsi/sr.cif (SCpnt->use_sg) {
SCpnt190drivers/scsi/sr.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt191drivers/scsi/sr.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt196drivers/scsi/sr.cscsi_free(SCpnt->buffer, SCpnt->sglist_len);  /* Free list of scatter-gather pointers */
SCpnt198drivers/scsi/sr.cif (SCpnt->buffer != SCpnt->request.buffer)
SCpnt199drivers/scsi/sr.cscsi_free(SCpnt->buffer, SCpnt->bufflen);
SCpnt203drivers/scsi/sr.cif ((SCpnt->sense_buffer[0] & 0x7f) == 0x70) {
SCpnt204drivers/scsi/sr.cif ((SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) {
SCpnt208drivers/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->changed = 1;
SCpnt209drivers/scsi/sr.cend_scsi_request(SCpnt, 0, this_count);
SCpnt210drivers/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt215drivers/scsi/sr.cif (SCpnt->sense_buffer[2] == ILLEGAL_REQUEST) {
SCpnt217drivers/scsi/sr.cif (scsi_CDs[DEVICE_NR(SCpnt->request.dev)].ten) {
SCpnt218drivers/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.dev)].ten = 0;
SCpnt219drivers/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt223drivers/scsi/sr.cprintk("CD-ROM error: Drive reports %d.\n", SCpnt->sense_buffer[2]);        
SCpnt224drivers/scsi/sr.cend_scsi_request(SCpnt, 0, this_count);
SCpnt225drivers/scsi/sr.crequeue_sr_request(SCpnt); /* Do next request */
SCpnt231drivers/scsi/sr.cif (SCpnt->sense_buffer[2] == NOT_READY) {
SCpnt233drivers/scsi/sr.cend_scsi_request(SCpnt, 0, this_count);
SCpnt234drivers/scsi/sr.crequeue_sr_request(SCpnt); /* Do next request */
SCpnt242drivers/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->host->host_no, 
SCpnt243drivers/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->id,
SCpnt244drivers/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->lun,
SCpnt248drivers/scsi/sr.cprint_sense("sr", SCpnt);
SCpnt250drivers/scsi/sr.cend_scsi_request(SCpnt, 0, SCpnt->request.current_nr_sectors);
SCpnt251drivers/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt284drivers/scsi/sr.cScsi_Cmnd * SCpnt = NULL;
SCpnt298drivers/scsi/sr.cSCpnt = allocate_device(&CURRENT,
SCpnt300drivers/scsi/sr.celse SCpnt = NULL;
SCpnt310drivers/scsi/sr.cif (!SCpnt && NR_SR > 1){
SCpnt316drivers/scsi/sr.cSCpnt = request_queueable(req,
SCpnt318drivers/scsi/sr.cif(SCpnt) break;
SCpnt322drivers/scsi/sr.cif (SCpnt && req->dev == -1) {
SCpnt331drivers/scsi/sr.cif (!SCpnt)
SCpnt337drivers/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt341drivers/scsi/sr.cvoid requeue_sr_request (Scsi_Cmnd * SCpnt)
SCpnt350drivers/scsi/sr.cif(SCpnt->request.dev <= 0) {
SCpnt355drivers/scsi/sr.cdev =  MINOR(SCpnt->request.dev);
SCpnt356drivers/scsi/sr.cblock = SCpnt->request.sector;  
SCpnt363drivers/scsi/sr.cend_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt371drivers/scsi/sr.cend_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt382drivers/scsi/sr.cend_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt387drivers/scsi/sr.cswitch (SCpnt->request.cmd)
SCpnt390drivers/scsi/sr.cend_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt397drivers/scsi/sr.cpanic ("Unknown sr command %d\n", SCpnt->request.cmd);
SCpnt400drivers/scsi/sr.ccmd[1] = (SCpnt->lun << 5) & 0xe0;
SCpnt418drivers/scsi/sr.cSCpnt->use_sg = 0;
SCpnt420drivers/scsi/sr.cif (SCpnt->host->sg_tablesize > 0 &&
SCpnt426drivers/scsi/sr.cbh = SCpnt->request.bh;
SCpnt432drivers/scsi/sr.cthis_count = SCpnt->request.sector % 4;
SCpnt434drivers/scsi/sr.cwhile(bh && count < SCpnt->host->sg_tablesize) {
SCpnt443drivers/scsi/sr.cif (count < SCpnt->host->sg_tablesize) {
SCpnt452drivers/scsi/sr.cSCpnt->use_sg = count;  /* Number of chains */
SCpnt454drivers/scsi/sr.cwhile( count < (SCpnt->use_sg * sizeof(struct scatterlist))) 
SCpnt456drivers/scsi/sr.cSCpnt->sglist_len = count;
SCpnt460drivers/scsi/sr.cSCpnt->use_sg = 0;  /* No memory left - bail out */
SCpnt464drivers/scsi/sr.cbh = SCpnt->request.bh;
SCpnt465drivers/scsi/sr.cif(SCpnt->request.sector % 4) {
SCpnt466drivers/scsi/sr.csgpnt[count].length = (SCpnt->request.sector % 4) << 9;
SCpnt473drivers/scsi/sr.cfor(bh = SCpnt->request.bh; count < SCpnt->use_sg; 
SCpnt484drivers/scsi/sr.cif (count+1 != SCpnt->use_sg) panic("Bad sr request list");
SCpnt488drivers/scsi/sr.cISA_DMA_THRESHOLD & (SCpnt->host->unchecked_isa_dma)) {
SCpnt509drivers/scsi/sr.cSCpnt->use_sg = 0;
SCpnt510drivers/scsi/sr.cscsi_free(buffer, SCpnt->sglist_len);
SCpnt516drivers/scsi/sr.cprintk("SG: %d %d %d %d %d *** ",SCpnt->use_sg, SCpnt->request.sector,
SCpnt518drivers/scsi/sr.cSCpnt->request.current_nr_sectors,
SCpnt519drivers/scsi/sr.cSCpnt->request.nr_sectors);
SCpnt520drivers/scsi/sr.cfor(count=0; count<SCpnt->use_sg; count++)
SCpnt529drivers/scsi/sr.cif (SCpnt->use_sg == 0){
SCpnt531drivers/scsi/sr.cif (!SCpnt->request.bh)    
SCpnt532drivers/scsi/sr.cthis_count = SCpnt->request.nr_sectors;
SCpnt534drivers/scsi/sr.cthis_count = (SCpnt->request.bh->b_size >> 9);
SCpnt550drivers/scsi/sr.cbuffer = (unsigned char *) SCpnt->request.buffer;
SCpnt552drivers/scsi/sr.c(SCpnt->host->unchecked_isa_dma))
SCpnt602drivers/scsi/sr.cprintk("Use sg: %d\n", SCpnt->use_sg);
SCpnt609drivers/scsi/sr.cSCpnt->this_count = this_count;
SCpnt610drivers/scsi/sr.cscsi_do_cmd (SCpnt, (void *) cmd, buffer, 
SCpnt626drivers/scsi/sr.cstatic void sr_init_done (Scsi_Cmnd * SCpnt)
SCpnt631drivers/scsi/sr.creq = &SCpnt->request;
SCpnt646drivers/scsi/sr.cScsi_Cmnd * SCpnt;
SCpnt648drivers/scsi/sr.cSCpnt = allocate_device(NULL, scsi_CDs[i].device->index, 1);
SCpnt655drivers/scsi/sr.cSCpnt->request.dev = 0xffff;  /* Mark as really busy */
SCpnt657drivers/scsi/sr.cscsi_do_cmd (SCpnt,
SCpnt663drivers/scsi/sr.cwhile(SCpnt->request.dev != 0xfffe);
SCpnt665drivers/scsi/sr.cif (SCpnt->request.dev != 0xfffe){
SCpnt666drivers/scsi/sr.cSCpnt->request.waiting = current;
SCpnt668drivers/scsi/sr.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt671drivers/scsi/sr.cthe_result = SCpnt->result;
SCpnt676drivers/scsi/sr.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt678drivers/scsi/sr.cwake_up(&scsi_devices[SCpnt->index].device_wait); 
SCpnt21drivers/scsi/sr_ioctl.cstatic void sr_ioctl_done(Scsi_Cmnd * SCpnt)
SCpnt26drivers/scsi/sr_ioctl.creq = &SCpnt->request;
SCpnt43drivers/scsi/sr_ioctl.cScsi_Cmnd * SCpnt;
SCpnt46drivers/scsi/sr_ioctl.cSCpnt = allocate_device(NULL, scsi_CDs[target].device->index, 1);
SCpnt47drivers/scsi/sr_ioctl.cscsi_do_cmd(SCpnt,
SCpnt52drivers/scsi/sr_ioctl.cif (SCpnt->request.dev != 0xfffe){
SCpnt53drivers/scsi/sr_ioctl.cSCpnt->request.waiting = current;
SCpnt55drivers/scsi/sr_ioctl.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt58drivers/scsi/sr_ioctl.cresult = SCpnt->result;
SCpnt62drivers/scsi/sr_ioctl.cswitch(SCpnt->sense_buffer[2] & 0xf) {
SCpnt80drivers/scsi/sr_ioctl.csense_class(SCpnt->sense_buffer[0]), 
SCpnt81drivers/scsi/sr_ioctl.csense_error(SCpnt->sense_buffer[0]),
SCpnt82drivers/scsi/sr_ioctl.cSCpnt->sense_buffer[2] & 0xf);
SCpnt86drivers/scsi/sr_ioctl.cresult = SCpnt->result;
SCpnt87drivers/scsi/sr_ioctl.cSCpnt->request.dev = -1; /* Deallocate */
SCpnt88drivers/scsi/sr_ioctl.cwake_up(&scsi_devices[SCpnt->index].device_wait);
SCpnt103drivers/scsi/st.cstatic void st_sleep_done (Scsi_Cmnd * SCpnt)
SCpnt107drivers/scsi/st.cif ((st_nbr = SCpnt->request.dev) < NR_ST && st_nbr >= 0) {
SCpnt109drivers/scsi/st.c(SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt110drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x40))
SCpnt113drivers/scsi/st.cscsi_tapes[st_nbr].buffer->last_result = SCpnt->result;
SCpnt115drivers/scsi/st.cSCpnt->request.dev = -1;
SCpnt117drivers/scsi/st.cSCpnt->request.dev = 0xffff;
SCpnt128drivers/scsi/st.cstatic int st_chk_result(Scsi_Cmnd * SCpnt)
SCpnt131drivers/scsi/st.cint dev = SCpnt->request.dev;
SCpnt133drivers/scsi/st.cint result = SCpnt->result;
SCpnt134drivers/scsi/st.cunsigned char * sense = SCpnt->sense_buffer;
SCpnt140drivers/scsi/st.cprint_sense("st", SCpnt);
SCpnt180drivers/scsi/st.cScsi_Cmnd *SCpnt;
SCpnt197drivers/scsi/st.cSCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1);
SCpnt207drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt215drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt216drivers/scsi/st.cscsi_do_cmd (SCpnt,
SCpnt220drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting );
SCpnt222drivers/scsi/st.cif (SCpnt->result != 0) {
SCpnt225drivers/scsi/st.cst_chk_result(SCpnt);
SCpnt233drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt281drivers/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt312drivers/scsi/st.cSCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1);
SCpnt313drivers/scsi/st.cif (!SCpnt) {
SCpnt318drivers/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt321drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt322drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt327drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting );
SCpnt329drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt330drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == UNIT_ATTENTION) { /* New media? */
SCpnt332drivers/scsi/st.cprint_sense("st", SCpnt);
SCpnt334drivers/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt337drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt338drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt343drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting );
SCpnt346drivers/scsi/st.cif (SCpnt->result != 0) {
SCpnt348drivers/scsi/st.cprint_sense("st", SCpnt);
SCpnt350drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt351drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == NO_TAPE)
SCpnt354drivers/scsi/st.cprintk("st%d: Error %x.\n", dev, SCpnt->result);
SCpnt357drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt361drivers/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt364drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt365drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt369drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting );
SCpnt371drivers/scsi/st.cif (!SCpnt->result && !SCpnt->sense_buffer[0]) {
SCpnt388drivers/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt392drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt393drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt397drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting );
SCpnt399drivers/scsi/st.ci = st_chk_result(SCpnt);
SCpnt407drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt477drivers/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt492drivers/scsi/st.cSCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1);
SCpnt494drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt498drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt499drivers/scsi/st.cscsi_do_cmd( SCpnt,
SCpnt503drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting );
SCpnt505drivers/scsi/st.cif (SCpnt->result) {
SCpnt508drivers/scsi/st.cst_chk_result(SCpnt);
SCpnt511drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt543drivers/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt583drivers/scsi/st.cSCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1);
SCpnt620drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt621drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt622drivers/scsi/st.cscsi_do_cmd (SCpnt,
SCpnt627drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting );
SCpnt629drivers/scsi/st.cif (SCpnt->result || SCpnt->sense_buffer[0] != 0) {
SCpnt632drivers/scsi/st.cst_chk_result(SCpnt);
SCpnt634drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt635drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x40))
SCpnt639drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt660drivers/scsi/st.cdo_count = st_chk_result(SCpnt);
SCpnt662drivers/scsi/st.cSCpnt->request.dev = -1;
SCpnt684drivers/scsi/st.cSCpnt->result = scsi_tapes[dev].buffer->last_result = -1;
SCpnt685drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt686drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt687drivers/scsi/st.cscsi_do_cmd (SCpnt,
SCpnt694drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt707drivers/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt738drivers/scsi/st.cSCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1);
SCpnt758drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt759drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt760drivers/scsi/st.cscsi_do_cmd (SCpnt,
SCpnt765drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting );
SCpnt770drivers/scsi/st.cif (SCpnt->result != 0 || SCpnt->sense_buffer[0] != 0) {
SCpnt773drivers/scsi/st.cSCpnt->sense_buffer[0], SCpnt->sense_buffer[1],
SCpnt774drivers/scsi/st.cSCpnt->sense_buffer[2], SCpnt->sense_buffer[3],
SCpnt775drivers/scsi/st.cSCpnt->sense_buffer[4], SCpnt->sense_buffer[5],
SCpnt776drivers/scsi/st.cSCpnt->sense_buffer[6], SCpnt->sense_buffer[7]);
SCpnt778drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70) { /* extended sense */
SCpnt780drivers/scsi/st.cif ((SCpnt->sense_buffer[2] & 0xe0) != 0) { /* EOF, EOM, or ILI */
SCpnt781drivers/scsi/st.ctransfer = (SCpnt->sense_buffer[3] << 24) |
SCpnt782drivers/scsi/st.c(SCpnt->sense_buffer[4] << 16) |
SCpnt783drivers/scsi/st.c(SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6];
SCpnt785drivers/scsi/st.cif (SCpnt->sense_buffer[2] & 0x20) {
SCpnt793drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt797drivers/scsi/st.celse if (SCpnt->sense_buffer[2] & 0x40) {
SCpnt807drivers/scsi/st.celse if (SCpnt->sense_buffer[2] & 0x80) {
SCpnt825drivers/scsi/st.cSCpnt->sense_buffer[2] & 0x0f);
SCpnt826drivers/scsi/st.cprint_sense("st", SCpnt);
SCpnt828drivers/scsi/st.cSCpnt->request.dev = -1;
SCpnt836drivers/scsi/st.ctransfer = st_chk_result(SCpnt);
SCpnt837drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt865drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt878drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt893drivers/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt1094drivers/scsi/st.cSCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1);
SCpnt1095drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt1096drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt1097drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt1101drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting );
SCpnt1103drivers/scsi/st.cioctl_result = st_chk_result(SCpnt);
SCpnt1105drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt1155drivers/scsi/st.cScsi_Cmnd *SCpnt;
SCpnt1212drivers/scsi/st.cSCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1);
SCpnt1214drivers/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt1224drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt1225drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt1226drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt1230drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting );
SCpnt1232drivers/scsi/st.cif (SCpnt->result || SCpnt->sense_buffer[0]) {
SCpnt1253drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt40drivers/scsi/st.hScsi_Cmnd SCpnt;
SCpnt279drivers/scsi/ultrastor.cstatic inline void build_sg_list(struct mscp *, Scsi_Cmnd *SCpnt);
SCpnt640drivers/scsi/ultrastor.cstatic inline void build_sg_list(register struct mscp *mscp, Scsi_Cmnd *SCpnt)
SCpnt646drivers/scsi/ultrastor.csl = (struct scatterlist *) SCpnt->request_buffer;
SCpnt647drivers/scsi/ultrastor.cmax = SCpnt->use_sg;
SCpnt661drivers/scsi/ultrastor.cint ultrastor_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt699drivers/scsi/ultrastor.cmy_mscp->ca = scsi_devices[SCpnt->index].type != TYPE_TAPE;
SCpnt700drivers/scsi/ultrastor.cmy_mscp->target_id = SCpnt->target;
SCpnt702drivers/scsi/ultrastor.cmy_mscp->lun = SCpnt->lun;
SCpnt703drivers/scsi/ultrastor.cif (SCpnt->use_sg) {
SCpnt706drivers/scsi/ultrastor.cbuild_sg_list(my_mscp, SCpnt);
SCpnt710drivers/scsi/ultrastor.cmy_mscp->transfer_data = (unsigned int)SCpnt->request_buffer;
SCpnt711drivers/scsi/ultrastor.cmy_mscp->transfer_data_length = SCpnt->request_bufflen;
SCpnt715drivers/scsi/ultrastor.cmy_mscp->length_of_sense_byte = sizeof SCpnt->sense_buffer;
SCpnt716drivers/scsi/ultrastor.cmy_mscp->length_of_scsi_cdbs = COMMAND_SIZE(*(unsigned char *)SCpnt->cmnd);
SCpnt717drivers/scsi/ultrastor.cmemcpy(my_mscp->scsi_cdbs, SCpnt->cmnd, my_mscp->length_of_scsi_cdbs);
SCpnt720drivers/scsi/ultrastor.cmy_mscp->sense_data = (unsigned int)&SCpnt->sense_buffer;
SCpnt722drivers/scsi/ultrastor.cmy_mscp->SCint = SCpnt;
SCpnt723drivers/scsi/ultrastor.cSCpnt->host_scribble = (unsigned char *)my_mscp;
SCpnt769drivers/scsi/ultrastor.cSCpnt->result = status;
SCpnt770drivers/scsi/ultrastor.cdone(SCpnt);
SCpnt813drivers/scsi/ultrastor.cint ultrastor_abort(Scsi_Cmnd *SCpnt, int code)
SCpnt826drivers/scsi/ultrastor.cmscp_index = ((struct mscp *)SCpnt->host_scribble) - config.mscp;
SCpnt909drivers/scsi/ultrastor.cif (config.mscp[mscp_index].SCint != SCpnt)
SCpnt911drivers/scsi/ultrastor.cconfig.mscp[mscp_index].SCint, SCpnt);
SCpnt916drivers/scsi/ultrastor.cif (config.mscp[mscp_index].SCint != SCpnt) panic("Bad abort");
SCpnt920drivers/scsi/ultrastor.cSCpnt->result = DID_ABORT << 16;
SCpnt922drivers/scsi/ultrastor.cdone(SCpnt);
SCpnt929drivers/scsi/ultrastor.cint ultrastor_reset(Scsi_Cmnd * SCpnt)
SCpnt938drivers/scsi/ultrastor.cif (SCpnt) SCpnt->flags |= NEEDS_JUMPSTART;
SCpnt285drivers/scsi/wd7000.cstatic void wd7000_scsi_done(Scsi_Cmnd * SCpnt)
SCpnt287drivers/scsi/wd7000.cDEB(printk("wd7000_scsi_done: %06x\n",SCpnt);)
SCpnt288drivers/scsi/wd7000.cSCpnt->SCp.phase = 0;
SCpnt298drivers/scsi/wd7000.cScsi_Cmnd *SCpnt;
SCpnt328drivers/scsi/wd7000.cSCpnt = scb->SCpnt;
SCpnt329drivers/scsi/wd7000.cif (--(SCpnt->SCp.phase) <= 0)  {  /* all scbs for SCpnt are done */
SCpnt333drivers/scsi/wd7000.cSCpnt->result = errstatus;
SCpnt335drivers/scsi/wd7000.cif (SCpnt->host_scribble != NULL)
SCpnt336drivers/scsi/wd7000.cscsi_free(SCpnt->host_scribble,WD7000_SCRIBBLE);
SCpnt339drivers/scsi/wd7000.cSCpnt->scsi_done(SCpnt);
SCpnt353drivers/scsi/wd7000.cint wd7000_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt361drivers/scsi/wd7000.ccdb = (unchar *) SCpnt->cmnd;
SCpnt363drivers/scsi/wd7000.cidlun = ((SCpnt->target << 5) & 0xe0) | (SCpnt->lun & 7);
SCpnt364drivers/scsi/wd7000.cSCpnt->scsi_done = done;
SCpnt365drivers/scsi/wd7000.cSCpnt->SCp.phase = 1;
SCpnt370drivers/scsi/wd7000.cscb->SCpnt = SCpnt;         /* so we can find stuff later */
SCpnt371drivers/scsi/wd7000.cSCpnt->host_scribble = NULL;
SCpnt373drivers/scsi/wd7000.cSCpnt->request_bufflen, SCpnt->bufflen);)
SCpnt375drivers/scsi/wd7000.cif (SCpnt->use_sg)  {
SCpnt376drivers/scsi/wd7000.cstruct scatterlist *sg = (struct scatterlist *) SCpnt->request_buffer;
SCpnt383drivers/scsi/wd7000.cprintk("Using scatter/gather with %d elements.\n",SCpnt->use_sg);
SCpnt390drivers/scsi/wd7000.cif (SCpnt->use_sg > WD7000_SG)
SCpnt393drivers/scsi/wd7000.cSCpnt->host_scribble = (unsigned char *) scsi_malloc(WD7000_SCRIBBLE);
SCpnt394drivers/scsi/wd7000.csgb = (Sgb *) SCpnt->host_scribble;
SCpnt400drivers/scsi/wd7000.cany2scsi(scb->maxlen, SCpnt->use_sg * sizeof (Sgb) );
SCpnt402drivers/scsi/wd7000.cfor (i = 0;  i < SCpnt->use_sg;  i++)  {
SCpnt408drivers/scsi/wd7000.cscsi2int(scb->maxlen), SCpnt->use_sg);)
SCpnt411drivers/scsi/wd7000.cany2scsi(scb->dataptr, SCpnt->request_buffer);
SCpnt412drivers/scsi/wd7000.cany2scsi(scb->maxlen, SCpnt->request_bufflen);
SCpnt419drivers/scsi/wd7000.cint wd7000_command(Scsi_Cmnd *SCpnt)
SCpnt421drivers/scsi/wd7000.cwd7000_queuecommand(SCpnt, wd7000_scsi_done);
SCpnt423drivers/scsi/wd7000.cwhile (SCpnt->SCp.phase > 0);  /* phase counts scbs down to 0 */
SCpnt425drivers/scsi/wd7000.creturn SCpnt->result;
SCpnt581drivers/scsi/wd7000.cint wd7000_abort(Scsi_Cmnd * SCpnt, int i)
SCpnt584drivers/scsi/wd7000.cprintk("wd7000_abort: Scsi_Cmnd = 0x%08x, code = %d ", SCpnt, i);
SCpnt585drivers/scsi/wd7000.cprintk("id %d lun %d cdb", SCpnt->target, SCpnt->lun);
SCpnt586drivers/scsi/wd7000.c{  int j;  unchar *cdbj = (unchar *) SCpnt->cmnd;
SCpnt588drivers/scsi/wd7000.cprintk(" result %08x\n", SCpnt->result);
SCpnt599drivers/scsi/wd7000.cint wd7000_reset(Scsi_Cmnd * SCpnt)
SCpnt604drivers/scsi/wd7000.cif (SCpnt) SCpnt->flags |= NEEDS_JUMPSTART;
SCpnt141drivers/scsi/wd7000.hScsi_Cmnd *SCpnt;             /* Scsi_Cmnd using this SCB */