taglinefilesource code
SCpnt637drivers/scsi/NCR53c406a.cstatic void internal_done(Scsi_Cmnd *SCpnt) {
SCpnt638drivers/scsi/NCR53c406a.cinternal_done_errcode = SCpnt->result;
SCpnt660drivers/scsi/NCR53c406a.cint NCR53c406a_command(Scsi_Cmnd *SCpnt){
SCpnt662drivers/scsi/NCR53c406a.cNCR53c406a_queue(SCpnt, internal_done);
SCpnt675drivers/scsi/NCR53c406a.cNCR53c406a_queue(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)){
SCpnt681drivers/scsi/NCR53c406a.cSCpnt->cmnd[0],
SCpnt682drivers/scsi/NCR53c406a.cSCpnt->cmd_len,
SCpnt683drivers/scsi/NCR53c406a.cSCpnt->target, 
SCpnt684drivers/scsi/NCR53c406a.cSCpnt->lun,  
SCpnt685drivers/scsi/NCR53c406a.cSCpnt->request_bufflen));
SCpnt688drivers/scsi/NCR53c406a.cVDEB(for(i=0; i<SCpnt->cmd_len; i++)
SCpnt689drivers/scsi/NCR53c406a.cprintk("cmd[%d]=%02x  ", i, SCpnt->cmnd[i]));
SCpnt693drivers/scsi/NCR53c406a.ccurrent_SC = SCpnt;
SCpnt702drivers/scsi/NCR53c406a.coutb(SCpnt->target, DEST_ID);  /* set destination */
SCpnt705drivers/scsi/NCR53c406a.cfor(i=0; i<SCpnt->cmd_len; i++){
SCpnt706drivers/scsi/NCR53c406a.coutb(SCpnt->cmnd[i], SCSI_FIFO);
SCpnt716drivers/scsi/NCR53c406a.cNCR53c406a_abort(Scsi_Cmnd *SCpnt){
SCpnt722drivers/scsi/NCR53c406a.cNCR53c406a_reset(Scsi_Cmnd *SCpnt){
SCpnt793drivers/scsi/aha152x.cint aha152x_queue( Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt809drivers/scsi/aha152x.cprintk( "SCpnt (target = %d lun = %d cmnd = ", SCpnt->target, SCpnt->lun);
SCpnt810drivers/scsi/aha152x.cprint_command(SCpnt->cmnd);
SCpnt812drivers/scsi/aha152x.cSCpnt->cmd_len, SCpnt->use_sg, SCpnt->request_bufflen );
SCpnt817drivers/scsi/aha152x.cSCpnt->scsi_done =       done;
SCpnt825drivers/scsi/aha152x.cSCpnt->SCp.phase = not_issued;
SCpnt826drivers/scsi/aha152x.cif (SCpnt->use_sg)
SCpnt828drivers/scsi/aha152x.cSCpnt->SCp.buffer           = (struct scatterlist *)SCpnt->request_buffer;
SCpnt829drivers/scsi/aha152x.cSCpnt->SCp.ptr              = SCpnt->SCp.buffer->address;
SCpnt830drivers/scsi/aha152x.cSCpnt->SCp.this_residual    = SCpnt->SCp.buffer->length;
SCpnt831drivers/scsi/aha152x.cSCpnt->SCp.buffers_residual = SCpnt->use_sg - 1;
SCpnt835drivers/scsi/aha152x.cSCpnt->SCp.ptr              = (char *)SCpnt->request_buffer;
SCpnt836drivers/scsi/aha152x.cSCpnt->SCp.this_residual    = SCpnt->request_bufflen;
SCpnt837drivers/scsi/aha152x.cSCpnt->SCp.buffer           = NULL;
SCpnt838drivers/scsi/aha152x.cSCpnt->SCp.buffers_residual = 0;
SCpnt841drivers/scsi/aha152x.cSCpnt->SCp.Status              = CHECK_CONDITION;
SCpnt842drivers/scsi/aha152x.cSCpnt->SCp.Message             = 0;
SCpnt843drivers/scsi/aha152x.cSCpnt->SCp.have_data_in        = 0;
SCpnt844drivers/scsi/aha152x.cSCpnt->SCp.sent_command        = 0;
SCpnt857drivers/scsi/aha152x.cappend_SC( &issue_SC, SCpnt);
SCpnt877drivers/scsi/aha152x.cint aha152x_command( Scsi_Cmnd *SCpnt )
SCpnt887drivers/scsi/aha152x.cint aha152x_abort( Scsi_Cmnd *SCpnt)
SCpnt898drivers/scsi/aha152x.cprintk("aha152x: abort(), SCpnt=0x%08x, ", (unsigned int) SCpnt );
SCpnt906drivers/scsi/aha152x.cptr && ptr!=SCpnt;
SCpnt927drivers/scsi/aha152x.cif ( TESTLO(SSTAT1, BUSFREE) || (current_SC && current_SC!=SCpnt))
SCpnt952drivers/scsi/aha152x.cptr && ptr!=SCpnt;
SCpnt513drivers/scsi/aha1542.cint aha1542_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt517drivers/scsi/aha1542.cunchar *cmd = (unchar *) SCpnt->cmnd;
SCpnt518drivers/scsi/aha1542.cunchar target = SCpnt->target;
SCpnt519drivers/scsi/aha1542.cunchar lun = SCpnt->lun;
SCpnt521drivers/scsi/aha1542.cvoid *buff = SCpnt->request_buffer;
SCpnt522drivers/scsi/aha1542.cint bufflen = SCpnt->request_bufflen;
SCpnt529drivers/scsi/aha1542.cmb = HOSTDATA(SCpnt->host)->mb;
SCpnt530drivers/scsi/aha1542.cccb = HOSTDATA(SCpnt->host)->ccb;
SCpnt533drivers/scsi/aha1542.cSCpnt->result = DID_TIME_OUT << 16;
SCpnt534drivers/scsi/aha1542.cdone(SCpnt); return 0;});
SCpnt538drivers/scsi/aha1542.cif (bufflen != sizeof(SCpnt->sense_buffer)) {
SCpnt542drivers/scsi/aha1542.cSCpnt->result = 0;
SCpnt543drivers/scsi/aha1542.cdone(SCpnt); 
SCpnt560drivers/scsi/aha1542.cfor (i = 0; i < SCpnt->cmd_len; i++) printk("%02x ", cmd[i]);
SCpnt570drivers/scsi/aha1542.cmbo = HOSTDATA(SCpnt->host)->aha1542_last_mbo_used + 1;
SCpnt574drivers/scsi/aha1542.cif(mb[mbo].status == 0 && HOSTDATA(SCpnt->host)->SCint[mbo] == NULL)
SCpnt578drivers/scsi/aha1542.c} while (mbo != HOSTDATA(SCpnt->host)->aha1542_last_mbo_used);
SCpnt580drivers/scsi/aha1542.cif(mb[mbo].status || HOSTDATA(SCpnt->host)->SCint[mbo])
SCpnt583drivers/scsi/aha1542.cHOSTDATA(SCpnt->host)->SCint[mbo] = SCpnt;  /* This will effectively prevent someone else from
SCpnt586drivers/scsi/aha1542.cHOSTDATA(SCpnt->host)->aha1542_last_mbo_used = mbo;    
SCpnt597drivers/scsi/aha1542.cccb[mbo].cdblen = SCpnt->cmd_len;
SCpnt607drivers/scsi/aha1542.cif (SCpnt->use_sg) {
SCpnt615drivers/scsi/aha1542.cSCpnt->host_scribble = (unsigned char *) scsi_malloc(512);
SCpnt616drivers/scsi/aha1542.csgpnt = (struct scatterlist *) SCpnt->request_buffer;
SCpnt617drivers/scsi/aha1542.ccptr = (struct chain *) SCpnt->host_scribble; 
SCpnt619drivers/scsi/aha1542.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt620drivers/scsi/aha1542.cif(sgpnt[i].length == 0 || SCpnt->use_sg > 16 || 
SCpnt623drivers/scsi/aha1542.cprintk("Bad segment list supplied to aha1542.c (%d, %d)\n",SCpnt->use_sg,i);
SCpnt624drivers/scsi/aha1542.cfor(i=0;i<SCpnt->use_sg;i++){
SCpnt637drivers/scsi/aha1542.cany2scsi(ccb[mbo].datalen, SCpnt->use_sg * sizeof(struct chain));
SCpnt646drivers/scsi/aha1542.cSCpnt->host_scribble = NULL;
SCpnt666drivers/scsi/aha1542.cSCpnt->scsi_done = done;
SCpnt668drivers/scsi/aha1542.caha1542_out(SCpnt->host->io_port, &ahacmd, 1);    /* start scsi command */
SCpnt679drivers/scsi/aha1542.cstatic void internal_done(Scsi_Cmnd * SCpnt)
SCpnt681drivers/scsi/aha1542.cSCpnt->SCp.Status++;
SCpnt684drivers/scsi/aha1542.cint aha1542_command(Scsi_Cmnd * SCpnt)
SCpnt688drivers/scsi/aha1542.caha1542_queuecommand(SCpnt, internal_done);
SCpnt690drivers/scsi/aha1542.cSCpnt->SCp.Status = 0;
SCpnt691drivers/scsi/aha1542.cwhile (!SCpnt->SCp.Status)
SCpnt693drivers/scsi/aha1542.creturn SCpnt->result;
SCpnt1112drivers/scsi/aha1542.cint aha1542_abort(Scsi_Cmnd * SCpnt)
SCpnt1121drivers/scsi/aha1542.cinb(STATUS(SCpnt->host->io_port)),
SCpnt1122drivers/scsi/aha1542.cinb(INTRFLAGS(SCpnt->host->io_port)));
SCpnt1126drivers/scsi/aha1542.cmb = HOSTDATA(SCpnt->host)->mb;
SCpnt1127drivers/scsi/aha1542.cmbi = HOSTDATA(SCpnt->host)->aha1542_last_mbi_used + 1;
SCpnt1134drivers/scsi/aha1542.c} while (mbi != HOSTDATA(SCpnt->host)->aha1542_last_mbi_used);
SCpnt1139drivers/scsi/aha1542.cSCpnt->host->irq);
SCpnt1140drivers/scsi/aha1542.caha1542_intr_handle(SCpnt->host->irq, NULL);
SCpnt1148drivers/scsi/aha1542.cif(HOSTDATA(SCpnt->host)->SCint[i])
SCpnt1150drivers/scsi/aha1542.cif(HOSTDATA(SCpnt->host)->SCint[i] == SCpnt) {
SCpnt1152drivers/scsi/aha1542.ckdevname(SCpnt->request.rq_dev));
SCpnt1153drivers/scsi/aha1542.cif (HOSTDATA(SCpnt->host)->mb[i].status) {
SCpnt1155drivers/scsi/aha1542.caha1542_out(SCpnt->host->io_port, &ahacmd, 1);
SCpnt1159drivers/scsi/aha1542.ckdevname(SCpnt->request.rq_dev));
SCpnt1169drivers/scsi/aha1542.cif (SCpnt == HOSTDATA(SCpnt->host)->SCint[mbo]){
SCpnt1171drivers/scsi/aha1542.caha1542_out(SCpnt->host->io_port, &ahacmd, 1); /* start scsi command */
SCpnt1185drivers/scsi/aha1542.cint aha1542_reset(Scsi_Cmnd * SCpnt)
SCpnt1193drivers/scsi/aha1542.cif( SCpnt->host->suggest_bus_reset )
SCpnt1201drivers/scsi/aha1542.coutb(HRST | SCRST, CONTROL(SCpnt->host->io_port));
SCpnt1210drivers/scsi/aha1542.cWAIT(STATUS(SCpnt->host->io_port), 
SCpnt1217drivers/scsi/aha1542.csetup_mailboxes(SCpnt->host->io_port, SCpnt->host);
SCpnt1225drivers/scsi/aha1542.cprintk("Sent BUS RESET to scsi host %d\n", SCpnt->host->host_no);
SCpnt1228drivers/scsi/aha1542.cif(HOSTDATA(SCpnt->host)->SCint[i] != NULL)
SCpnt1231drivers/scsi/aha1542.cSCtmp = HOSTDATA(SCpnt->host)->SCint[i];
SCpnt1234drivers/scsi/aha1542.cprintk("Sending DID_RESET for target %d\n", SCpnt->target);
SCpnt1235drivers/scsi/aha1542.cSCtmp->scsi_done(SCpnt);
SCpnt1237drivers/scsi/aha1542.cHOSTDATA(SCpnt->host)->SCint[i] = NULL;
SCpnt1238drivers/scsi/aha1542.cHOSTDATA(SCpnt->host)->mb[i].status = 0;
SCpnt1258drivers/scsi/aha1542.cif(HOSTDATA(SCpnt->host)->SCint[i] == SCpnt)
SCpnt1260drivers/scsi/aha1542.cHOSTDATA(SCpnt->host)->ccb[i].op = 0x81;  /* BUS DEVICE RESET */
SCpnt1262drivers/scsi/aha1542.caha1542_out(SCpnt->host->io_port, &ahacmd, 1);
SCpnt1268drivers/scsi/aha1542.cprintk("Sent BUS DEVICE RESET to target %d\n", SCpnt->target);
SCpnt1274drivers/scsi/aha1542.cif(HOSTDATA(SCpnt->host)->SCint[i] &&
SCpnt1275drivers/scsi/aha1542.cHOSTDATA(SCpnt->host)->SCint[i]->target == SCpnt->target)
SCpnt1278drivers/scsi/aha1542.cSCtmp = HOSTDATA(SCpnt->host)->SCint[i];
SCpnt1281drivers/scsi/aha1542.cprintk("Sending DID_RESET for target %d\n", SCpnt->target);
SCpnt1282drivers/scsi/aha1542.cSCtmp->scsi_done(SCpnt);
SCpnt1284drivers/scsi/aha1542.cHOSTDATA(SCpnt->host)->SCint[i] = NULL;
SCpnt1285drivers/scsi/aha1542.cHOSTDATA(SCpnt->host)->mb[i].status = 0;
SCpnt206drivers/scsi/aha1740.cSCtmp = ecbptr->SCpnt;
SCpnt252drivers/scsi/aha1740.cint aha1740_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt255drivers/scsi/aha1740.cunchar *cmd = (unchar *) SCpnt->cmnd;
SCpnt256drivers/scsi/aha1740.cunchar target = SCpnt->target;
SCpnt258drivers/scsi/aha1740.cvoid *buff = SCpnt->request_buffer;
SCpnt259drivers/scsi/aha1740.cint bufflen = SCpnt->request_bufflen;
SCpnt266drivers/scsi/aha1740.cif (bufflen != sizeof(SCpnt->sense_buffer))
SCpnt270drivers/scsi/aha1740.cSCpnt->result = 0;
SCpnt271drivers/scsi/aha1740.cdone(SCpnt); 
SCpnt284drivers/scsi/aha1740.cfor (i = 0; i < SCpnt->cmd_len; i++) printk("%02x ", cmd[i]);
SCpnt314drivers/scsi/aha1740.cecb[ecbno].cdblen = SCpnt->cmd_len;  /* SCSI Command Descriptor Block Length */
SCpnt324drivers/scsi/aha1740.cif (SCpnt->use_sg)
SCpnt333drivers/scsi/aha1740.cSCpnt->host_scribble = (unsigned char *) scsi_malloc(512);
SCpnt334drivers/scsi/aha1740.csgpnt = (struct scatterlist *) SCpnt->request_buffer;
SCpnt335drivers/scsi/aha1740.ccptr = (struct aha1740_chain *) SCpnt->host_scribble; 
SCpnt337drivers/scsi/aha1740.cfor(i=0; i<SCpnt->use_sg; i++)
SCpnt342drivers/scsi/aha1740.cecb[ecbno].datalen = SCpnt->use_sg * sizeof(struct aha1740_chain);
SCpnt352drivers/scsi/aha1740.cSCpnt->host_scribble = NULL;
SCpnt356drivers/scsi/aha1740.cecb[ecbno].lun = SCpnt->lun;
SCpnt364drivers/scsi/aha1740.cecb[ecbno].SCpnt = SCpnt;
SCpnt415drivers/scsi/aha1740.cstatic void internal_done(Scsi_Cmnd * SCpnt)
SCpnt417drivers/scsi/aha1740.cinternal_done_errcode = SCpnt->result;
SCpnt421drivers/scsi/aha1740.cint aha1740_command(Scsi_Cmnd * SCpnt)
SCpnt423drivers/scsi/aha1740.caha1740_queuecommand(SCpnt, internal_done);
SCpnt492drivers/scsi/aha1740.cint aha1740_abort(Scsi_Cmnd * SCpnt)
SCpnt502drivers/scsi/aha1740.cint aha1740_reset(Scsi_Cmnd * SCpnt)
SCpnt143drivers/scsi/aha1740.hScsi_Cmnd *SCpnt;    /* Link to the SCSI Command Block */
SCpnt373drivers/scsi/constants.cvoid print_sense(const char * devclass, Scsi_Cmnd * SCpnt)
SCpnt377drivers/scsi/constants.cunsigned char * sense_buffer = SCpnt->sense_buffer;
SCpnt386drivers/scsi/constants.cif(s > sizeof(SCpnt->sense_buffer)) s = sizeof(SCpnt->sense_buffer);
SCpnt410drivers/scsi/constants.ckdevname(SCpnt->request.rq_dev), snstext[sense_buffer[2] & 0x0f]);
SCpnt413drivers/scsi/constants.ckdevname(SCpnt->request.rq_dev), sense_buffer[0], sense_buffer[2]);
SCpnt442drivers/scsi/constants.ckdevname(SCpnt->request.rq_dev), snstext[sense_buffer[0] & 0x0f]);
SCpnt446drivers/scsi/constants.ckdevname(SCpnt->request.rq_dev), sense_buffer[0], sense_buffer[2]);
SCpnt261drivers/scsi/eata.cScsi_Cmnd *SCpnt;           /* Address set in cp */
SCpnt288drivers/scsi/eata.cScsi_Cmnd *SCpnt;     /* Address to be returned is sp */
SCpnt590drivers/scsi/eata.cstatic inline void build_sg_list(struct mscp *cpp, Scsi_Cmnd *SCpnt) {
SCpnt594drivers/scsi/eata.csgpnt = (struct scatterlist *) SCpnt->request_buffer;
SCpnt596drivers/scsi/eata.cfor (k = 0; k < SCpnt->use_sg; k++) {
SCpnt602drivers/scsi/eata.ccpp->data_len = htonl((SCpnt->use_sg * sizeof(struct sg_list)));
SCpnt605drivers/scsi/eata.cint eata2x_queuecommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) {
SCpnt619drivers/scsi/eata.cj = ((struct hostdata *) SCpnt->host->hostdata)->board_number;
SCpnt621drivers/scsi/eata.cif (!done) panic("%s: qcomm, pid %ld, null done.\n", BN(j), SCpnt->pid);
SCpnt642drivers/scsi/eata.celse if (eata2x_reset(SCpnt) == SCSI_RESET_SUCCESS) 
SCpnt645drivers/scsi/eata.cSCpnt->result = DID_BUS_BUSY << 16; 
SCpnt646drivers/scsi/eata.cSCpnt->host_scribble = NULL;
SCpnt647drivers/scsi/eata.cprintk("%s: qcomm, pid %ld, DID_BUS_BUSY, done.\n", BN(j), SCpnt->pid);
SCpnt649drivers/scsi/eata.cdone(SCpnt);    
SCpnt666drivers/scsi/eata.cSCpnt->scsi_done = done;
SCpnt668drivers/scsi/eata.cSCpnt->host_scribble = (unsigned char *) &cpp->index;
SCpnt671drivers/scsi/eata.cBN(j), i, SCpnt->target, SCpnt->pid);
SCpnt674drivers/scsi/eata.cif (SCpnt->cmnd[0] == data_out_cmds[k]) {
SCpnt683drivers/scsi/eata.ccpp->target = SCpnt->target;
SCpnt684drivers/scsi/eata.ccpp->lun = SCpnt->lun;  
SCpnt685drivers/scsi/eata.ccpp->SCpnt = SCpnt;
SCpnt686drivers/scsi/eata.ccpp->sense_addr = htonl((unsigned int) SCpnt->sense_buffer); 
SCpnt687drivers/scsi/eata.ccpp->sense_len = sizeof SCpnt->sense_buffer;
SCpnt689drivers/scsi/eata.cif (SCpnt->use_sg) {
SCpnt691drivers/scsi/eata.cbuild_sg_list(cpp, SCpnt);
SCpnt694drivers/scsi/eata.ccpp->data_address = htonl((unsigned int) SCpnt->request_buffer);
SCpnt695drivers/scsi/eata.ccpp->data_len = htonl(SCpnt->request_bufflen);
SCpnt698drivers/scsi/eata.cmemcpy(cpp->cdb, SCpnt->cmnd, SCpnt->cmd_len);
SCpnt702drivers/scsi/eata.cSCpnt->result = DID_ERROR << 16; 
SCpnt703drivers/scsi/eata.cSCpnt->host_scribble = NULL;
SCpnt705drivers/scsi/eata.cBN(j), SCpnt->target, SCpnt->pid);
SCpnt707drivers/scsi/eata.cdone(SCpnt);    
SCpnt752drivers/scsi/eata.cif (SCarg != HD(j)->cp[i].SCpnt)
SCpnt754drivers/scsi/eata.cBN(j), i, SCarg, HD(j)->cp[i].SCpnt);
SCpnt778drivers/scsi/eata.cScsi_Cmnd *SCpnt;
SCpnt815drivers/scsi/eata.cSCpnt = HD(j)->cp[i].SCpnt;
SCpnt818drivers/scsi/eata.cBN(j), i, SCpnt->pid);
SCpnt820drivers/scsi/eata.cif (SCpnt == NULL)
SCpnt823drivers/scsi/eata.cif (SCpnt->host_scribble == NULL)
SCpnt826drivers/scsi/eata.cif (*(unsigned int *)SCpnt->host_scribble != i) 
SCpnt829drivers/scsi/eata.cif (SCpnt->scsi_done == NULL) 
SCpnt832drivers/scsi/eata.cif (SCpnt == SCarg) arg_done = TRUE;
SCpnt859drivers/scsi/eata.cSCpnt = HD(j)->cp[i].SCpnt;
SCpnt860drivers/scsi/eata.cSCpnt->result = DID_RESET << 16;
SCpnt861drivers/scsi/eata.cSCpnt->host_scribble = NULL;
SCpnt867drivers/scsi/eata.cBN(j), i, SCpnt->pid);
SCpnt869drivers/scsi/eata.cSCpnt->scsi_done(SCpnt);
SCpnt888drivers/scsi/eata.cScsi_Cmnd *SCpnt;
SCpnt954drivers/scsi/eata.cSCpnt = spp->SCpnt;
SCpnt956drivers/scsi/eata.cif (SCpnt == NULL)
SCpnt959drivers/scsi/eata.cif (SCpnt != cpp->SCpnt)
SCpnt961drivers/scsi/eata.cBN(j), i, SCpnt, cpp->SCpnt);
SCpnt963drivers/scsi/eata.cif (SCpnt->host_scribble == NULL)
SCpnt965drivers/scsi/eata.cBN(j), i, SCpnt->pid, SCpnt);
SCpnt967drivers/scsi/eata.cif (*(unsigned int *)SCpnt->host_scribble != i) 
SCpnt969drivers/scsi/eata.c" irq %d.\n", BN(j), i, SCpnt->pid, 
SCpnt970drivers/scsi/eata.c*(unsigned int *)SCpnt->host_scribble, irq);
SCpnt978drivers/scsi/eata.cif (tstatus == BUSY && SCpnt->device->type != TYPE_TAPE) 
SCpnt983drivers/scsi/eata.c&& SCpnt->device->type == TYPE_DISK
SCpnt984drivers/scsi/eata.c&& HD(j)->target_reset[SCpnt->target])
SCpnt989drivers/scsi/eata.c&& SCpnt->device->type == TYPE_DISK
SCpnt990drivers/scsi/eata.c&& (SCpnt->sense_buffer[2] & 0xf) == RECOVERED_ERROR)
SCpnt997drivers/scsi/eata.cHD(j)->target_reset[SCpnt->target] = FALSE;
SCpnt999drivers/scsi/eata.cif (spp->target_status && SCpnt->device->type == TYPE_DISK)
SCpnt1002drivers/scsi/eata.cSCpnt->target, SCpnt->lun, SCpnt->pid,
SCpnt1003drivers/scsi/eata.cspp->target_status, SCpnt->sense_buffer[2]);
SCpnt1005drivers/scsi/eata.cHD(j)->target_time_out[SCpnt->target] = 0;
SCpnt1011drivers/scsi/eata.cif (HD(j)->target_time_out[SCpnt->target] > 1)
SCpnt1015drivers/scsi/eata.cHD(j)->target_time_out[SCpnt->target]++;
SCpnt1022drivers/scsi/eata.cif (SCpnt->device->type != TYPE_TAPE)
SCpnt1044drivers/scsi/eata.cSCpnt->result = status | spp->target_status;
SCpnt1050drivers/scsi/eata.cif (SCpnt->result || do_trace)
SCpnt1060drivers/scsi/eata.cSCpnt->target, SCpnt->lun, SCpnt->pid, HD(j)->iocount);
SCpnt1063drivers/scsi/eata.cSCpnt->host_scribble = NULL;
SCpnt1066drivers/scsi/eata.cSCpnt->scsi_done(SCpnt);
SCpnt1644drivers/scsi/fdomain.cint fdomain_16x0_queue( Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt1651drivers/scsi/fdomain.cSCpnt->target,
SCpnt1652drivers/scsi/fdomain.c*(unsigned char *)SCpnt->cmnd,
SCpnt1653drivers/scsi/fdomain.cSCpnt->use_sg,
SCpnt1654drivers/scsi/fdomain.cSCpnt->request_bufflen );
SCpnt1659drivers/scsi/fdomain.ccurrent_SC            = SCpnt; /* Save this for the done function */
SCpnt1702drivers/scsi/fdomain.cstatic void internal_done( Scsi_Cmnd *SCpnt )
SCpnt1704drivers/scsi/fdomain.cinternal_done_errcode = SCpnt->result;
SCpnt1708drivers/scsi/fdomain.cint fdomain_16x0_command( Scsi_Cmnd *SCpnt )
SCpnt1710drivers/scsi/fdomain.cfdomain_16x0_queue( SCpnt, internal_done );
SCpnt1720drivers/scsi/fdomain.cvoid print_info( Scsi_Cmnd *SCpnt )
SCpnt1726drivers/scsi/fdomain.cif (!SCpnt || !SCpnt->host) {
SCpnt1730drivers/scsi/fdomain.cprintk( "%s\n", fdomain_16x0_info( SCpnt->host ) );
SCpnt1731drivers/scsi/fdomain.cprint_banner( SCpnt->host );
SCpnt1732drivers/scsi/fdomain.cswitch (SCpnt->SCp.phase) {
SCpnt1740drivers/scsi/fdomain.cSCpnt->SCp.phase,
SCpnt1741drivers/scsi/fdomain.cSCpnt->target,
SCpnt1742drivers/scsi/fdomain.c*(unsigned char *)SCpnt->cmnd,
SCpnt1743drivers/scsi/fdomain.cSCpnt->use_sg,
SCpnt1744drivers/scsi/fdomain.cSCpnt->request_bufflen );
SCpnt1746drivers/scsi/fdomain.cSCpnt->SCp.sent_command,
SCpnt1747drivers/scsi/fdomain.cSCpnt->SCp.have_data_in,
SCpnt1748drivers/scsi/fdomain.cSCpnt->timeout );
SCpnt1789drivers/scsi/fdomain.cint fdomain_16x0_abort( Scsi_Cmnd *SCpnt)
SCpnt1807drivers/scsi/fdomain.cprint_info( SCpnt );
SCpnt1824drivers/scsi/fdomain.cint fdomain_16x0_reset( Scsi_Cmnd *SCpnt )
SCpnt1831drivers/scsi/fdomain.cif (SCpnt) printk( "fdomain: SCSI Bus Reset\n" );
SCpnt418drivers/scsi/in2000.cint in2000_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt421drivers/scsi/in2000.cunchar *cmd = (unchar *) SCpnt->cmnd;
SCpnt422drivers/scsi/in2000.cunchar target = SCpnt->target;
SCpnt423drivers/scsi/in2000.cvoid *buff = SCpnt->request_buffer;
SCpnt425drivers/scsi/in2000.cint bufflen = SCpnt->request_bufflen;
SCpnt452drivers/scsi/in2000.cfor (i = 0; i < SCpnt->cmd_len; i++) printk("%02x ", cmd[i]);
SCpnt458drivers/scsi/in2000.csize = SCpnt->cmd_len;  /* CDB length */ 
SCpnt497drivers/scsi/in2000.cSCpnt->result = DID_TIME_OUT << 16;
SCpnt498drivers/scsi/in2000.c(*done)(SCpnt);
SCpnt502drivers/scsi/in2000.cin2000_nsegment = SCpnt->use_sg;
SCpnt504drivers/scsi/in2000.cif(SCpnt->use_sg){
SCpnt514drivers/scsi/in2000.cin2000_SCptr = SCpnt;
SCpnt522drivers/scsi/in2000.coutb(SCpnt->lun & 7,INDATA);
SCpnt523drivers/scsi/in2000.cSCpnt->host_scribble = NULL;
SCpnt567drivers/scsi/in2000.cstatic void internal_done(Scsi_Cmnd * SCpnt)
SCpnt569drivers/scsi/in2000.cinternal_done_errcode = SCpnt->result;
SCpnt573drivers/scsi/in2000.cint in2000_command(Scsi_Cmnd * SCpnt)
SCpnt575drivers/scsi/in2000.cin2000_queuecommand(SCpnt, internal_done);
SCpnt656drivers/scsi/in2000.cint in2000_abort(Scsi_Cmnd * SCpnt)
SCpnt673drivers/scsi/in2000.cint in2000_reset(Scsi_Cmnd * SCpnt)
SCpnt690drivers/scsi/in2000.cif(SCpnt) SCpnt->flags |= NEEDS_JUMPSTART;
SCpnt61drivers/scsi/scsi.cstatic void scsi_done (Scsi_Cmnd *SCpnt);
SCpnt64drivers/scsi/scsi.cstatic void scsi_times_out (Scsi_Cmnd * SCpnt, int pid);
SCpnt342drivers/scsi/scsi.cstatic void scan_scsis_done (Scsi_Cmnd * SCpnt)
SCpnt346drivers/scsi/scsi.cprintk ("scan_scsis_done(%p, %06x)\n", SCpnt->host, SCpnt->result);
SCpnt348drivers/scsi/scsi.cSCpnt->request.rq_status = RQ_SCSI_DONE;
SCpnt350drivers/scsi/scsi.cif (SCpnt->request.sem != NULL)
SCpnt351drivers/scsi/scsi.cup(SCpnt->request.sem);
SCpnt386drivers/scsi/scsi.cScsi_Cmnd  *SCpnt;
SCpnt391drivers/scsi/scsi.cSCpnt = (Scsi_Cmnd *) scsi_init_malloc(sizeof(Scsi_Cmnd), GFP_ATOMIC|GFP_DMA);
SCpnt406drivers/scsi/scsi.cshpnt->host_queue = SCpnt; /* We need this so that commands can time out */
SCpnt452drivers/scsi/scsi.cmemset(SCpnt, 0,  sizeof(Scsi_Cmnd));
SCpnt453drivers/scsi/scsi.cSCpnt->host = SDpnt->host;
SCpnt454drivers/scsi/scsi.cSCpnt->device = SDpnt;
SCpnt455drivers/scsi/scsi.cSCpnt->target = SDpnt->id;
SCpnt456drivers/scsi/scsi.cSCpnt->lun = SDpnt->lun;
SCpnt457drivers/scsi/scsi.cSCpnt->channel = SDpnt->channel;
SCpnt464drivers/scsi/scsi.cSCpnt->request.sem = &sem;
SCpnt465drivers/scsi/scsi.cSCpnt->request.rq_status = RQ_SCSI_BUSY;
SCpnt466drivers/scsi/scsi.cscsi_do_cmd (SCpnt, (void *)  scsi_cmd, 
SCpnt474drivers/scsi/scsi.cprintk("scsi: return code %08x\n", SCpnt->result);
SCpnt477drivers/scsi/scsi.cif(SCpnt->result) {
SCpnt478drivers/scsi/scsi.cif (((driver_byte(SCpnt->result) & DRIVER_SENSE) ||
SCpnt479drivers/scsi/scsi.c(status_byte(SCpnt->result) & CHECK_CONDITION)) &&
SCpnt480drivers/scsi/scsi.c((SCpnt->sense_buffer[0] & 0x70) >> 4) == 7) {
SCpnt481drivers/scsi/scsi.cif (SCpnt->sense_buffer[2] &0xe0)
SCpnt483drivers/scsi/scsi.cif(((SCpnt->sense_buffer[2] & 0xf) != NOT_READY) &&
SCpnt484drivers/scsi/scsi.c((SCpnt->sense_buffer[2] & 0xf) != UNIT_ATTENTION))
SCpnt505drivers/scsi/scsi.cSCpnt->cmd_len = 0;
SCpnt509drivers/scsi/scsi.cSCpnt->request.sem = &sem;
SCpnt510drivers/scsi/scsi.cSCpnt->request.rq_status = RQ_SCSI_BUSY;
SCpnt511drivers/scsi/scsi.cscsi_do_cmd (SCpnt, (void *)  scsi_cmd, 
SCpnt517drivers/scsi/scsi.cthe_result = SCpnt->result;
SCpnt670drivers/scsi/scsi.cSCpnt->cmd_len = 0;
SCpnt673drivers/scsi/scsi.cSCpnt->request.rq_status = RQ_SCSI_BUSY;
SCpnt674drivers/scsi/scsi.cSCpnt->request.sem = &sem;
SCpnt675drivers/scsi/scsi.cscsi_do_cmd (SCpnt, (void *)  scsi_cmd,
SCpnt748drivers/scsi/scsi.cif(SCpnt != NULL)
SCpnt749drivers/scsi/scsi.cscsi_init_free((char *) SCpnt, sizeof(Scsi_Cmnd));
SCpnt772drivers/scsi/scsi.cstatic void scsi_times_out (Scsi_Cmnd * SCpnt, int pid)
SCpnt775drivers/scsi/scsi.cswitch (SCpnt->internal_timeout & (IN_ABORT | IN_RESET))
SCpnt784drivers/scsi/scsi.cif (!scsi_abort (SCpnt, DID_TIME_OUT, pid))
SCpnt788drivers/scsi/scsi.cSCpnt->host->host_no);
SCpnt789drivers/scsi/scsi.cif (!scsi_reset (SCpnt, FALSE))
SCpnt797drivers/scsi/scsi.cprintk("Unable to reset scsi host %d - ", SCpnt->host->host_no);
SCpnt799drivers/scsi/scsi.cscsi_reset (SCpnt, TRUE);
SCpnt818drivers/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt829drivers/scsi/scsi.cSCpnt =  device->host->host_queue;
SCpnt837drivers/scsi/scsi.cSCpnt = device->host->host_queue;
SCpnt839drivers/scsi/scsi.cwhile(SCpnt){
SCpnt840drivers/scsi/scsi.cif(SCpnt->target == device->id &&
SCpnt841drivers/scsi/scsi.cSCpnt->lun == device->lun) {
SCpnt842drivers/scsi/scsi.cif(SCpnt->request.rq_status == RQ_INACTIVE) break;
SCpnt844drivers/scsi/scsi.cSCpnt = SCpnt->next;
SCpnt847drivers/scsi/scsi.cwhile(SCpnt){
SCpnt848drivers/scsi/scsi.cif(SCpnt->target == device->id) {
SCpnt849drivers/scsi/scsi.cif (SCpnt->lun == device->lun) {
SCpnt851drivers/scsi/scsi.c&& SCpnt->request.rq_status == RQ_INACTIVE) 
SCpnt853drivers/scsi/scsi.cfound=SCpnt;
SCpnt856drivers/scsi/scsi.cif(SCpnt->request.rq_status != RQ_INACTIVE) {
SCpnt865drivers/scsi/scsi.cSCpnt = SCpnt->next;
SCpnt867drivers/scsi/scsi.cSCpnt = found;
SCpnt870drivers/scsi/scsi.cif (!SCpnt) return NULL;
SCpnt875drivers/scsi/scsi.cmemcpy(&SCpnt->request, req, sizeof(struct request));
SCpnt892drivers/scsi/scsi.cSCpnt->request.bhtail = bh;
SCpnt898drivers/scsi/scsi.cSCpnt->request.nr_sectors -= req->nr_sectors;
SCpnt901drivers/scsi/scsi.cSCpnt->request.sem = NULL; /* Wait until whole thing done */
SCpnt907drivers/scsi/scsi.cSCpnt->request.rq_status = RQ_SCSI_BUSY;  /* Busy, but no request */
SCpnt908drivers/scsi/scsi.cSCpnt->request.sem = NULL;   /* And no one is waiting for the device 
SCpnt912drivers/scsi/scsi.cSCpnt->use_sg = 0;               /* Reset the scatter-gather flag */
SCpnt913drivers/scsi/scsi.cSCpnt->old_use_sg  = 0;
SCpnt914drivers/scsi/scsi.cSCpnt->transfersize = 0;
SCpnt915drivers/scsi/scsi.cSCpnt->underflow = 0;
SCpnt916drivers/scsi/scsi.cSCpnt->cmd_len = 0;
SCpnt921drivers/scsi/scsi.cSCpnt->channel = device->channel;
SCpnt922drivers/scsi/scsi.cSCpnt->lun = device->lun;
SCpnt923drivers/scsi/scsi.cSCpnt->target = device->id;
SCpnt925drivers/scsi/scsi.creturn SCpnt;
SCpnt947drivers/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt968drivers/scsi/scsi.cSCpnt = device->host->host_queue;
SCpnt970drivers/scsi/scsi.cwhile(SCpnt){
SCpnt971drivers/scsi/scsi.cif(SCpnt->target == device->id &&
SCpnt972drivers/scsi/scsi.cSCpnt->lun == device->lun) {
SCpnt973drivers/scsi/scsi.cSCwait = SCpnt;
SCpnt974drivers/scsi/scsi.cif(SCpnt->request.rq_status == RQ_INACTIVE) break;
SCpnt976drivers/scsi/scsi.cSCpnt = SCpnt->next;
SCpnt979drivers/scsi/scsi.cwhile(SCpnt){
SCpnt980drivers/scsi/scsi.cif(SCpnt->target == device->id) {
SCpnt981drivers/scsi/scsi.cif (SCpnt->lun == device->lun) {
SCpnt982drivers/scsi/scsi.cSCwait = SCpnt;
SCpnt984drivers/scsi/scsi.c&& SCpnt->request.rq_status == RQ_INACTIVE) 
SCpnt986drivers/scsi/scsi.cfound=SCpnt;
SCpnt989drivers/scsi/scsi.cif(SCpnt->request.rq_status != RQ_INACTIVE) {
SCpnt999drivers/scsi/scsi.cSCpnt = SCpnt->next;
SCpnt1001drivers/scsi/scsi.cSCpnt = found;
SCpnt1012drivers/scsi/scsi.cif (!SCpnt || SCpnt->request.rq_status != RQ_INACTIVE)  /* Might have changed */
SCpnt1025drivers/scsi/scsi.cmemcpy(&SCpnt->request, req, sizeof(struct request));
SCpnt1042drivers/scsi/scsi.cSCpnt->request.bhtail = bh;
SCpnt1047drivers/scsi/scsi.cSCpnt->request.nr_sectors -= req->nr_sectors;
SCpnt1050drivers/scsi/scsi.cSCpnt->request.sem = NULL; /* Wait until whole thing done*/
SCpnt1059drivers/scsi/scsi.cSCpnt->request.rq_status = RQ_SCSI_BUSY;
SCpnt1060drivers/scsi/scsi.cSCpnt->request.sem = NULL;   /* And no one is waiting for this 
SCpnt1068drivers/scsi/scsi.cSCpnt->use_sg = 0;            /* Reset the scatter-gather flag */
SCpnt1069drivers/scsi/scsi.cSCpnt->old_use_sg  = 0;
SCpnt1070drivers/scsi/scsi.cSCpnt->transfersize = 0;      /* No default transfer size */
SCpnt1071drivers/scsi/scsi.cSCpnt->cmd_len = 0;
SCpnt1073drivers/scsi/scsi.cSCpnt->underflow = 0;         /* Do not flag underflow conditions */
SCpnt1078drivers/scsi/scsi.cSCpnt->channel = device->channel;
SCpnt1079drivers/scsi/scsi.cSCpnt->lun = device->lun;
SCpnt1080drivers/scsi/scsi.cSCpnt->target = device->id;
SCpnt1082drivers/scsi/scsi.creturn SCpnt;
SCpnt1089drivers/scsi/scsi.cinline void internal_cmnd (Scsi_Cmnd * SCpnt)
SCpnt1098drivers/scsi/scsi.chost = SCpnt->host;
SCpnt1110drivers/scsi/scsi.cupdate_timeout(SCpnt, SCpnt->timeout_per_command);
SCpnt1119drivers/scsi/scsi.cSCpnt->host->host_no, SCpnt->channel, SCpnt->target, SCpnt->cmnd, 
SCpnt1120drivers/scsi/scsi.cSCpnt->buffer, SCpnt->bufflen, SCpnt->done);
SCpnt1138drivers/scsi/scsi.cif(!intr_count && SCpnt->host->irq)
SCpnt1139drivers/scsi/scsi.cdisable_irq(SCpnt->host->irq);
SCpnt1141drivers/scsi/scsi.chost->hostt->queuecommand (SCpnt, scsi_done);
SCpnt1143drivers/scsi/scsi.cif(!intr_count && SCpnt->host->irq)
SCpnt1144drivers/scsi/scsi.cenable_irq(SCpnt->host->irq);
SCpnt1152drivers/scsi/scsi.ctemp=host->hostt->command (SCpnt);
SCpnt1153drivers/scsi/scsi.cSCpnt->result = temp;
SCpnt1160drivers/scsi/scsi.cscsi_done(SCpnt);
SCpnt1167drivers/scsi/scsi.cstatic void scsi_request_sense (Scsi_Cmnd * SCpnt)
SCpnt1173drivers/scsi/scsi.cSCpnt->flags |= WAS_SENSE | ASKED_FOR_SENSE;
SCpnt1174drivers/scsi/scsi.cupdate_timeout(SCpnt, SENSE_TIMEOUT);
SCpnt1178drivers/scsi/scsi.cmemcpy ((void *) SCpnt->cmnd , (void *) generic_sense, 
SCpnt1181drivers/scsi/scsi.cSCpnt->cmnd[1] = SCpnt->lun << 5;
SCpnt1182drivers/scsi/scsi.cSCpnt->cmnd[4] = sizeof(SCpnt->sense_buffer);
SCpnt1184drivers/scsi/scsi.cSCpnt->request_buffer = &SCpnt->sense_buffer;
SCpnt1185drivers/scsi/scsi.cSCpnt->request_bufflen = sizeof(SCpnt->sense_buffer);
SCpnt1186drivers/scsi/scsi.cSCpnt->use_sg = 0;
SCpnt1187drivers/scsi/scsi.cSCpnt->cmd_len = COMMAND_SIZE(SCpnt->cmnd[0]);
SCpnt1188drivers/scsi/scsi.cinternal_cmnd (SCpnt);
SCpnt1200drivers/scsi/scsi.cvoid scsi_do_cmd (Scsi_Cmnd * SCpnt, const void *cmnd ,
SCpnt1205drivers/scsi/scsi.cstruct Scsi_Host * host = SCpnt->host;
SCpnt1210drivers/scsi/scsi.cint target = SCpnt->target;
SCpnt1214drivers/scsi/scsi.c"command : " , host->host_no, SCpnt->channel, target, buffer, 
SCpnt1238drivers/scsi/scsi.cSCpnt->pid = scsi_pid++;
SCpnt1258drivers/scsi/scsi.cmemcpy ((void *) SCpnt->data_cmnd , (const void *) cmnd, 12);
SCpnt1260drivers/scsi/scsi.cSCpnt->host = host;
SCpnt1261drivers/scsi/scsi.cSCpnt->channel = channel;
SCpnt1262drivers/scsi/scsi.cSCpnt->target = target;
SCpnt1263drivers/scsi/scsi.cSCpnt->lun = (SCpnt->data_cmnd[1] >> 5);
SCpnt1265drivers/scsi/scsi.cSCpnt->bufflen = bufflen;
SCpnt1266drivers/scsi/scsi.cSCpnt->buffer = buffer;
SCpnt1267drivers/scsi/scsi.cSCpnt->flags=0;
SCpnt1268drivers/scsi/scsi.cSCpnt->retries=0;
SCpnt1269drivers/scsi/scsi.cSCpnt->allowed=retries;
SCpnt1270drivers/scsi/scsi.cSCpnt->done = done;
SCpnt1271drivers/scsi/scsi.cSCpnt->timeout_per_command = timeout;
SCpnt1273drivers/scsi/scsi.cmemcpy ((void *) SCpnt->cmnd , (const void *) cmnd, 12);
SCpnt1277drivers/scsi/scsi.cmemset ((void *) SCpnt->sense_buffer, 0, sizeof SCpnt->sense_buffer);
SCpnt1278drivers/scsi/scsi.cSCpnt->request_buffer = buffer;
SCpnt1279drivers/scsi/scsi.cSCpnt->request_bufflen = bufflen;
SCpnt1280drivers/scsi/scsi.cSCpnt->old_use_sg = SCpnt->use_sg;
SCpnt1281drivers/scsi/scsi.cif (SCpnt->cmd_len == 0)
SCpnt1282drivers/scsi/scsi.cSCpnt->cmd_len = COMMAND_SIZE(SCpnt->cmnd[0]);
SCpnt1283drivers/scsi/scsi.cSCpnt->old_cmd_len = SCpnt->cmd_len;
SCpnt1287drivers/scsi/scsi.cSCpnt->internal_timeout = 0;
SCpnt1288drivers/scsi/scsi.cSCpnt->abort_reason = 0;
SCpnt1289drivers/scsi/scsi.cinternal_cmnd (SCpnt);
SCpnt1296drivers/scsi/scsi.cstatic int check_sense (Scsi_Cmnd * SCpnt)
SCpnt1302drivers/scsi/scsi.cif (((SCpnt->sense_buffer[0] & 0x70) >> 4) != 7) {
SCpnt1303drivers/scsi/scsi.cif(!(SCpnt->flags & ASKED_FOR_SENSE))
SCpnt1309drivers/scsi/scsi.cSCpnt->flags &= ~ASKED_FOR_SENSE;
SCpnt1312drivers/scsi/scsi.cprintk("scsi%d, channel%d : ", SCpnt->host->host_no, SCpnt->channel);
SCpnt1313drivers/scsi/scsi.cprint_sense("", SCpnt);
SCpnt1316drivers/scsi/scsi.cif (SCpnt->sense_buffer[2] & 0xe0)
SCpnt1319drivers/scsi/scsi.cswitch (SCpnt->sense_buffer[2] & 0xf)
SCpnt1336drivers/scsi/scsi.cif( SCpnt->device->expecting_cc_ua )
SCpnt1338drivers/scsi/scsi.cSCpnt->device->expecting_cc_ua = 0;
SCpnt1380drivers/scsi/scsi.cstatic void scsi_done (Scsi_Cmnd * SCpnt)
SCpnt1386drivers/scsi/scsi.cstruct Scsi_Host * host = SCpnt->host;
SCpnt1387drivers/scsi/scsi.cint result = SCpnt->result;
SCpnt1388drivers/scsi/scsi.coldto = update_timeout(SCpnt, 0);
SCpnt1392drivers/scsi/scsi.cresult, SCpnt->target, SCpnt->lun);
SCpnt1398drivers/scsi/scsi.cif(host_byte(result) == DID_ABORT && SCpnt->abort_reason)
SCpnt1399drivers/scsi/scsi.cSCpnt->result = result = (result & 0xff00ffff) |
SCpnt1400drivers/scsi/scsi.c(SCpnt->abort_reason << 16);
SCpnt1412drivers/scsi/scsi.cif(SCpnt->flags & WAS_SENSE)
SCpnt1414drivers/scsi/scsi.cSCpnt->use_sg = SCpnt->old_use_sg;
SCpnt1415drivers/scsi/scsi.cSCpnt->cmd_len = SCpnt->old_cmd_len;
SCpnt1421drivers/scsi/scsi.cif (status_byte(result) && (SCpnt->flags & WAS_SENSE))
SCpnt1424drivers/scsi/scsi.cSCpnt->flags &= ~WAS_SENSE;
SCpnt1425drivers/scsi/scsi.cSCpnt->internal_timeout &= ~SENSE_TIMEOUT;
SCpnt1427drivers/scsi/scsi.cif (!(SCpnt->flags & WAS_RESET))
SCpnt1431drivers/scsi/scsi.cSCpnt->host->host_no, SCpnt->channel, SCpnt->target, 
SCpnt1432drivers/scsi/scsi.cSCpnt->lun);
SCpnt1433drivers/scsi/scsi.cscsi_reset(SCpnt, FALSE);
SCpnt1448drivers/scsi/scsi.cif (SCpnt->flags & WAS_SENSE)
SCpnt1453drivers/scsi/scsi.cSCpnt->flags &= ~WAS_SENSE;
SCpnt1454drivers/scsi/scsi.cSCpnt->internal_timeout &= ~SENSE_TIMEOUT;
SCpnt1456drivers/scsi/scsi.cswitch (checked = check_sense(SCpnt))
SCpnt1463drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1499drivers/scsi/scsi.cswitch (check_sense(SCpnt))
SCpnt1502drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1515drivers/scsi/scsi.cscsi_request_sense (SCpnt);
SCpnt1527drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1533drivers/scsi/scsi.c" reset.\n", SCpnt->host->host_no, SCpnt->channel);
SCpnt1534drivers/scsi/scsi.cscsi_reset(SCpnt, FALSE);
SCpnt1558drivers/scsi/scsi.cif (SCpnt->flags & WAS_TIMEDOUT)
SCpnt1570drivers/scsi/scsi.cSCpnt->flags  |= WAS_TIMEDOUT;
SCpnt1571drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_ABORT;
SCpnt1594drivers/scsi/scsi.cif (SCpnt->flags & IS_RESETTING)
SCpnt1596drivers/scsi/scsi.cSCpnt->flags &= ~IS_RESETTING;
SCpnt1603drivers/scsi/scsi.cswitch (check_sense(SCpnt)) {
SCpnt1605drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1618drivers/scsi/scsi.cscsi_request_sense (SCpnt);
SCpnt1639drivers/scsi/scsi.cSCpnt->allowed, SCpnt->retries);
SCpnt1641drivers/scsi/scsi.cif ((++SCpnt->retries) < SCpnt->allowed)
SCpnt1643drivers/scsi/scsi.cif ((SCpnt->retries >= (SCpnt->allowed >> 1))
SCpnt1644drivers/scsi/scsi.c&& !(jiffies < SCpnt->host->last_reset + MIN_RESET_PERIOD)
SCpnt1645drivers/scsi/scsi.c&& !(SCpnt->flags & WAS_RESET))
SCpnt1648drivers/scsi/scsi.cSCpnt->host->host_no, SCpnt->channel);
SCpnt1649drivers/scsi/scsi.cscsi_reset(SCpnt, FALSE);
SCpnt1663drivers/scsi/scsi.cif (SCpnt->flags & WAS_SENSE)
SCpnt1664drivers/scsi/scsi.cscsi_request_sense(SCpnt);
SCpnt1667drivers/scsi/scsi.cmemcpy ((void *) SCpnt->cmnd,
SCpnt1668drivers/scsi/scsi.c(void*) SCpnt->data_cmnd,
SCpnt1669drivers/scsi/scsi.csizeof(SCpnt->data_cmnd));
SCpnt1670drivers/scsi/scsi.cSCpnt->request_buffer = SCpnt->buffer;
SCpnt1671drivers/scsi/scsi.cSCpnt->request_bufflen = SCpnt->bufflen;
SCpnt1672drivers/scsi/scsi.cSCpnt->use_sg = SCpnt->old_use_sg;
SCpnt1673drivers/scsi/scsi.cSCpnt->cmd_len = SCpnt->old_cmd_len;
SCpnt1674drivers/scsi/scsi.cinternal_cmnd (SCpnt);
SCpnt1683drivers/scsi/scsi.cprintk("Calling done function - at address %p\n", SCpnt->done);
SCpnt1691drivers/scsi/scsi.cif (MAJOR(SCpnt->request.rq_dev) != SCSI_DISK_MAJOR &&
SCpnt1692drivers/scsi/scsi.cMAJOR(SCpnt->request.rq_dev) != SCSI_CDROM_MAJOR) {
SCpnt1702drivers/scsi/scsi.cSCpnt->result = result | ((exit & 0xff) << 24);
SCpnt1703drivers/scsi/scsi.cSCpnt->use_sg = SCpnt->old_use_sg;
SCpnt1704drivers/scsi/scsi.cSCpnt->cmd_len = SCpnt->old_cmd_len;
SCpnt1705drivers/scsi/scsi.cSCpnt->done (SCpnt);
SCpnt1730drivers/scsi/scsi.cint scsi_abort (Scsi_Cmnd * SCpnt, int why, int pid)
SCpnt1734drivers/scsi/scsi.cstruct Scsi_Host * host = SCpnt->host;
SCpnt1745drivers/scsi/scsi.cif (SCpnt->request.rq_status == RQ_INACTIVE || pid != SCpnt->pid) {
SCpnt1750drivers/scsi/scsi.cif (SCpnt->internal_timeout & IN_ABORT)
SCpnt1753drivers/scsi/scsi.cwhile (SCpnt->internal_timeout & IN_ABORT)
SCpnt1758drivers/scsi/scsi.cSCpnt->internal_timeout |= IN_ABORT;
SCpnt1759drivers/scsi/scsi.coldto = update_timeout(SCpnt, ABORT_TIMEOUT);
SCpnt1761drivers/scsi/scsi.cif ((SCpnt->flags & IS_RESETTING) &&
SCpnt1762drivers/scsi/scsi.cSCpnt->device->soft_reset) {
SCpnt1768drivers/scsi/scsi.cSCpnt->channel, SCpnt->target, SCpnt->lun);
SCpnt1773drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_ABORT;
SCpnt1774drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1779drivers/scsi/scsi.cSCpnt->pid, SCpnt->host->host_no, (int) SCpnt->channel, 
SCpnt1780drivers/scsi/scsi.c(int) SCpnt->target, (int) SCpnt->lun);
SCpnt1781drivers/scsi/scsi.cprint_command (SCpnt->cmnd);
SCpnt1782drivers/scsi/scsi.cif (SCpnt->request.rq_status == RQ_INACTIVE || pid != SCpnt->pid)
SCpnt1784drivers/scsi/scsi.cSCpnt->abort_reason = why;
SCpnt1785drivers/scsi/scsi.cswitch(host->hostt->abort(SCpnt)) {
SCpnt1797drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_ABORT;
SCpnt1798drivers/scsi/scsi.cif(SCpnt->flags & WAS_TIMEDOUT) {
SCpnt1805drivers/scsi/scsi.cSCpnt->flags |= WAS_TIMEDOUT;
SCpnt1806drivers/scsi/scsi.coldto = SCpnt->timeout_per_command;
SCpnt1807drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1816drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1825drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_ABORT;
SCpnt1826drivers/scsi/scsi.cupdate_timeout(SCpnt, 0);
SCpnt1830drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_ABORT;
SCpnt1837drivers/scsi/scsi.cint scsi_reset (Scsi_Cmnd * SCpnt, int bus_reset_flag)
SCpnt1842drivers/scsi/scsi.cstruct Scsi_Host * host = SCpnt->host;
SCpnt1856drivers/scsi/scsi.cSCpnt->host->suggest_bus_reset = FALSE;
SCpnt1876drivers/scsi/scsi.cSCpnt->host->suggest_bus_reset = TRUE;
SCpnt1886drivers/scsi/scsi.cSCpnt->host->suggest_bus_reset = TRUE;
SCpnt1892drivers/scsi/scsi.cif (SCpnt->internal_timeout & IN_RESET)
SCpnt1895drivers/scsi/scsi.cwhile (SCpnt->internal_timeout & IN_RESET)
SCpnt1900drivers/scsi/scsi.cSCpnt->internal_timeout |= IN_RESET;
SCpnt1901drivers/scsi/scsi.coldto = update_timeout(SCpnt, RESET_TIMEOUT);
SCpnt1912drivers/scsi/scsi.cscsi_abort(SCpnt1, DID_RESET, SCpnt->pid);
SCpnt1920drivers/scsi/scsi.ctemp = host->hostt->reset(SCpnt);
SCpnt1928drivers/scsi/scsi.cSCpnt->flags |= (WAS_RESET | IS_RESETTING);
SCpnt1929drivers/scsi/scsi.ctemp = host->hostt->reset(SCpnt);
SCpnt1961drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_RESET;
SCpnt1962drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1968drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_RESET;
SCpnt1969drivers/scsi/scsi.cscsi_request_sense (SCpnt);
SCpnt1972drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_RESET;
SCpnt1973drivers/scsi/scsi.cscsi_request_sense (SCpnt);
SCpnt1983drivers/scsi/scsi.cif( SCpnt->request.rq_status != RQ_INACTIVE
SCpnt1984drivers/scsi/scsi.c&& SCpnt1 != SCpnt)
SCpnt1985drivers/scsi/scsi.cscsi_request_sense (SCpnt);
SCpnt1998drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_RESET;
SCpnt1999drivers/scsi/scsi.cupdate_timeout(SCpnt, 0);
SCpnt2022drivers/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt2036drivers/scsi/scsi.cfor(SCpnt = host->host_queue; SCpnt; SCpnt = SCpnt->next)
SCpnt2037drivers/scsi/scsi.cif (SCpnt->timeout == -1)
SCpnt2039drivers/scsi/scsi.cSCpnt->timeout = 0;
SCpnt2040drivers/scsi/scsi.cpid = SCpnt->pid;
SCpnt2042drivers/scsi/scsi.cscsi_times_out(SCpnt, pid);
SCpnt2066drivers/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt2093drivers/scsi/scsi.cfor(SCpnt = host->host_queue; SCpnt; SCpnt = SCpnt->next)
SCpnt2094drivers/scsi/scsi.cif (SCpnt->timeout > 0) {
SCpnt2095drivers/scsi/scsi.cSCpnt->timeout -= used;
SCpnt2096drivers/scsi/scsi.cif(SCpnt->timeout <= 0) SCpnt->timeout = -1;
SCpnt2097drivers/scsi/scsi.cif(SCpnt->timeout > 0 && SCpnt->timeout < least)
SCpnt2098drivers/scsi/scsi.cleast = SCpnt->timeout;
SCpnt2244drivers/scsi/scsi.cScsi_Cmnd * SCpnt;
SCpnt2248drivers/scsi/scsi.cSCpnt = (Scsi_Cmnd *) scsi_init_malloc(sizeof(Scsi_Cmnd), GFP_ATOMIC);
SCpnt2249drivers/scsi/scsi.cSCpnt->host = SDpnt->host;
SCpnt2250drivers/scsi/scsi.cSCpnt->device = SDpnt;
SCpnt2251drivers/scsi/scsi.cSCpnt->target = SDpnt->id;
SCpnt2252drivers/scsi/scsi.cSCpnt->lun = SDpnt->lun;
SCpnt2253drivers/scsi/scsi.cSCpnt->channel = SDpnt->channel;
SCpnt2254drivers/scsi/scsi.cSCpnt->request.rq_status = RQ_INACTIVE;
SCpnt2255drivers/scsi/scsi.cSCpnt->use_sg = 0;
SCpnt2256drivers/scsi/scsi.cSCpnt->old_use_sg = 0;
SCpnt2257drivers/scsi/scsi.cSCpnt->old_cmd_len = 0;
SCpnt2258drivers/scsi/scsi.cSCpnt->timeout = 0;
SCpnt2259drivers/scsi/scsi.cSCpnt->underflow = 0;
SCpnt2260drivers/scsi/scsi.cSCpnt->transfersize = 0;
SCpnt2261drivers/scsi/scsi.cSCpnt->host_scribble = NULL;
SCpnt2264drivers/scsi/scsi.chost->host_queue->prev = SCpnt;
SCpnt2265drivers/scsi/scsi.cSCpnt->next = host->host_queue;
SCpnt2266drivers/scsi/scsi.cSCpnt->prev = NULL;
SCpnt2267drivers/scsi/scsi.chost->host_queue = SCpnt;
SCpnt2705drivers/scsi/scsi.cScsi_Cmnd * SCpnt;
SCpnt2721drivers/scsi/scsi.cfor(SCpnt = shpnt->host_queue; SCpnt; SCpnt = SCpnt->next)
SCpnt2725drivers/scsi/scsi.cif(SCpnt->request.rq_status != RQ_INACTIVE) {
SCpnt2727drivers/scsi/scsi.cfor(SCpnt = shpnt->host_queue; SCpnt; SCpnt = SCpnt->next)
SCpnt2728drivers/scsi/scsi.cif(SCpnt->request.rq_status == RQ_SCSI_DISCONNECTING)
SCpnt2729drivers/scsi/scsi.cSCpnt->request.rq_status = RQ_INACTIVE;
SCpnt2733drivers/scsi/scsi.cSCpnt->request.rq_status = RQ_SCSI_DISCONNECTING;  /* Mark as busy */
SCpnt2756drivers/scsi/scsi.cSCpnt = sdpnt->host->host_queue->next;
SCpnt2758drivers/scsi/scsi.csdpnt->host->host_queue = SCpnt;
SCpnt2759drivers/scsi/scsi.cif (SCpnt) SCpnt->prev = NULL;
SCpnt2905drivers/scsi/scsi.cScsi_Cmnd * SCpnt;
SCpnt2926drivers/scsi/scsi.cfor(SCpnt = SDpnt->host->host_queue; SCpnt; SCpnt = SCpnt->next)
SCpnt2928drivers/scsi/scsi.cif(SCpnt->device == SDpnt)
SCpnt2930drivers/scsi/scsi.cif(SCpnt->prev != NULL)
SCpnt2931drivers/scsi/scsi.cSCpnt->prev->next = SCpnt->next;
SCpnt2932drivers/scsi/scsi.cif(SCpnt->next != NULL)
SCpnt2933drivers/scsi/scsi.cSCpnt->next->prev = SCpnt->prev;
SCpnt2934drivers/scsi/scsi.cif(SCpnt == SDpnt->host->host_queue)
SCpnt2935drivers/scsi/scsi.cSDpnt->host->host_queue = SCpnt->next;
SCpnt2936drivers/scsi/scsi.cscsi_init_free((char *) SCpnt, sizeof(*SCpnt));
SCpnt3013drivers/scsi/scsi.cScsi_Cmnd * SCpnt;
SCpnt3017drivers/scsi/scsi.cfor(SCpnt=shpnt->host_queue; SCpnt; SCpnt = SCpnt->next)
SCpnt3021drivers/scsi/scsi.ci++, SCpnt->host->host_no,
SCpnt3022drivers/scsi/scsi.cSCpnt->channel,
SCpnt3023drivers/scsi/scsi.cSCpnt->target,
SCpnt3024drivers/scsi/scsi.cSCpnt->lun,
SCpnt3025drivers/scsi/scsi.ckdevname(SCpnt->request.rq_dev),
SCpnt3026drivers/scsi/scsi.cSCpnt->request.sector,
SCpnt3027drivers/scsi/scsi.cSCpnt->request.nr_sectors,
SCpnt3028drivers/scsi/scsi.cSCpnt->request.current_nr_sectors,
SCpnt3029drivers/scsi/scsi.cSCpnt->use_sg,
SCpnt3030drivers/scsi/scsi.cSCpnt->retries,
SCpnt3031drivers/scsi/scsi.cSCpnt->allowed,
SCpnt3032drivers/scsi/scsi.cSCpnt->flags,
SCpnt3033drivers/scsi/scsi.cSCpnt->timeout_per_command,
SCpnt3034drivers/scsi/scsi.cSCpnt->timeout,
SCpnt3035drivers/scsi/scsi.cSCpnt->internal_timeout,
SCpnt3036drivers/scsi/scsi.cSCpnt->cmnd[0],
SCpnt3037drivers/scsi/scsi.cSCpnt->sense_buffer[2],
SCpnt3038drivers/scsi/scsi.cSCpnt->result);
SCpnt456drivers/scsi/scsi.hstatic Scsi_Cmnd * end_scsi_request(Scsi_Cmnd * SCpnt, int uptodate, int sectors)
SCpnt461drivers/scsi/scsi.hreq = &SCpnt->request;
SCpnt488drivers/scsi/scsi.hreturn SCpnt;
SCpnt495drivers/scsi/scsi.hif (SCpnt->host->block) {
SCpnt498drivers/scsi/scsi.hfor (next = SCpnt->host->block; next != SCpnt->host;
SCpnt505drivers/scsi/scsi.hwake_up(&SCpnt->device->device_wait);
SCpnt87drivers/scsi/scsi_debug.cif ((MINOR(SCpnt->request.rq_dev) & 0xf) != 0) start = starts[(MINOR(SCpnt->request.rq_dev) & 0xf) - 1];        \
SCpnt94drivers/scsi/scsi_debug.cif (bh->b_dev != SCpnt->request.rq_dev)  \
SCpnt99drivers/scsi/scsi_debug.cif (bufflen != 1024 && (!SCpnt->use_sg)) {printk("%x %d\n ",bufflen, SCpnt->use_sg); panic("Bad bufflen");};    \
SCpnt101drivers/scsi/scsi_debug.cif ((MINOR(SCpnt->request.rq_dev) & 0xf) > npart) panic ("Bad partition");    \
SCpnt102drivers/scsi/scsi_debug.cif ((MINOR(SCpnt->request.rq_dev) & 0xf) != 0) start = starts[(MINOR(SCpnt->request.rq_dev) & 0xf) - 1];        \
SCpnt103drivers/scsi/scsi_debug.cif (SCpnt->request.cmd != RW) panic ("Wrong  operation");       \
SCpnt104drivers/scsi/scsi_debug.cif (SCpnt->request.sector + start != block) panic("Wrong block.");  \
SCpnt105drivers/scsi/scsi_debug.cif (SCpnt->request.current_nr_sectors != 2 && (!SCpnt->use_sg)) panic ("Wrong # blocks");   \
SCpnt106drivers/scsi/scsi_debug.cif (SCpnt->request.bh){                         \
SCpnt107drivers/scsi/scsi_debug.cif (SCpnt->request.bh->b_size != 1024) panic ("Wrong bh size"); \
SCpnt108drivers/scsi/scsi_debug.cif ((SCpnt->request.bh->b_blocknr << 1) + start != block)           \
SCpnt109drivers/scsi/scsi_debug.c{   printk("Wrong bh block# %d %d ",SCpnt->request.bh->b_blocknr, block);  \
SCpnt112drivers/scsi/scsi_debug.cif (SCpnt->request.bh->b_dev != SCpnt->request.rq_dev) \
SCpnt131drivers/scsi/scsi_debug.cstatic void scsi_dump(Scsi_Cmnd * SCpnt, int flag){
SCpnt138drivers/scsi/scsi_debug.cprintk("use_sg: %d",SCpnt->use_sg);
SCpnt139drivers/scsi/scsi_debug.cif (SCpnt->use_sg){
SCpnt140drivers/scsi/scsi_debug.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt141drivers/scsi/scsi_debug.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt147drivers/scsi/scsi_debug.cprintk("nosg: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer,
SCpnt148drivers/scsi/scsi_debug.cSCpnt->bufflen);
SCpnt149drivers/scsi/scsi_debug.clpnt = (int *) SCpnt->request.buffer;
SCpnt152drivers/scsi/scsi_debug.clpnt = (unsigned int *) SCpnt;
SCpnt176drivers/scsi/scsi_debug.cint scsi_debug_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt178drivers/scsi/scsi_debug.cunchar *cmd = (unchar *) SCpnt->cmnd;
SCpnt186drivers/scsi/scsi_debug.cint target = SCpnt->target;
SCpnt187drivers/scsi/scsi_debug.cint bufflen = SCpnt->request_bufflen;
SCpnt193drivers/scsi/scsi_debug.cDEB(if (target > 1) { SCpnt->result = DID_TIME_OUT << 16;done(SCpnt);return 0;});
SCpnt195drivers/scsi/scsi_debug.cbuff = (unsigned char *) SCpnt->request_buffer;
SCpnt197drivers/scsi/scsi_debug.cif(target>=1 || SCpnt->lun != 0) {
SCpnt198drivers/scsi/scsi_debug.cSCpnt->result =  DID_NO_CONNECT << 16;
SCpnt199drivers/scsi/scsi_debug.cdone(SCpnt);
SCpnt206drivers/scsi/scsi_debug.cmemset(SCpnt->sense_buffer, 0, sizeof(SCpnt->sense_buffer));
SCpnt207drivers/scsi/scsi_debug.cSCpnt->sense_buffer[0] = 0x70;
SCpnt208drivers/scsi/scsi_debug.cSCpnt->sense_buffer[2] = UNIT_ATTENTION;
SCpnt209drivers/scsi/scsi_debug.cSCpnt->result = (CHECK_CONDITION << 1);
SCpnt210drivers/scsi/scsi_debug.cdone(SCpnt);         
SCpnt218drivers/scsi/scsi_debug.cprintk("scsi_debug: Requesting sense buffer (%x %x %x %d):", SCpnt, buff, done, bufflen);
SCpnt226drivers/scsi/scsi_debug.cSCpnt->result = 0;
SCpnt227drivers/scsi/scsi_debug.cdone(SCpnt); 
SCpnt254drivers/scsi/scsi_debug.cif(NR_REAL < 0) NR_REAL = (MINOR(SCpnt->request.rq_dev) >> 4) & 0x0f;
SCpnt279drivers/scsi/scsi_debug.cusec = (SCpnt->request.nr_sectors << 9) * 1.0e6 / SCSI_DATARATE;
SCpnt286drivers/scsi/scsi_debug.cprintk("(r%d)",SCpnt->request.nr_sectors);
SCpnt289drivers/scsi/scsi_debug.cif(SCpnt->use_sg){
SCpnt294drivers/scsi/scsi_debug.cbh = SCpnt->request.bh;
SCpnt321drivers/scsi/scsi_debug.cif (SCpnt->use_sg) printk("Block %x (%d %d)\n",block, SCpnt->request.nr_sectors,
SCpnt322drivers/scsi/scsi_debug.cSCpnt->request.current_nr_sectors);
SCpnt351drivers/scsi/scsi_debug.cmemcpy(buff+64, SCpnt, sizeof(Scsi_Cmnd));
SCpnt354drivers/scsi/scsi_debug.cif(SCpnt->use_sg){
SCpnt369drivers/scsi/scsi_debug.cSCpnt->result = 0;
SCpnt370drivers/scsi/scsi_debug.c(done)(SCpnt);
SCpnt373drivers/scsi/scsi_debug.cif (SCpnt->use_sg && !scsi_debug_errsts)
SCpnt374drivers/scsi/scsi_debug.cif(bh) scsi_dump(SCpnt, 0);
SCpnt387drivers/scsi/scsi_debug.cif (SCpnt->use_sg){
SCpnt388drivers/scsi/scsi_debug.cif ((bufflen >> 9) != SCpnt->request.nr_sectors)
SCpnt396drivers/scsi/scsi_debug.cscsi_dump(SCpnt,1);
SCpnt404drivers/scsi/scsi_debug.cSCpnt->result =  DID_NO_CONNECT << 16;
SCpnt405drivers/scsi/scsi_debug.cdone(SCpnt);
SCpnt418drivers/scsi/scsi_debug.cSCint[i] = SCpnt;
SCpnt433drivers/scsi/scsi_debug.cSCpnt->result = scsi_debug_errsts;
SCpnt446drivers/scsi/scsi_debug.cSCpnt->result = scsi_debug_errsts;
SCpnt459drivers/scsi/scsi_debug.cstatic void internal_done(Scsi_Cmnd * SCpnt)
SCpnt461drivers/scsi/scsi_debug.cinternal_done_errcode = SCpnt->result;
SCpnt465drivers/scsi/scsi_debug.cint scsi_debug_command(Scsi_Cmnd * SCpnt)
SCpnt468drivers/scsi/scsi_debug.cscsi_debug_queuecommand(SCpnt, internal_done);
SCpnt566drivers/scsi/scsi_debug.cint scsi_debug_abort(Scsi_Cmnd * SCpnt)
SCpnt574drivers/scsi/scsi_debug.cSCpnt->result = SCpnt->abort_reason << 16;
SCpnt576drivers/scsi/scsi_debug.cif(SCpnt == SCint[j]) {
SCpnt578drivers/scsi/scsi_debug.cmy_done(SCpnt);
SCpnt600drivers/scsi/scsi_debug.cint scsi_debug_reset(Scsi_Cmnd * SCpnt)
SCpnt606drivers/scsi/scsi_debug.cprintk("Bus unlocked by reset(%d)\n", SCpnt->host->suggest_bus_reset);
SCpnt92drivers/scsi/scsi_ioctl.cstatic void scsi_ioctl_done (Scsi_Cmnd * SCpnt)
SCpnt96drivers/scsi/scsi_ioctl.creq = &SCpnt->request;
SCpnt107drivers/scsi/scsi_ioctl.cScsi_Cmnd * SCpnt;
SCpnt109drivers/scsi/scsi_ioctl.cSCpnt = allocate_device(NULL, dev, 1);
SCpnt112drivers/scsi/scsi_ioctl.cSCpnt->request.sem = &sem;
SCpnt113drivers/scsi/scsi_ioctl.cscsi_do_cmd(SCpnt,  cmd, NULL,  0,
SCpnt119drivers/scsi/scsi_ioctl.cif(driver_byte(SCpnt->result) != 0)
SCpnt120drivers/scsi/scsi_ioctl.cswitch(SCpnt->sense_buffer[2] & 0xf) {
SCpnt133drivers/scsi/scsi_ioctl.cSCpnt->result = 0; /* This is no longer considered an error */
SCpnt142drivers/scsi/scsi_ioctl.cSCpnt->result);
SCpnt144drivers/scsi/scsi_ioctl.csense_class(SCpnt->sense_buffer[0]),
SCpnt145drivers/scsi/scsi_ioctl.csense_error(SCpnt->sense_buffer[0]),
SCpnt146drivers/scsi/scsi_ioctl.cSCpnt->sense_buffer[2] & 0xf);
SCpnt150drivers/scsi/scsi_ioctl.cresult = SCpnt->result;
SCpnt151drivers/scsi/scsi_ioctl.cSCpnt->request.rq_status = RQ_INACTIVE;
SCpnt152drivers/scsi/scsi_ioctl.cwake_up(&SCpnt->device->device_wait);
SCpnt166drivers/scsi/scsi_ioctl.cScsi_Cmnd * SCpnt;
SCpnt240drivers/scsi/scsi_ioctl.cSCpnt = allocate_device(NULL, dev, 1);
SCpnt244drivers/scsi/scsi_ioctl.cSCpnt->request.sem = &sem;
SCpnt245drivers/scsi/scsi_ioctl.cscsi_do_cmd(SCpnt,  cmd,  buf, needed,  scsi_ioctl_done,  MAX_TIMEOUT, 
SCpnt253drivers/scsi/scsi_ioctl.cif(SCpnt->result) {
SCpnt256drivers/scsi/scsi_ioctl.csizeof(SCpnt->sense_buffer));
SCpnt259drivers/scsi/scsi_ioctl.cSCpnt->sense_buffer, 
SCpnt260drivers/scsi/scsi_ioctl.csizeof(SCpnt->sense_buffer));
SCpnt266drivers/scsi/scsi_ioctl.cresult = SCpnt->result;
SCpnt268drivers/scsi/scsi_ioctl.cSCpnt->request.rq_status = RQ_INACTIVE;
SCpnt272drivers/scsi/scsi_ioctl.cif(SCpnt->device->scsi_request_fn)
SCpnt273drivers/scsi/scsi_ioctl.c(*SCpnt->device->scsi_request_fn)();
SCpnt275drivers/scsi/scsi_ioctl.cwake_up(&SCpnt->device->device_wait);
SCpnt37drivers/scsi/scsi_syms.cextern void print_sense(const char * devclass, Scsi_Cmnd * SCpnt);
SCpnt79drivers/scsi/sd.cstatic void requeue_sd_request (Scsi_Cmnd * SCpnt);
SCpnt216drivers/scsi/sd.cstatic void rw_intr (Scsi_Cmnd *SCpnt)
SCpnt218drivers/scsi/sd.cint result = SCpnt->result;
SCpnt219drivers/scsi/sd.cint this_count = SCpnt->bufflen >> 9;
SCpnt222drivers/scsi/sd.cprintk("sd%c : rw_intr(%d, %d)\n", 'a' + MINOR(SCpnt->request.rq_dev), 
SCpnt223drivers/scsi/sd.cSCpnt->host->host_no, result);
SCpnt235drivers/scsi/sd.cprintk("sd%c : %d sectors remain.\n", 'a' + MINOR(SCpnt->request.rq_dev),
SCpnt236drivers/scsi/sd.cSCpnt->request.nr_sectors);
SCpnt237drivers/scsi/sd.cprintk("use_sg is %d\n ",SCpnt->use_sg);
SCpnt239drivers/scsi/sd.cif (SCpnt->use_sg) {
SCpnt242drivers/scsi/sd.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt243drivers/scsi/sd.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt249drivers/scsi/sd.cif (SCpnt->request.cmd == READ)
SCpnt257drivers/scsi/sd.cscsi_free(SCpnt->buffer, SCpnt->sglist_len);  
SCpnt259drivers/scsi/sd.cif (SCpnt->buffer != SCpnt->request.buffer) {
SCpnt261drivers/scsi/sd.cprintk("nosg: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer,
SCpnt262drivers/scsi/sd.cSCpnt->bufflen);
SCpnt264drivers/scsi/sd.cif (SCpnt->request.cmd == READ)
SCpnt265drivers/scsi/sd.cmemcpy(SCpnt->request.buffer, SCpnt->buffer,
SCpnt266drivers/scsi/sd.cSCpnt->bufflen);
SCpnt267drivers/scsi/sd.cscsi_free(SCpnt->buffer, SCpnt->bufflen);
SCpnt275drivers/scsi/sd.cif (SCpnt->request.nr_sectors > this_count)
SCpnt277drivers/scsi/sd.cSCpnt->request.errors = 0;
SCpnt279drivers/scsi/sd.cif (!SCpnt->request.bh)
SCpnt283drivers/scsi/sd.c'a' + MINOR(SCpnt->request.rq_dev));
SCpnt290drivers/scsi/sd.cSCpnt->request.sector, this_count);
SCpnt293drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 1, this_count);
SCpnt294drivers/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt299drivers/scsi/sd.cif (SCpnt->use_sg) {
SCpnt302drivers/scsi/sd.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt303drivers/scsi/sd.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt305drivers/scsi/sd.cprintk("err: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer,
SCpnt306drivers/scsi/sd.cSCpnt->bufflen);
SCpnt312drivers/scsi/sd.cscsi_free(SCpnt->buffer, SCpnt->sglist_len);  /* Free list of scatter-gather pointers */
SCpnt315drivers/scsi/sd.cprintk("nosgerr: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer,
SCpnt316drivers/scsi/sd.cSCpnt->bufflen);
SCpnt318drivers/scsi/sd.cif (SCpnt->buffer != SCpnt->request.buffer)
SCpnt319drivers/scsi/sd.cscsi_free(SCpnt->buffer, SCpnt->bufflen);
SCpnt335drivers/scsi/sd.cif rscsi_disks[DEVICE_NR(SCpnt->request.rq_dev)].remap
SCpnt343drivers/scsi/sd.cif ((SCpnt->sense_buffer[0] & 0x7f) == 0x70) {
SCpnt344drivers/scsi/sd.cif ((SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) {
SCpnt345drivers/scsi/sd.cif(rscsi_disks[DEVICE_NR(SCpnt->request.rq_dev)].device->removable) {
SCpnt349drivers/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.rq_dev)].device->changed = 1;
SCpnt350drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 0, this_count);
SCpnt351drivers/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt361drivers/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt375drivers/scsi/sd.cif (SCpnt->sense_buffer[2] == ILLEGAL_REQUEST) {
SCpnt376drivers/scsi/sd.cif (rscsi_disks[DEVICE_NR(SCpnt->request.rq_dev)].ten) {
SCpnt377drivers/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.rq_dev)].ten = 0;
SCpnt378drivers/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt387drivers/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.rq_dev)].device->host->host_no,
SCpnt388drivers/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.rq_dev)].device->channel,
SCpnt389drivers/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.rq_dev)].device->id,
SCpnt390drivers/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.rq_dev)].device->lun, result);
SCpnt393drivers/scsi/sd.cprint_sense("sd", SCpnt);
SCpnt394drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.current_nr_sectors);
SCpnt395drivers/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt408drivers/scsi/sd.cScsi_Cmnd * SCpnt = NULL;
SCpnt459drivers/scsi/sd.cSCpnt = allocate_device(&CURRENT,
SCpnt461drivers/scsi/sd.celse SCpnt = NULL;
SCpnt479drivers/scsi/sd.cif (!SCpnt && sd_template.nr_dev > 1){
SCpnt485drivers/scsi/sd.cSCpnt = request_queueable(req, rscsi_disks[DEVICE_NR(req->rq_dev)].device);
SCpnt486drivers/scsi/sd.cif(SCpnt) break;
SCpnt490drivers/scsi/sd.cif (SCpnt && req->rq_status == RQ_INACTIVE) {
SCpnt499drivers/scsi/sd.cif (!SCpnt) return; /* Could not find anything to do */
SCpnt502drivers/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt506drivers/scsi/sd.cstatic void requeue_sd_request (Scsi_Cmnd * SCpnt)
SCpnt517drivers/scsi/sd.cif(!SCpnt || SCpnt->request.rq_status == RQ_INACTIVE) {
SCpnt522drivers/scsi/sd.cdevm =  MINOR(SCpnt->request.rq_dev);
SCpnt523drivers/scsi/sd.cdev = DEVICE_NR(SCpnt->request.rq_dev);
SCpnt525drivers/scsi/sd.cblock = SCpnt->request.sector;
SCpnt534drivers/scsi/sd.cblock + SCpnt->request.nr_sectors > sd[devm].nr_sects)
SCpnt536drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt549drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt570drivers/scsi/sd.cif((block & 1) || (SCpnt->request.nr_sectors & 1)) {
SCpnt572drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt576drivers/scsi/sd.cswitch (SCpnt->request.cmd)
SCpnt581drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt590drivers/scsi/sd.cpanic ("Unknown sd command %d\n", SCpnt->request.cmd);
SCpnt593drivers/scsi/sd.cSCpnt->this_count = 0;
SCpnt598drivers/scsi/sd.ccontiguous = (!CLUSTERABLE_DEVICE(SCpnt) ? 0 :1);
SCpnt600drivers/scsi/sd.cbounce_size = (SCpnt->request.nr_sectors << 9);
SCpnt606drivers/scsi/sd.cif (contiguous && SCpnt->request.bh &&
SCpnt607drivers/scsi/sd.c((long) SCpnt->request.bh->b_data) 
SCpnt608drivers/scsi/sd.c+ (SCpnt->request.nr_sectors << 9) - 1 > ISA_DMA_THRESHOLD 
SCpnt609drivers/scsi/sd.c&& SCpnt->host->unchecked_isa_dma) {
SCpnt610drivers/scsi/sd.cif(((long) SCpnt->request.bh->b_data) > ISA_DMA_THRESHOLD)
SCpnt615drivers/scsi/sd.cif(contiguous && SCpnt->request.bh && SCpnt->request.bh->b_reqnext)
SCpnt616drivers/scsi/sd.cfor(bh = SCpnt->request.bh, bhp = bh->b_reqnext; bhp; bh = bhp, 
SCpnt624drivers/scsi/sd.cif (!SCpnt->request.bh || contiguous) {
SCpnt627drivers/scsi/sd.cthis_count = SCpnt->request.nr_sectors;
SCpnt628drivers/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt629drivers/scsi/sd.cSCpnt->use_sg = 0;
SCpnt631drivers/scsi/sd.c} else if (SCpnt->host->sg_tablesize == 0 ||
SCpnt641drivers/scsi/sd.cif (SCpnt->host->sg_tablesize != 0 &&
SCpnt646drivers/scsi/sd.cthis_count = SCpnt->request.current_nr_sectors;
SCpnt647drivers/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt648drivers/scsi/sd.cSCpnt->use_sg = 0;
SCpnt657drivers/scsi/sd.cbh = SCpnt->request.bh;
SCpnt665drivers/scsi/sd.c!CLUSTERABLE_DEVICE(SCpnt) ||
SCpnt666drivers/scsi/sd.c(SCpnt->host->unchecked_isa_dma &&
SCpnt668drivers/scsi/sd.cif (count < SCpnt->host->sg_tablesize) count++;
SCpnt676drivers/scsi/sd.cif(SCpnt->host->unchecked_isa_dma &&
SCpnt677drivers/scsi/sd.c((unsigned int) SCpnt->request.bh->b_data-1) == ISA_DMA_THRESHOLD) count--;
SCpnt679drivers/scsi/sd.cSCpnt->use_sg = count;  /* Number of chains */
SCpnt681drivers/scsi/sd.cwhile( count < (SCpnt->use_sg * sizeof(struct scatterlist))) 
SCpnt683drivers/scsi/sd.cSCpnt->sglist_len = count;
SCpnt685drivers/scsi/sd.cif(SCpnt->host->sg_tablesize < max_sg) 
SCpnt686drivers/scsi/sd.cmax_sg = SCpnt->host->sg_tablesize;
SCpnt690drivers/scsi/sd.cSCpnt->use_sg = 0;    /* No memory left - bail out */
SCpnt691drivers/scsi/sd.cthis_count = SCpnt->request.current_nr_sectors;
SCpnt692drivers/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt699drivers/scsi/sd.cfor(count = 0, bh = SCpnt->request.bh, bhp = bh->b_reqnext;
SCpnt700drivers/scsi/sd.ccount < SCpnt->use_sg && bh; 
SCpnt710drivers/scsi/sd.cISA_DMA_THRESHOLD && (SCpnt->host->unchecked_isa_dma) &&
SCpnt737drivers/scsi/sd.cthis_count = SCpnt->request.current_nr_sectors;
SCpnt738drivers/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt739drivers/scsi/sd.cSCpnt->use_sg = 0;
SCpnt740drivers/scsi/sd.cscsi_free(sgpnt, SCpnt->sglist_len);
SCpnt742drivers/scsi/sd.cSCpnt->use_sg = count;
SCpnt754drivers/scsi/sd.c&& CLUSTERABLE_DEVICE(SCpnt)) {
SCpnt759drivers/scsi/sd.c(SCpnt->host->unchecked_isa_dma) &&
SCpnt768drivers/scsi/sd.cmax_sg = SCpnt->use_sg;
SCpnt781drivers/scsi/sd.cif (SCpnt->use_sg < max_sg) SCpnt->use_sg++;
SCpnt788drivers/scsi/sd.cif(count < SCpnt->use_sg || SCpnt->use_sg 
SCpnt789drivers/scsi/sd.c> SCpnt->host->sg_tablesize){
SCpnt790drivers/scsi/sd.cbh = SCpnt->request.bh;
SCpnt792drivers/scsi/sd.cSCpnt->use_sg, count, dma_free_sectors);
SCpnt799drivers/scsi/sd.cif(SCpnt->use_sg < 16)
SCpnt800drivers/scsi/sd.cfor(count=0; count<SCpnt->use_sg; count++)
SCpnt808drivers/scsi/sd.cif (SCpnt->request.cmd == WRITE)
SCpnt809drivers/scsi/sd.cfor(count=0; count<SCpnt->use_sg; count++)
SCpnt818drivers/scsi/sd.cif(SCpnt->use_sg == 0){
SCpnt820drivers/scsi/sd.c(SCpnt->host->unchecked_isa_dma)) {
SCpnt826drivers/scsi/sd.cthis_count = SCpnt->request.current_nr_sectors;
SCpnt830drivers/scsi/sd.cif (SCpnt->request.cmd == WRITE)
SCpnt831drivers/scsi/sd.cmemcpy(buff, (char *)SCpnt->request.buffer, this_count << 9);
SCpnt837drivers/scsi/sd.c(SCpnt->request.cmd == WRITE) ? "writing" : "reading",
SCpnt838drivers/scsi/sd.cthis_count, SCpnt->request.nr_sectors);
SCpnt841drivers/scsi/sd.ccmd[1] = (SCpnt->lun << 5) & 0xe0;
SCpnt887drivers/scsi/sd.cSCpnt->transfersize = rscsi_disks[dev].sector_size;
SCpnt888drivers/scsi/sd.cSCpnt->underflow = this_count << 9; 
SCpnt889drivers/scsi/sd.cscsi_do_cmd (SCpnt, (void *) cmd, buff, 
SCpnt892drivers/scsi/sd.c(SCpnt->device->type == TYPE_DISK ? 
SCpnt940drivers/scsi/sd.cstatic void sd_init_done (Scsi_Cmnd * SCpnt)
SCpnt944drivers/scsi/sd.creq = &SCpnt->request;
SCpnt958drivers/scsi/sd.cScsi_Cmnd * SCpnt;
SCpnt965drivers/scsi/sd.cSCpnt = allocate_device(NULL, rscsi_disks[i].device, 1);
SCpnt979drivers/scsi/sd.cSCpnt->cmd_len = 0;
SCpnt980drivers/scsi/sd.cSCpnt->sense_buffer[0] = 0;
SCpnt981drivers/scsi/sd.cSCpnt->sense_buffer[2] = 0;
SCpnt986drivers/scsi/sd.cSCpnt->request.rq_status = RQ_SCSI_BUSY;
SCpnt987drivers/scsi/sd.cSCpnt->request.sem = &sem;
SCpnt988drivers/scsi/sd.cscsi_do_cmd (SCpnt,
SCpnt995drivers/scsi/sd.cthe_result = SCpnt->result;
SCpnt998drivers/scsi/sd.c|| SCpnt->sense_buffer[2] != UNIT_ATTENTION)
SCpnt1005drivers/scsi/sd.cSCpnt->sense_buffer[2] == NOT_READY) {
SCpnt1014drivers/scsi/sd.cSCpnt->cmd_len = 0;
SCpnt1015drivers/scsi/sd.cSCpnt->sense_buffer[0] = 0;
SCpnt1016drivers/scsi/sd.cSCpnt->sense_buffer[2] = 0;
SCpnt1021drivers/scsi/sd.cSCpnt->request.rq_status = RQ_SCSI_BUSY; 
SCpnt1022drivers/scsi/sd.cSCpnt->request.sem = &sem;
SCpnt1023drivers/scsi/sd.cscsi_do_cmd (SCpnt,
SCpnt1053drivers/scsi/sd.cSCpnt->cmd_len = 0;
SCpnt1054drivers/scsi/sd.cSCpnt->sense_buffer[0] = 0;
SCpnt1055drivers/scsi/sd.cSCpnt->sense_buffer[2] = 0;
SCpnt1060drivers/scsi/sd.cSCpnt->request.rq_status = RQ_SCSI_BUSY;
SCpnt1061drivers/scsi/sd.cSCpnt->request.sem = &sem;
SCpnt1062drivers/scsi/sd.cscsi_do_cmd (SCpnt,
SCpnt1069drivers/scsi/sd.cthe_result = SCpnt->result;
SCpnt1074drivers/scsi/sd.cSCpnt->request.rq_status = RQ_INACTIVE;  /* Mark as not busy */
SCpnt1076drivers/scsi/sd.cwake_up(&SCpnt->device->device_wait); 
SCpnt1106drivers/scsi/sd.c'a' + i, SCpnt->sense_buffer[2] & 0xf);
SCpnt1118drivers/scsi/sd.cSCpnt->sense_buffer[2] == NOT_READY)
SCpnt1193drivers/scsi/sd.cSCpnt->cmd_len = 0;
SCpnt1194drivers/scsi/sd.cSCpnt->sense_buffer[0] = 0;
SCpnt1195drivers/scsi/sd.cSCpnt->sense_buffer[2] = 0;
SCpnt1200drivers/scsi/sd.cSCpnt->request.rq_status = RQ_SCSI_BUSY;  /* Mark as really busy again */
SCpnt1201drivers/scsi/sd.cSCpnt->request.sem = &sem;
SCpnt1202drivers/scsi/sd.cscsi_do_cmd (SCpnt,
SCpnt1209drivers/scsi/sd.cthe_result = SCpnt->result;
SCpnt1210drivers/scsi/sd.cSCpnt->request.rq_status = RQ_INACTIVE;  /* Mark as not busy */
SCpnt1211drivers/scsi/sd.cwake_up(&SCpnt->device->device_wait); 
SCpnt525drivers/scsi/seagate.cint seagate_st0x_queue_command (Scsi_Cmnd * SCpnt,  void (*done)(Scsi_Cmnd *))
SCpnt531drivers/scsi/seagate.ccurrent_target = SCpnt->target;
SCpnt532drivers/scsi/seagate.ccurrent_lun = SCpnt->lun;
SCpnt533drivers/scsi/seagate.c(const void *) current_cmnd = SCpnt->cmnd;
SCpnt534drivers/scsi/seagate.ccurrent_data = (unsigned char *) SCpnt->request_buffer;
SCpnt535drivers/scsi/seagate.ccurrent_bufflen = SCpnt->request_bufflen;
SCpnt536drivers/scsi/seagate.cSCint = SCpnt;
SCpnt547drivers/scsi/seagate.ccurrent_cmnd[SCpnt->cmd_len] |= 0x01;
SCpnt586drivers/scsi/seagate.cint seagate_st0x_command (Scsi_Cmnd * SCpnt) {
SCpnt587drivers/scsi/seagate.creturn internal_command (SCpnt->target, SCpnt->lun, SCpnt->cmnd, SCpnt->request_buffer,
SCpnt588drivers/scsi/seagate.cSCpnt->request_bufflen, 
SCpnt1562drivers/scsi/seagate.cint seagate_st0x_abort (Scsi_Cmnd * SCpnt)
SCpnt1573drivers/scsi/seagate.cint seagate_st0x_reset (Scsi_Cmnd * SCpnt)
SCpnt263drivers/scsi/sg.cstatic void sg_command_done(Scsi_Cmnd * SCpnt)
SCpnt265drivers/scsi/sg.cint dev = MINOR(SCpnt->request.rq_dev);
SCpnt270drivers/scsi/sg.cSCpnt->request.rq_status = RQ_INACTIVE;
SCpnt278drivers/scsi/sg.cmemcpy(device->header.sense_buffer, SCpnt->sense_buffer, sizeof(SCpnt->sense_buffer));
SCpnt279drivers/scsi/sg.cif (SCpnt->sense_buffer[0])
SCpnt284drivers/scsi/sg.cdevice->header.result=SCpnt->result;
SCpnt291drivers/scsi/sg.cSCpnt->request.rq_status = RQ_INACTIVE;
SCpnt307drivers/scsi/sg.cScsi_Cmnd    * SCpnt;
SCpnt389drivers/scsi/sg.cif (!(SCpnt=allocate_device(NULL,device->device, !(filp->f_flags & O_NONBLOCK))))
SCpnt404drivers/scsi/sg.cSCpnt->request.rq_dev = devt;
SCpnt405drivers/scsi/sg.cSCpnt->request.rq_status = RQ_ACTIVE;
SCpnt406drivers/scsi/sg.cSCpnt->sense_buffer[0]=0;
SCpnt410drivers/scsi/sg.cSCpnt->cmd_len = size;
SCpnt459drivers/scsi/sg.cscsi_do_cmd (SCpnt,(void *) cmnd,
SCpnt65drivers/scsi/sr.cvoid requeue_sr_request (Scsi_Cmnd * SCpnt);
SCpnt149drivers/scsi/sr.cstatic void rw_intr (Scsi_Cmnd * SCpnt)
SCpnt151drivers/scsi/sr.cint result = SCpnt->result;
SCpnt152drivers/scsi/sr.cint this_count = SCpnt->this_count;
SCpnt155drivers/scsi/sr.cprintk("sr.c done: %x %x\n",result, SCpnt->request.bh->b_data);
SCpnt159drivers/scsi/sr.cif (SCpnt->use_sg == 0) {
SCpnt160drivers/scsi/sr.cif (SCpnt->buffer != SCpnt->request.buffer)
SCpnt163drivers/scsi/sr.coffset = (SCpnt->request.sector % 4) << 9;
SCpnt164drivers/scsi/sr.cmemcpy((char *)SCpnt->request.buffer, 
SCpnt165drivers/scsi/sr.c(char *)SCpnt->buffer + offset, 
SCpnt172drivers/scsi/sr.cSCpnt->request.nr_sectors > this_count && 
SCpnt173drivers/scsi/sr.cSCpnt->request.bh &&
SCpnt174drivers/scsi/sr.cSCpnt->request.bh->b_reqnext &&
SCpnt175drivers/scsi/sr.cSCpnt->request.bh->b_reqnext->b_size == 1024) {
SCpnt176drivers/scsi/sr.cmemcpy((char *)SCpnt->request.bh->b_reqnext->b_data, 
SCpnt177drivers/scsi/sr.c(char *)SCpnt->buffer + 1024, 
SCpnt182drivers/scsi/sr.cscsi_free(SCpnt->buffer, 2048);
SCpnt187drivers/scsi/sr.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt188drivers/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 */
SCpnt197drivers/scsi/sr.cif(SCpnt->request.sector % 4) this_count -= 2;
SCpnt199drivers/scsi/sr.cif(this_count > SCpnt->request.nr_sectors)
SCpnt204drivers/scsi/sr.cprintk("(%x %x %x) ",SCpnt->request.bh, SCpnt->request.nr_sectors, 
SCpnt207drivers/scsi/sr.cif (SCpnt->request.nr_sectors > this_count)
SCpnt209drivers/scsi/sr.cSCpnt->request.errors = 0;
SCpnt210drivers/scsi/sr.cif (!SCpnt->request.bh)
SCpnt212drivers/scsi/sr.cSCpnt->request.sector, this_count);
SCpnt215drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 1, this_count);  /* All done */
SCpnt216drivers/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt223drivers/scsi/sr.cif (SCpnt->use_sg) {
SCpnt226drivers/scsi/sr.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt227drivers/scsi/sr.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt232drivers/scsi/sr.cscsi_free(SCpnt->buffer, SCpnt->sglist_len);  /* Free list of scatter-gather pointers */
SCpnt234drivers/scsi/sr.cif (SCpnt->buffer != SCpnt->request.buffer)
SCpnt235drivers/scsi/sr.cscsi_free(SCpnt->buffer, SCpnt->bufflen);
SCpnt239drivers/scsi/sr.cif ((SCpnt->sense_buffer[0] & 0x7f) == 0x70) {
SCpnt240drivers/scsi/sr.cif ((SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) {
SCpnt244drivers/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.rq_dev)].device->changed = 1;
SCpnt245drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, this_count);
SCpnt246drivers/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt251drivers/scsi/sr.cif (SCpnt->sense_buffer[2] == ILLEGAL_REQUEST) {
SCpnt253drivers/scsi/sr.cprint_sense("sr", SCpnt);
SCpnt255drivers/scsi/sr.cprint_command(SCpnt->cmnd);
SCpnt256drivers/scsi/sr.cif (scsi_CDs[DEVICE_NR(SCpnt->request.rq_dev)].ten) {
SCpnt257drivers/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.rq_dev)].ten = 0;
SCpnt258drivers/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt262drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, this_count);
SCpnt263drivers/scsi/sr.crequeue_sr_request(SCpnt); /* Do next request */
SCpnt269drivers/scsi/sr.cif (SCpnt->sense_buffer[2] == NOT_READY) {
SCpnt271drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, this_count);
SCpnt272drivers/scsi/sr.crequeue_sr_request(SCpnt); /* Do next request */
SCpnt280drivers/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.rq_dev)].device->host->host_no, 
SCpnt281drivers/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.rq_dev)].device->id,
SCpnt282drivers/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.rq_dev)].device->lun,
SCpnt286drivers/scsi/sr.cprint_sense("sr", SCpnt);
SCpnt288drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.current_nr_sectors);
SCpnt289drivers/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt557drivers/scsi/sr.cScsi_Cmnd * SCpnt = NULL;
SCpnt596drivers/scsi/sr.cSCpnt = allocate_device(&CURRENT,
SCpnt598drivers/scsi/sr.celse SCpnt = NULL;
SCpnt608drivers/scsi/sr.cif (!SCpnt && sr_template.nr_dev > 1){
SCpnt615drivers/scsi/sr.cSCpnt = request_queueable(req,
SCpnt617drivers/scsi/sr.cif(SCpnt) break;
SCpnt621drivers/scsi/sr.cif (SCpnt && req->rq_status == RQ_INACTIVE) {
SCpnt630drivers/scsi/sr.cif (!SCpnt)
SCpnt636drivers/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt640drivers/scsi/sr.cvoid requeue_sr_request (Scsi_Cmnd * SCpnt)
SCpnt649drivers/scsi/sr.cif(!SCpnt || SCpnt->request.rq_status == RQ_INACTIVE) {
SCpnt654drivers/scsi/sr.cdev =  MINOR(SCpnt->request.rq_dev);
SCpnt655drivers/scsi/sr.cblock = SCpnt->request.sector;  
SCpnt661drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt668drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt679drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt684drivers/scsi/sr.cswitch (SCpnt->request.cmd)
SCpnt687drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt694drivers/scsi/sr.cpanic ("Unknown sr command %d\n", SCpnt->request.cmd);
SCpnt697drivers/scsi/sr.ccmd[1] = (SCpnt->lun << 5) & 0xe0;
SCpnt716drivers/scsi/sr.cSCpnt->use_sg = 0;
SCpnt718drivers/scsi/sr.cif (SCpnt->host->sg_tablesize > 0 &&
SCpnt724drivers/scsi/sr.cbh = SCpnt->request.bh;
SCpnt730drivers/scsi/sr.cthis_count = SCpnt->request.sector % 4;
SCpnt732drivers/scsi/sr.cwhile(bh && count < SCpnt->host->sg_tablesize) {
SCpnt741drivers/scsi/sr.cif (count < SCpnt->host->sg_tablesize) {
SCpnt750drivers/scsi/sr.cSCpnt->use_sg = count;  /* Number of chains */
SCpnt752drivers/scsi/sr.cwhile( count < (SCpnt->use_sg * sizeof(struct scatterlist))) 
SCpnt754drivers/scsi/sr.cSCpnt->sglist_len = count;
SCpnt758drivers/scsi/sr.cSCpnt->use_sg = 0;  /* No memory left - bail out */
SCpnt762drivers/scsi/sr.cbh = SCpnt->request.bh;
SCpnt763drivers/scsi/sr.cif(SCpnt->request.sector % 4) {
SCpnt764drivers/scsi/sr.csgpnt[count].length = (SCpnt->request.sector % 4) << 9;
SCpnt771drivers/scsi/sr.cfor(bh = SCpnt->request.bh; count < SCpnt->use_sg; 
SCpnt782drivers/scsi/sr.cif (count+1 != SCpnt->use_sg) panic("Bad sr request list");
SCpnt786drivers/scsi/sr.cSCpnt->host->unchecked_isa_dma) {
SCpnt807drivers/scsi/sr.cSCpnt->use_sg = 0;
SCpnt808drivers/scsi/sr.cscsi_free(buffer, SCpnt->sglist_len);
SCpnt814drivers/scsi/sr.cprintk("SR: %d %d %d %d %d *** ",SCpnt->use_sg, SCpnt->request.sector,
SCpnt816drivers/scsi/sr.cSCpnt->request.current_nr_sectors,
SCpnt817drivers/scsi/sr.cSCpnt->request.nr_sectors);
SCpnt818drivers/scsi/sr.cfor(count=0; count<SCpnt->use_sg; count++)
SCpnt827drivers/scsi/sr.cif (SCpnt->use_sg == 0){
SCpnt829drivers/scsi/sr.cif (!SCpnt->request.bh)    
SCpnt830drivers/scsi/sr.cthis_count = SCpnt->request.nr_sectors;
SCpnt832drivers/scsi/sr.cthis_count = (SCpnt->request.bh->b_size >> 9);
SCpnt848drivers/scsi/sr.cbuffer = (unsigned char *) SCpnt->request.buffer;
SCpnt850drivers/scsi/sr.cSCpnt->host->unchecked_isa_dma)
SCpnt900drivers/scsi/sr.cprintk("Use sg: %d\n", SCpnt->use_sg);
SCpnt917drivers/scsi/sr.cSCpnt->transfersize = (scsi_CDs[dev].sector_size > 1024) ?
SCpnt920drivers/scsi/sr.cSCpnt->this_count = this_count;
SCpnt921drivers/scsi/sr.cscsi_do_cmd (SCpnt, (void *) cmd, buffer, 
SCpnt963drivers/scsi/sr.cstatic void sr_init_done (Scsi_Cmnd * SCpnt)
SCpnt967drivers/scsi/sr.creq = &SCpnt->request;
SCpnt979drivers/scsi/sr.cScsi_Cmnd * SCpnt;
SCpnt982drivers/scsi/sr.cSCpnt = allocate_device(NULL, scsi_CDs[i].device, 1);
SCpnt989drivers/scsi/sr.cSCpnt->request.rq_status = RQ_SCSI_BUSY;  /* Mark as really busy */
SCpnt990drivers/scsi/sr.cSCpnt->cmd_len = 0;
SCpnt997drivers/scsi/sr.cSCpnt->request.sem = &sem;
SCpnt998drivers/scsi/sr.cscsi_do_cmd (SCpnt,
SCpnt1005drivers/scsi/sr.cthe_result = SCpnt->result;
SCpnt1010drivers/scsi/sr.cSCpnt->request.rq_status = RQ_INACTIVE;  /* Mark as not busy */
SCpnt1012drivers/scsi/sr.cwake_up(&SCpnt->device->device_wait); 
SCpnt21drivers/scsi/sr_ioctl.cstatic void sr_ioctl_done(Scsi_Cmnd * SCpnt)
SCpnt25drivers/scsi/sr_ioctl.creq = &SCpnt->request;
SCpnt39drivers/scsi/sr_ioctl.cScsi_Cmnd * SCpnt;
SCpnt42drivers/scsi/sr_ioctl.cSCpnt = allocate_device(NULL, scsi_CDs[target].device, 1);
SCpnt45drivers/scsi/sr_ioctl.cSCpnt->request.sem = &sem;
SCpnt46drivers/scsi/sr_ioctl.cscsi_do_cmd(SCpnt,
SCpnt52drivers/scsi/sr_ioctl.cresult = SCpnt->result;
SCpnt56drivers/scsi/sr_ioctl.cswitch(SCpnt->sense_buffer[2] & 0xf) {
SCpnt74drivers/scsi/sr_ioctl.csense_class(SCpnt->sense_buffer[0]), 
SCpnt75drivers/scsi/sr_ioctl.csense_error(SCpnt->sense_buffer[0]),
SCpnt76drivers/scsi/sr_ioctl.cSCpnt->sense_buffer[2] & 0xf);
SCpnt80drivers/scsi/sr_ioctl.cresult = SCpnt->result;
SCpnt81drivers/scsi/sr_ioctl.cSCpnt->request.rq_status = RQ_INACTIVE; /* Deallocate */
SCpnt82drivers/scsi/sr_ioctl.cwake_up(&SCpnt->device->device_wait);
SCpnt104drivers/scsi/st.cst_chk_result(Scsi_Cmnd * SCpnt)
SCpnt106drivers/scsi/st.cint dev = TAPE_NR(SCpnt->request.rq_dev);
SCpnt107drivers/scsi/st.cint result = SCpnt->result;
SCpnt108drivers/scsi/st.cunsigned char * sense = SCpnt->sense_buffer, scode;
SCpnt118drivers/scsi/st.cSCpnt->data_cmnd[0], SCpnt->data_cmnd[1], SCpnt->data_cmnd[2],
SCpnt119drivers/scsi/st.cSCpnt->data_cmnd[3], SCpnt->data_cmnd[4], SCpnt->data_cmnd[5],
SCpnt120drivers/scsi/st.cSCpnt->request_bufflen);
SCpnt122drivers/scsi/st.cprint_sense("st", SCpnt);
SCpnt135drivers/scsi/st.cSCpnt->data_cmnd[0] != MODE_SENSE)) {  /* Abnormal conditions for tape */
SCpnt139drivers/scsi/st.cprint_sense("st", SCpnt);
SCpnt148drivers/scsi/st.c&& SCpnt->data_cmnd[0] != WRITE_6
SCpnt149drivers/scsi/st.c&& SCpnt->data_cmnd[0] != WRITE_FILEMARKS
SCpnt156drivers/scsi/st.cif (SCpnt->data_cmnd[0] == READ_6)
SCpnt158drivers/scsi/st.celse if (SCpnt->data_cmnd[0] == WRITE_6)
SCpnt174drivers/scsi/st.cst_sleep_done (Scsi_Cmnd * SCpnt)
SCpnt180drivers/scsi/st.cif ((st_nbr = TAPE_NR(SCpnt->request.rq_dev)) < st_template.nr_dev) {
SCpnt183drivers/scsi/st.c(SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt184drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x40)) {
SCpnt186drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x80) != 0)
SCpnt187drivers/scsi/st.cremainder = (SCpnt->sense_buffer[3] << 24) |
SCpnt188drivers/scsi/st.c(SCpnt->sense_buffer[4] << 16) |
SCpnt189drivers/scsi/st.c(SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6];
SCpnt192drivers/scsi/st.cif ((SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW ||
SCpnt194drivers/scsi/st.c(STp->buffer)->last_result = SCpnt->result; /* Error */
SCpnt199drivers/scsi/st.c(STp->buffer)->last_result = SCpnt->result;
SCpnt202drivers/scsi/st.c(STp->buffer)->last_result_fatal = st_chk_result(SCpnt);
SCpnt203drivers/scsi/st.cSCpnt->request.rq_status = RQ_INACTIVE;
SCpnt206drivers/scsi/st.cSCpnt->request.rq_status = RQ_SCSI_DONE;
SCpnt211drivers/scsi/st.cup(SCpnt->request.sem);
SCpnt222drivers/scsi/st.cst_do_scsi(Scsi_Cmnd *SCpnt, Scsi_Tape *STp, unsigned char *cmd, int bytes,
SCpnt225drivers/scsi/st.cif (SCpnt == NULL)
SCpnt226drivers/scsi/st.cif ((SCpnt = allocate_device(NULL, STp->device, 1)) == NULL) {
SCpnt231drivers/scsi/st.ccmd[1] |= (SCpnt->lun << 5) & 0xe0;
SCpnt233drivers/scsi/st.cSCpnt->request.sem = &(STp->sem);
SCpnt234drivers/scsi/st.cSCpnt->request.rq_status = RQ_SCSI_BUSY;
SCpnt235drivers/scsi/st.cSCpnt->request.rq_dev = STp->devt;
SCpnt237drivers/scsi/st.cscsi_do_cmd(SCpnt, (void *)cmd, (STp->buffer)->b_data, bytes,
SCpnt240drivers/scsi/st.cdown(SCpnt->request.sem);
SCpnt242drivers/scsi/st.c(STp->buffer)->last_result_fatal = st_chk_result(SCpnt);
SCpnt244drivers/scsi/st.creturn SCpnt;
SCpnt287drivers/scsi/st.cScsi_Cmnd *SCpnt;
SCpnt295drivers/scsi/st.cSCpnt = st_do_scsi(NULL, STp, cmd, 0, ST_TIMEOUT, MAX_RETRIES);
SCpnt296drivers/scsi/st.cif (!SCpnt)
SCpnt299drivers/scsi/st.cSCpnt->request.rq_status = RQ_INACTIVE;
SCpnt318drivers/scsi/st.cScsi_Cmnd *SCpnt;
SCpnt357drivers/scsi/st.cSCpnt = st_do_scsi(NULL, STp, cmd, transfer, ST_TIMEOUT, MAX_WRITE_RETRIES);
SCpnt358drivers/scsi/st.cif (!SCpnt)
SCpnt363drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt364drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x40) &&
SCpnt365drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) != VOLUME_OVERFLOW) {
SCpnt380drivers/scsi/st.cSCpnt->request.rq_status = RQ_INACTIVE;  /* Mark as not busy */
SCpnt445drivers/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt491drivers/scsi/st.cSCpnt = st_do_scsi(NULL, STp, cmd, 0, ST_LONG_TIMEOUT, MAX_READY_RETRIES);
SCpnt492drivers/scsi/st.cif (!SCpnt)
SCpnt495drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt496drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == UNIT_ATTENTION) { /* New media? */
SCpnt501drivers/scsi/st.cSCpnt = st_do_scsi(SCpnt, STp, cmd, 0, ST_LONG_TIMEOUT, MAX_READY_RETRIES);
SCpnt509drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt510drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == NO_TAPE) {
SCpnt518drivers/scsi/st.cSCpnt->request.rq_status = RQ_INACTIVE;  /* Mark as not busy */
SCpnt534drivers/scsi/st.cSCpnt = st_do_scsi(SCpnt, STp, cmd, 6, ST_TIMEOUT, MAX_READY_RETRIES);
SCpnt536drivers/scsi/st.cif (!SCpnt->result && !SCpnt->sense_buffer[0]) {
SCpnt559drivers/scsi/st.cSCpnt = st_do_scsi(SCpnt, STp, cmd, 12, ST_TIMEOUT, MAX_READY_RETRIES);
SCpnt603drivers/scsi/st.cSCpnt->request.rq_status = RQ_INACTIVE;  /* Mark as not busy */
SCpnt647drivers/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt675drivers/scsi/st.cSCpnt = st_do_scsi(NULL, STp, cmd, 0, ST_TIMEOUT, MAX_WRITE_RETRIES);
SCpnt676drivers/scsi/st.cif (!SCpnt)
SCpnt679drivers/scsi/st.cSCpnt->request.rq_status = RQ_INACTIVE;  /* Mark as not busy */
SCpnt735drivers/scsi/st.cScsi_Cmnd * SCpnt = NULL;
SCpnt848drivers/scsi/st.cSCpnt = st_do_scsi(SCpnt, STp, cmd, transfer, ST_TIMEOUT, MAX_WRITE_RETRIES);
SCpnt849drivers/scsi/st.cif (!SCpnt)
SCpnt857drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt858drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x40)) {
SCpnt859drivers/scsi/st.cif (STp->block_size != 0 && (SCpnt->sense_buffer[0] & 0x80) != 0)
SCpnt860drivers/scsi/st.ctransfer = (SCpnt->sense_buffer[3] << 24) |
SCpnt861drivers/scsi/st.c(SCpnt->sense_buffer[4] << 16) |
SCpnt862drivers/scsi/st.c(SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6];
SCpnt864drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW)
SCpnt902drivers/scsi/st.cSCpnt->request.rq_status = RQ_INACTIVE;  /* Mark as not busy */
SCpnt932drivers/scsi/st.cSCpnt->request.rq_status = RQ_INACTIVE;
SCpnt940drivers/scsi/st.cif (!SCpnt) {
SCpnt941drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt942drivers/scsi/st.cif (!SCpnt)
SCpnt961drivers/scsi/st.cSCpnt->request.sem = &(STp->sem);
SCpnt962drivers/scsi/st.cSCpnt->request.rq_status = RQ_SCSI_BUSY;
SCpnt963drivers/scsi/st.cSCpnt->request.rq_dev = STp->devt;
SCpnt968drivers/scsi/st.cscsi_do_cmd (SCpnt,
SCpnt973drivers/scsi/st.celse if (SCpnt != NULL)
SCpnt974drivers/scsi/st.cSCpnt->request.rq_status = RQ_INACTIVE;  /* Mark as not busy */
SCpnt988drivers/scsi/st.cScsi_Cmnd * SCpnt = NULL;
SCpnt1062drivers/scsi/st.cSCpnt = st_do_scsi(SCpnt, STp, cmd, bytes, ST_TIMEOUT, MAX_RETRIES);
SCpnt1063drivers/scsi/st.cif (!SCpnt)
SCpnt1074drivers/scsi/st.cSCpnt->sense_buffer[0], SCpnt->sense_buffer[1],
SCpnt1075drivers/scsi/st.cSCpnt->sense_buffer[2], SCpnt->sense_buffer[3],
SCpnt1076drivers/scsi/st.cSCpnt->sense_buffer[4], SCpnt->sense_buffer[5],
SCpnt1077drivers/scsi/st.cSCpnt->sense_buffer[6], SCpnt->sense_buffer[7]);
SCpnt1079drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70) { /* extended sense */
SCpnt1081drivers/scsi/st.cif ((SCpnt->sense_buffer[2] & 0xe0) != 0) { /* EOF, EOM, or ILI */
SCpnt1083drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x80) != 0)
SCpnt1084drivers/scsi/st.ctransfer = (SCpnt->sense_buffer[3] << 24) |
SCpnt1085drivers/scsi/st.c(SCpnt->sense_buffer[4] << 16) |
SCpnt1086drivers/scsi/st.c(SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6];
SCpnt1090drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == MEDIUM_ERROR)
SCpnt1093drivers/scsi/st.cif (SCpnt->sense_buffer[2] & 0x20) {
SCpnt1101drivers/scsi/st.cSCpnt->request.rq_status = RQ_INACTIVE;  /* Mark as not busy */
SCpnt1105drivers/scsi/st.celse if (SCpnt->sense_buffer[2] & 0x40) {
SCpnt1118drivers/scsi/st.celse if (SCpnt->sense_buffer[2] & 0x80) {
SCpnt1138drivers/scsi/st.cSCpnt->request.rq_status = RQ_INACTIVE;
SCpnt1143drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == BLANK_CHECK) {
SCpnt1158drivers/scsi/st.cSCpnt->request.rq_status = RQ_INACTIVE;  /* Mark as not busy */
SCpnt1193drivers/scsi/st.cif (SCpnt != NULL)
SCpnt1194drivers/scsi/st.cSCpnt->request.rq_status = RQ_INACTIVE;  /* Mark as not busy */
SCpnt1213drivers/scsi/st.cif (SCpnt != NULL)
SCpnt1214drivers/scsi/st.cSCpnt->request.rq_status = RQ_INACTIVE;  /* Mark as not busy */
SCpnt1276drivers/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt1619drivers/scsi/st.cSCpnt = st_do_scsi(NULL, STp, cmd, datalen, timeout, MAX_RETRIES);
SCpnt1620drivers/scsi/st.cif (!SCpnt)
SCpnt1625drivers/scsi/st.cSCpnt->request.rq_status = RQ_INACTIVE;  /* Mark as not busy */
SCpnt1669drivers/scsi/st.cif (SCpnt->sense_buffer[2] & 0x40) {
SCpnt1677drivers/scsi/st.c(SCpnt->sense_buffer[3] << 24) +
SCpnt1678drivers/scsi/st.c(SCpnt->sense_buffer[4] << 16) +
SCpnt1679drivers/scsi/st.c(SCpnt->sense_buffer[5] << 8) +
SCpnt1680drivers/scsi/st.cSCpnt->sense_buffer[6] );
SCpnt1693drivers/scsi/st.cif (SCpnt->sense_buffer[2] & 0x80) { /* Hit filemark */
SCpnt1705drivers/scsi/st.cif (SCpnt->sense_buffer[2] & 0x80) { /* Hit filemark */
SCpnt1721drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == BLANK_CHECK)
SCpnt1741drivers/scsi/st.cScsi_Cmnd *SCpnt;
SCpnt1899drivers/scsi/st.cSCpnt = st_do_scsi(NULL, STp, scmd, 20, ST_TIMEOUT, MAX_READY_RETRIES);
SCpnt1900drivers/scsi/st.cif (!SCpnt)
SCpnt1925drivers/scsi/st.cSCpnt->request.rq_status = RQ_INACTIVE;  /* Mark as not busy */
SCpnt59drivers/scsi/st.hScsi_Cmnd SCpnt;
SCpnt253drivers/scsi/u14-34f.cScsi_Cmnd *SCpnt;
SCpnt549drivers/scsi/u14-34f.cstatic inline void build_sg_list(struct mscp *cpp, Scsi_Cmnd *SCpnt) {
SCpnt553drivers/scsi/u14-34f.csgpnt = (struct scatterlist *) SCpnt->request_buffer;
SCpnt555drivers/scsi/u14-34f.cfor (k = 0; k < SCpnt->use_sg; k++) {
SCpnt561drivers/scsi/u14-34f.ccpp->use_sg = SCpnt->use_sg;
SCpnt566drivers/scsi/u14-34f.cint u14_34f_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) {
SCpnt573drivers/scsi/u14-34f.cj = ((struct hostdata *) SCpnt->host->hostdata)->board_number;
SCpnt575drivers/scsi/u14-34f.cif (!done) panic("%s: qcomm, pid %ld, null done.\n", BN(j), SCpnt->pid);
SCpnt596drivers/scsi/u14-34f.celse if (u14_34f_reset(SCpnt) == SCSI_RESET_SUCCESS) 
SCpnt599drivers/scsi/u14-34f.cSCpnt->result = DID_BUS_BUSY << 16; 
SCpnt600drivers/scsi/u14-34f.cSCpnt->host_scribble = NULL;
SCpnt601drivers/scsi/u14-34f.cprintk("%s: qcomm, pid %ld, DID_BUS_BUSY, done.\n", BN(j), SCpnt->pid);
SCpnt603drivers/scsi/u14-34f.cdone(SCpnt);    
SCpnt611drivers/scsi/u14-34f.cSCpnt->scsi_done = done;
SCpnt613drivers/scsi/u14-34f.cSCpnt->host_scribble = (unsigned char *) &cpp->index;
SCpnt616drivers/scsi/u14-34f.cBN(j), i, SCpnt->target, SCpnt->pid);
SCpnt620drivers/scsi/u14-34f.ccpp->target = SCpnt->target;
SCpnt621drivers/scsi/u14-34f.ccpp->lun = SCpnt->lun;
SCpnt622drivers/scsi/u14-34f.ccpp->SCpnt = SCpnt;
SCpnt623drivers/scsi/u14-34f.ccpp->sense_addr = (unsigned int) SCpnt->sense_buffer;
SCpnt624drivers/scsi/u14-34f.ccpp->sense_len = sizeof SCpnt->sense_buffer;
SCpnt626drivers/scsi/u14-34f.cif (SCpnt->use_sg) {
SCpnt628drivers/scsi/u14-34f.cbuild_sg_list(cpp, SCpnt);
SCpnt631drivers/scsi/u14-34f.ccpp->data_address = (unsigned int)SCpnt->request_buffer;
SCpnt632drivers/scsi/u14-34f.ccpp->data_len = SCpnt->request_bufflen;
SCpnt635drivers/scsi/u14-34f.ccpp->scsi_cdbs_len = SCpnt->cmd_len;
SCpnt636drivers/scsi/u14-34f.cmemcpy(cpp->scsi_cdbs, SCpnt->cmnd, cpp->scsi_cdbs_len);
SCpnt639drivers/scsi/u14-34f.cSCpnt->result = DID_ERROR << 16;
SCpnt640drivers/scsi/u14-34f.cSCpnt->host_scribble = NULL;
SCpnt642drivers/scsi/u14-34f.cBN(j), SCpnt->target, SCpnt->pid);
SCpnt644drivers/scsi/u14-34f.cdone(SCpnt);
SCpnt695drivers/scsi/u14-34f.cif (SCarg != HD(j)->cp[i].SCpnt)
SCpnt697drivers/scsi/u14-34f.cBN(j), i, SCarg, HD(j)->cp[i].SCpnt);
SCpnt721drivers/scsi/u14-34f.cScsi_Cmnd *SCpnt;
SCpnt758drivers/scsi/u14-34f.cSCpnt = HD(j)->cp[i].SCpnt;
SCpnt761drivers/scsi/u14-34f.cBN(j), i, SCpnt->pid);
SCpnt763drivers/scsi/u14-34f.cif (SCpnt == NULL)
SCpnt766drivers/scsi/u14-34f.cif (SCpnt->host_scribble == NULL)
SCpnt769drivers/scsi/u14-34f.cif (*(unsigned int *)SCpnt->host_scribble != i) 
SCpnt772drivers/scsi/u14-34f.cif (SCpnt->scsi_done == NULL) 
SCpnt775drivers/scsi/u14-34f.cif (SCpnt == SCarg) arg_done = TRUE;
SCpnt803drivers/scsi/u14-34f.cSCpnt = HD(j)->cp[i].SCpnt;
SCpnt804drivers/scsi/u14-34f.cSCpnt->result = DID_RESET << 16;
SCpnt805drivers/scsi/u14-34f.cSCpnt->host_scribble = NULL;
SCpnt811drivers/scsi/u14-34f.cBN(j), i, SCpnt->pid);
SCpnt813drivers/scsi/u14-34f.cSCpnt->scsi_done(SCpnt);
SCpnt842drivers/scsi/u14-34f.cScsi_Cmnd *SCpnt;
SCpnt904drivers/scsi/u14-34f.cSCpnt = spp->SCpnt;
SCpnt906drivers/scsi/u14-34f.cif (SCpnt == NULL) 
SCpnt909drivers/scsi/u14-34f.cif (SCpnt->host_scribble == NULL) 
SCpnt911drivers/scsi/u14-34f.cBN(j), i, SCpnt->pid, SCpnt);
SCpnt913drivers/scsi/u14-34f.cif (*(unsigned int *)SCpnt->host_scribble != i) 
SCpnt915drivers/scsi/u14-34f.c" irq %d.\n", BN(j), i, SCpnt->pid, 
SCpnt916drivers/scsi/u14-34f.c*(unsigned int *)SCpnt->host_scribble, irq);
SCpnt924drivers/scsi/u14-34f.cif (tstatus == BUSY && SCpnt->device->type != TYPE_TAPE) 
SCpnt929drivers/scsi/u14-34f.c&& SCpnt->device->type == TYPE_DISK
SCpnt930drivers/scsi/u14-34f.c&& HD(j)->target_reset[SCpnt->target])
SCpnt935drivers/scsi/u14-34f.c&& SCpnt->device->type == TYPE_DISK
SCpnt936drivers/scsi/u14-34f.c&& (SCpnt->sense_buffer[2] & 0xf) == RECOVERED_ERROR)
SCpnt943drivers/scsi/u14-34f.cHD(j)->target_reset[SCpnt->target] = FALSE;
SCpnt945drivers/scsi/u14-34f.cif (spp->target_status && SCpnt->device->type == TYPE_DISK)
SCpnt948drivers/scsi/u14-34f.cSCpnt->target, SCpnt->lun, SCpnt->pid,
SCpnt949drivers/scsi/u14-34f.cspp->target_status, SCpnt->sense_buffer[2]);
SCpnt951drivers/scsi/u14-34f.cHD(j)->target_time_out[SCpnt->target] = 0;
SCpnt956drivers/scsi/u14-34f.cif (HD(j)->target_time_out[SCpnt->target] > 1)
SCpnt960drivers/scsi/u14-34f.cHD(j)->target_time_out[SCpnt->target]++;
SCpnt970drivers/scsi/u14-34f.cif (SCpnt->device->type != TYPE_TAPE)
SCpnt991drivers/scsi/u14-34f.cSCpnt->result = status | spp->target_status;
SCpnt997drivers/scsi/u14-34f.cif (SCpnt->result || do_trace) 
SCpnt1007drivers/scsi/u14-34f.cSCpnt->target, SCpnt->lun, SCpnt->pid, HD(j)->iocount);
SCpnt1010drivers/scsi/u14-34f.cSCpnt->host_scribble = NULL;
SCpnt1013drivers/scsi/u14-34f.cSCpnt->scsi_done(SCpnt);
SCpnt297drivers/scsi/ultrastor.cstatic inline void build_sg_list(struct mscp *, Scsi_Cmnd *SCpnt);
SCpnt656drivers/scsi/ultrastor.cstatic inline void build_sg_list(register struct mscp *mscp, Scsi_Cmnd *SCpnt)
SCpnt662drivers/scsi/ultrastor.csl = (struct scatterlist *) SCpnt->request_buffer;
SCpnt663drivers/scsi/ultrastor.cmax = SCpnt->use_sg;
SCpnt677drivers/scsi/ultrastor.cint ultrastor_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt715drivers/scsi/ultrastor.cmy_mscp->ca = SCpnt->device->type != TYPE_TAPE;
SCpnt716drivers/scsi/ultrastor.cmy_mscp->target_id = SCpnt->target;
SCpnt718drivers/scsi/ultrastor.cmy_mscp->lun = SCpnt->lun;
SCpnt719drivers/scsi/ultrastor.cif (SCpnt->use_sg) {
SCpnt722drivers/scsi/ultrastor.cbuild_sg_list(my_mscp, SCpnt);
SCpnt726drivers/scsi/ultrastor.cmy_mscp->transfer_data = (unsigned int)SCpnt->request_buffer;
SCpnt727drivers/scsi/ultrastor.cmy_mscp->transfer_data_length = SCpnt->request_bufflen;
SCpnt731drivers/scsi/ultrastor.cmy_mscp->length_of_sense_byte = sizeof SCpnt->sense_buffer;
SCpnt732drivers/scsi/ultrastor.cmy_mscp->length_of_scsi_cdbs = SCpnt->cmd_len;
SCpnt733drivers/scsi/ultrastor.cmemcpy(my_mscp->scsi_cdbs, SCpnt->cmnd, my_mscp->length_of_scsi_cdbs);
SCpnt736drivers/scsi/ultrastor.cmy_mscp->sense_data = (unsigned int)&SCpnt->sense_buffer;
SCpnt738drivers/scsi/ultrastor.cmy_mscp->SCint = SCpnt;
SCpnt739drivers/scsi/ultrastor.cSCpnt->host_scribble = (unsigned char *)my_mscp;
SCpnt785drivers/scsi/ultrastor.cSCpnt->result = status;
SCpnt786drivers/scsi/ultrastor.cdone(SCpnt);
SCpnt829drivers/scsi/ultrastor.cint ultrastor_abort(Scsi_Cmnd *SCpnt)
SCpnt844drivers/scsi/ultrastor.cif(!SCpnt->host_scribble)
SCpnt847drivers/scsi/ultrastor.cmscp_index = ((struct mscp *)SCpnt->host_scribble) - config.mscp;
SCpnt935drivers/scsi/ultrastor.cif (config.mscp[mscp_index].SCint != SCpnt)
SCpnt937drivers/scsi/ultrastor.cconfig.mscp[mscp_index].SCint, SCpnt);
SCpnt942drivers/scsi/ultrastor.cif (config.mscp[mscp_index].SCint != SCpnt) panic("Bad abort");
SCpnt946drivers/scsi/ultrastor.cSCpnt->result = DID_ABORT << 16;
SCpnt948drivers/scsi/ultrastor.cdone(SCpnt);
SCpnt954drivers/scsi/ultrastor.cint ultrastor_reset(Scsi_Cmnd * SCpnt)
SCpnt351drivers/scsi/wd7000.cScsi_Cmnd *SCpnt;             /* Scsi_Cmnd using this SCB */
SCpnt682drivers/scsi/wd7000.cscbs[i].next = &(scbs[i+1]);  scbs[i].SCpnt = NULL;
SCpnt685drivers/scsi/wd7000.cscbs[MAX_SCBS-1].SCpnt = NULL;
SCpnt800drivers/scsi/wd7000.cstatic void wd7000_scsi_done(Scsi_Cmnd * SCpnt)
SCpnt803drivers/scsi/wd7000.cprintk("wd7000_scsi_done: %06x\n",(unsigned int) SCpnt);
SCpnt805drivers/scsi/wd7000.cSCpnt->SCp.phase = 0;
SCpnt817drivers/scsi/wd7000.cregister Scsi_Cmnd *SCpnt;
SCpnt874drivers/scsi/wd7000.cSCpnt = scb->SCpnt;
SCpnt875drivers/scsi/wd7000.cif (--(SCpnt->SCp.phase) <= 0)  {  /* all scbs are done */
SCpnt879drivers/scsi/wd7000.cSCpnt->result = errstatus;
SCpnt883drivers/scsi/wd7000.cSCpnt->scsi_done(SCpnt);
SCpnt898drivers/scsi/wd7000.cint wd7000_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt902drivers/scsi/wd7000.cregister unchar *cdb = (unchar *) SCpnt->cmnd;
SCpnt905drivers/scsi/wd7000.cAdapter *host = (Adapter *) SCpnt->host->hostdata;
SCpnt907drivers/scsi/wd7000.ccdblen = SCpnt->cmd_len;
SCpnt908drivers/scsi/wd7000.cidlun = ((SCpnt->target << 5) & 0xe0) | (SCpnt->lun & 7);
SCpnt909drivers/scsi/wd7000.cSCpnt->scsi_done = done;
SCpnt910drivers/scsi/wd7000.cSCpnt->SCp.phase = 1;
SCpnt916drivers/scsi/wd7000.cscb->SCpnt = SCpnt;         /* so we can find stuff later */
SCpnt917drivers/scsi/wd7000.cSCpnt->host_scribble = (unchar *) scb;
SCpnt920drivers/scsi/wd7000.cif (SCpnt->use_sg)  {
SCpnt921drivers/scsi/wd7000.cstruct scatterlist *sg = (struct scatterlist *) SCpnt->request_buffer;
SCpnt924drivers/scsi/wd7000.cif (SCpnt->host->sg_tablesize == SG_NONE)  {
SCpnt928drivers/scsi/wd7000.cprintk("Using scatter/gather with %d elements.\n",SCpnt->use_sg);
SCpnt934drivers/scsi/wd7000.cany2scsi(scb->maxlen, SCpnt->use_sg * sizeof (Sgb) );
SCpnt936drivers/scsi/wd7000.cfor (i = 0;  i < SCpnt->use_sg;  i++)  {
SCpnt942drivers/scsi/wd7000.cany2scsi(scb->dataptr, (int) SCpnt->request_buffer);
SCpnt943drivers/scsi/wd7000.cany2scsi(scb->maxlen, SCpnt->request_bufflen);
SCpnt951drivers/scsi/wd7000.cint wd7000_command(Scsi_Cmnd *SCpnt)
SCpnt953drivers/scsi/wd7000.cwd7000_queuecommand(SCpnt, wd7000_scsi_done);
SCpnt955drivers/scsi/wd7000.cwhile (SCpnt->SCp.phase > 0) barrier();  /* phase counts scbs down to 0 */
SCpnt957drivers/scsi/wd7000.creturn SCpnt->result;
SCpnt1194drivers/scsi/wd7000.cint wd7000_abort(Scsi_Cmnd * SCpnt)
SCpnt1196drivers/scsi/wd7000.cAdapter *host = (Adapter *) SCpnt->host->hostdata;
SCpnt1211drivers/scsi/wd7000.cint wd7000_reset(Scsi_Cmnd * SCpnt)