taglinefilesource code
SCpnt751drivers/scsi/aha152x.cint aha152x_queue( Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt767drivers/scsi/aha152x.cprintk( "SCpnt (target = %d lun = %d cmnd = ", SCpnt->target, SCpnt->lun);
SCpnt768drivers/scsi/aha152x.cprint_command(SCpnt->cmnd);
SCpnt770drivers/scsi/aha152x.cSCpnt->cmd_len, SCpnt->use_sg, SCpnt->request_bufflen );
SCpnt775drivers/scsi/aha152x.cSCpnt->scsi_done =       done;
SCpnt783drivers/scsi/aha152x.cSCpnt->SCp.phase = not_issued;
SCpnt784drivers/scsi/aha152x.cif (SCpnt->use_sg)
SCpnt786drivers/scsi/aha152x.cSCpnt->SCp.buffer           = (struct scatterlist *)SCpnt->request_buffer;
SCpnt787drivers/scsi/aha152x.cSCpnt->SCp.ptr              = SCpnt->SCp.buffer->address;
SCpnt788drivers/scsi/aha152x.cSCpnt->SCp.this_residual    = SCpnt->SCp.buffer->length;
SCpnt789drivers/scsi/aha152x.cSCpnt->SCp.buffers_residual = SCpnt->use_sg - 1;
SCpnt793drivers/scsi/aha152x.cSCpnt->SCp.ptr              = (char *)SCpnt->request_buffer;
SCpnt794drivers/scsi/aha152x.cSCpnt->SCp.this_residual    = SCpnt->request_bufflen;
SCpnt795drivers/scsi/aha152x.cSCpnt->SCp.buffer           = NULL;
SCpnt796drivers/scsi/aha152x.cSCpnt->SCp.buffers_residual = 0;
SCpnt799drivers/scsi/aha152x.cSCpnt->SCp.Status              = CHECK_CONDITION;
SCpnt800drivers/scsi/aha152x.cSCpnt->SCp.Message             = 0;
SCpnt801drivers/scsi/aha152x.cSCpnt->SCp.have_data_in        = 0;
SCpnt802drivers/scsi/aha152x.cSCpnt->SCp.sent_command        = 0;
SCpnt815drivers/scsi/aha152x.cappend_SC( &issue_SC, SCpnt);
SCpnt835drivers/scsi/aha152x.cint aha152x_command( Scsi_Cmnd *SCpnt )
SCpnt845drivers/scsi/aha152x.cint aha152x_abort( Scsi_Cmnd *SCpnt)
SCpnt856drivers/scsi/aha152x.cprintk("aha152x: abort(), SCpnt=0x%08x, ", (unsigned int) SCpnt );
SCpnt864drivers/scsi/aha152x.cptr && ptr!=SCpnt;
SCpnt885drivers/scsi/aha152x.cif ( TESTLO(SSTAT1, BUSFREE) || (current_SC && current_SC!=SCpnt))
SCpnt910drivers/scsi/aha152x.cptr && ptr!=SCpnt;
SCpnt506drivers/scsi/aha1542.cint aha1542_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt510drivers/scsi/aha1542.cunchar *cmd = (unchar *) SCpnt->cmnd;
SCpnt511drivers/scsi/aha1542.cunchar target = SCpnt->target;
SCpnt512drivers/scsi/aha1542.cunchar lun = SCpnt->lun;
SCpnt514drivers/scsi/aha1542.cvoid *buff = SCpnt->request_buffer;
SCpnt515drivers/scsi/aha1542.cint bufflen = SCpnt->request_bufflen;
SCpnt522drivers/scsi/aha1542.cmb = HOSTDATA(SCpnt->host)->mb;
SCpnt523drivers/scsi/aha1542.cccb = HOSTDATA(SCpnt->host)->ccb;
SCpnt526drivers/scsi/aha1542.cSCpnt->result = DID_TIME_OUT << 16;
SCpnt527drivers/scsi/aha1542.cdone(SCpnt); return 0;});
SCpnt531drivers/scsi/aha1542.cif (bufflen != sizeof(SCpnt->sense_buffer)) {
SCpnt535drivers/scsi/aha1542.cSCpnt->result = 0;
SCpnt536drivers/scsi/aha1542.cdone(SCpnt); 
SCpnt553drivers/scsi/aha1542.cfor (i = 0; i < SCpnt->cmd_len; i++) printk("%02x ", cmd[i]);
SCpnt563drivers/scsi/aha1542.cmbo = HOSTDATA(SCpnt->host)->aha1542_last_mbo_used + 1;
SCpnt567drivers/scsi/aha1542.cif(mb[mbo].status == 0 && HOSTDATA(SCpnt->host)->SCint[mbo] == NULL)
SCpnt571drivers/scsi/aha1542.c} while (mbo != HOSTDATA(SCpnt->host)->aha1542_last_mbo_used);
SCpnt573drivers/scsi/aha1542.cif(mb[mbo].status || HOSTDATA(SCpnt->host)->SCint[mbo])
SCpnt576drivers/scsi/aha1542.cHOSTDATA(SCpnt->host)->SCint[mbo] = SCpnt;  /* This will effectively prevent someone else from
SCpnt579drivers/scsi/aha1542.cHOSTDATA(SCpnt->host)->aha1542_last_mbo_used = mbo;    
SCpnt590drivers/scsi/aha1542.cccb[mbo].cdblen = SCpnt->cmd_len;
SCpnt600drivers/scsi/aha1542.cif (SCpnt->use_sg) {
SCpnt608drivers/scsi/aha1542.cSCpnt->host_scribble = (unsigned char *) scsi_malloc(512);
SCpnt609drivers/scsi/aha1542.csgpnt = (struct scatterlist *) SCpnt->request_buffer;
SCpnt610drivers/scsi/aha1542.ccptr = (struct chain *) SCpnt->host_scribble; 
SCpnt612drivers/scsi/aha1542.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt613drivers/scsi/aha1542.cif(sgpnt[i].length == 0 || SCpnt->use_sg > 16 || 
SCpnt616drivers/scsi/aha1542.cprintk("Bad segment list supplied to aha1542.c (%d, %d)\n",SCpnt->use_sg,i);
SCpnt617drivers/scsi/aha1542.cfor(i=0;i<SCpnt->use_sg;i++){
SCpnt630drivers/scsi/aha1542.cany2scsi(ccb[mbo].datalen, SCpnt->use_sg * sizeof(struct chain));
SCpnt639drivers/scsi/aha1542.cSCpnt->host_scribble = NULL;
SCpnt659drivers/scsi/aha1542.cSCpnt->scsi_done = done;
SCpnt661drivers/scsi/aha1542.caha1542_out(SCpnt->host->io_port, &ahacmd, 1);    /* start scsi command */
SCpnt672drivers/scsi/aha1542.cstatic void internal_done(Scsi_Cmnd * SCpnt)
SCpnt674drivers/scsi/aha1542.cSCpnt->SCp.Status++;
SCpnt677drivers/scsi/aha1542.cint aha1542_command(Scsi_Cmnd * SCpnt)
SCpnt681drivers/scsi/aha1542.caha1542_queuecommand(SCpnt, internal_done);
SCpnt683drivers/scsi/aha1542.cSCpnt->SCp.Status = 0;
SCpnt684drivers/scsi/aha1542.cwhile (!SCpnt->SCp.Status);
SCpnt685drivers/scsi/aha1542.creturn SCpnt->result;
SCpnt1097drivers/scsi/aha1542.cint aha1542_abort(Scsi_Cmnd * SCpnt)
SCpnt1106drivers/scsi/aha1542.cinb(STATUS(SCpnt->host->io_port)),
SCpnt1107drivers/scsi/aha1542.cinb(INTRFLAGS(SCpnt->host->io_port)));
SCpnt1111drivers/scsi/aha1542.cmb = HOSTDATA(SCpnt->host)->mb;
SCpnt1112drivers/scsi/aha1542.cmbi = HOSTDATA(SCpnt->host)->aha1542_last_mbi_used + 1;
SCpnt1119drivers/scsi/aha1542.c} while (mbi != HOSTDATA(SCpnt->host)->aha1542_last_mbi_used);
SCpnt1124drivers/scsi/aha1542.cSCpnt->host->irq);
SCpnt1125drivers/scsi/aha1542.caha1542_intr_handle(SCpnt->host->irq, NULL);
SCpnt1133drivers/scsi/aha1542.cif(HOSTDATA(SCpnt->host)->SCint[i])
SCpnt1135drivers/scsi/aha1542.cif(HOSTDATA(SCpnt->host)->SCint[i] == SCpnt) {
SCpnt1136drivers/scsi/aha1542.cprintk("Timed out command pending for %4.4x\n", SCpnt->request.dev);
SCpnt1137drivers/scsi/aha1542.cif (HOSTDATA(SCpnt->host)->mb[i].status) {
SCpnt1139drivers/scsi/aha1542.caha1542_out(SCpnt->host->io_port, &ahacmd, 1);
SCpnt1142drivers/scsi/aha1542.cprintk("Other pending command %4.4x\n", SCpnt->request.dev);
SCpnt1152drivers/scsi/aha1542.cif (SCpnt == HOSTDATA(SCpnt->host)->SCint[mbo]){
SCpnt1154drivers/scsi/aha1542.caha1542_out(SCpnt->host->io_port, &ahacmd, 1); /* start scsi command */
SCpnt1168drivers/scsi/aha1542.cint aha1542_reset(Scsi_Cmnd * SCpnt)
SCpnt1176drivers/scsi/aha1542.coutb(SCRST, CONTROL(SCpnt->host->io_port));
SCpnt1181drivers/scsi/aha1542.cif(HOSTDATA(SCpnt->host)->SCint[i] == SCpnt)
SCpnt1183drivers/scsi/aha1542.cHOSTDATA(SCpnt->host)->ccb[i].op = 0x81;  /* BUS DEVICE RESET */
SCpnt1185drivers/scsi/aha1542.caha1542_out(SCpnt->host->io_port, &ahacmd, 1);
SCpnt1191drivers/scsi/aha1542.cprintk("Sent BUS DEVICE RESET to target %d\n", SCpnt->target);
SCpnt1198drivers/scsi/aha1542.cif(HOSTDATA(SCpnt->host)->SCint[i] &&
SCpnt1199drivers/scsi/aha1542.cHOSTDATA(SCpnt->host)->SCint[i]->target == SCpnt->target)
SCpnt1202drivers/scsi/aha1542.cSCtmp = HOSTDATA(SCpnt->host)->SCint[i];
SCpnt1205drivers/scsi/aha1542.cprintk("Sending DID_RESET for target %d\n", SCpnt->target);
SCpnt1206drivers/scsi/aha1542.cSCtmp->scsi_done(SCpnt);
SCpnt1208drivers/scsi/aha1542.cHOSTDATA(SCpnt->host)->SCint[i] = NULL;
SCpnt1209drivers/scsi/aha1542.cHOSTDATA(SCpnt->host)->mb[i].status = 0;
SCpnt199drivers/scsi/aha1740.cSCtmp = ecbptr->SCpnt;
SCpnt245drivers/scsi/aha1740.cint aha1740_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt248drivers/scsi/aha1740.cunchar *cmd = (unchar *) SCpnt->cmnd;
SCpnt249drivers/scsi/aha1740.cunchar target = SCpnt->target;
SCpnt251drivers/scsi/aha1740.cvoid *buff = SCpnt->request_buffer;
SCpnt252drivers/scsi/aha1740.cint bufflen = SCpnt->request_bufflen;
SCpnt259drivers/scsi/aha1740.cif (bufflen != sizeof(SCpnt->sense_buffer))
SCpnt263drivers/scsi/aha1740.cSCpnt->result = 0;
SCpnt264drivers/scsi/aha1740.cdone(SCpnt); 
SCpnt277drivers/scsi/aha1740.cfor (i = 0; i < SCpnt->cmd_len; i++) printk("%02x ", cmd[i]);
SCpnt307drivers/scsi/aha1740.cecb[ecbno].cdblen = SCpnt->cmd_len;  /* SCSI Command Descriptor Block Length */
SCpnt317drivers/scsi/aha1740.cif (SCpnt->use_sg)
SCpnt326drivers/scsi/aha1740.cSCpnt->host_scribble = (unsigned char *) scsi_malloc(512);
SCpnt327drivers/scsi/aha1740.csgpnt = (struct scatterlist *) SCpnt->request_buffer;
SCpnt328drivers/scsi/aha1740.ccptr = (struct aha1740_chain *) SCpnt->host_scribble; 
SCpnt330drivers/scsi/aha1740.cfor(i=0; i<SCpnt->use_sg; i++)
SCpnt335drivers/scsi/aha1740.cecb[ecbno].datalen = SCpnt->use_sg * sizeof(struct aha1740_chain);
SCpnt345drivers/scsi/aha1740.cSCpnt->host_scribble = NULL;
SCpnt349drivers/scsi/aha1740.cecb[ecbno].lun = SCpnt->lun;
SCpnt357drivers/scsi/aha1740.cecb[ecbno].SCpnt = SCpnt;
SCpnt412drivers/scsi/aha1740.cstatic void internal_done(Scsi_Cmnd * SCpnt)
SCpnt414drivers/scsi/aha1740.cinternal_done_errcode = SCpnt->result;
SCpnt418drivers/scsi/aha1740.cint aha1740_command(Scsi_Cmnd * SCpnt)
SCpnt420drivers/scsi/aha1740.caha1740_queuecommand(SCpnt, internal_done);
SCpnt486drivers/scsi/aha1740.cint aha1740_abort(Scsi_Cmnd * SCpnt)
SCpnt496drivers/scsi/aha1740.cint aha1740_reset(Scsi_Cmnd * SCpnt)
SCpnt142drivers/scsi/aha1740.hScsi_Cmnd *SCpnt;    /* Link to the SCSI Command Block */
SCpnt364drivers/scsi/constants.cvoid print_sense(char * devclass, Scsi_Cmnd * SCpnt)
SCpnt368drivers/scsi/constants.cunsigned char * sense_buffer = SCpnt->sense_buffer;
SCpnt370drivers/scsi/constants.cint dev = SCpnt->request.dev;
SCpnt378drivers/scsi/constants.cif(s > sizeof(SCpnt->sense_buffer)) s = sizeof(SCpnt->sense_buffer);
SCpnt244drivers/scsi/eata.cScsi_Cmnd *SCpnt;           /* Address set in cp */
SCpnt271drivers/scsi/eata.cScsi_Cmnd *SCpnt;     /* Address to be returned is sp */
SCpnt560drivers/scsi/eata.cstatic inline void build_sg_list(struct mscp *cpp, Scsi_Cmnd *SCpnt) {
SCpnt564drivers/scsi/eata.csgpnt = (struct scatterlist *) SCpnt->request_buffer;
SCpnt566drivers/scsi/eata.cfor (k = 0; k < SCpnt->use_sg; k++) {
SCpnt572drivers/scsi/eata.ccpp->data_len = htonl((SCpnt->use_sg * sizeof(struct sg_list)));
SCpnt575drivers/scsi/eata.cint eata2x_queuecommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) {
SCpnt589drivers/scsi/eata.cj = ((struct hostdata *) SCpnt->host->hostdata)->board_number;
SCpnt591drivers/scsi/eata.cif (!done) panic("%s: qcomm, pid %ld, null done.\n", BN(j), SCpnt->pid);
SCpnt612drivers/scsi/eata.celse if (eata2x_reset(SCpnt) == SCSI_RESET_SUCCESS) 
SCpnt615drivers/scsi/eata.cSCpnt->result = DID_BUS_BUSY << 16; 
SCpnt616drivers/scsi/eata.cSCpnt->host_scribble = NULL;
SCpnt617drivers/scsi/eata.cprintk("%s: qcomm, pid %ld, DID_BUS_BUSY, done.\n", BN(j), SCpnt->pid);
SCpnt619drivers/scsi/eata.cdone(SCpnt);    
SCpnt636drivers/scsi/eata.cSCpnt->scsi_done = done;
SCpnt638drivers/scsi/eata.cSCpnt->host_scribble = (unsigned char *) &cpp->index;
SCpnt641drivers/scsi/eata.cBN(j), i, SCpnt->target, SCpnt->pid);
SCpnt644drivers/scsi/eata.cif (SCpnt->cmnd[0] == data_out_cmds[k]) {
SCpnt653drivers/scsi/eata.ccpp->target = SCpnt->target;
SCpnt654drivers/scsi/eata.ccpp->lun = SCpnt->lun;  
SCpnt655drivers/scsi/eata.ccpp->SCpnt = SCpnt;
SCpnt656drivers/scsi/eata.ccpp->sense_addr = htonl((unsigned int) SCpnt->sense_buffer); 
SCpnt657drivers/scsi/eata.ccpp->sense_len = sizeof SCpnt->sense_buffer;
SCpnt659drivers/scsi/eata.cif (SCpnt->use_sg) {
SCpnt661drivers/scsi/eata.cbuild_sg_list(cpp, SCpnt);
SCpnt664drivers/scsi/eata.ccpp->data_address = htonl((unsigned int) SCpnt->request_buffer);
SCpnt665drivers/scsi/eata.ccpp->data_len = htonl(SCpnt->request_bufflen);
SCpnt668drivers/scsi/eata.cmemcpy(cpp->cdb, SCpnt->cmnd, SCpnt->cmd_len);
SCpnt672drivers/scsi/eata.cSCpnt->result = DID_ERROR << 16; 
SCpnt673drivers/scsi/eata.cSCpnt->host_scribble = NULL;
SCpnt675drivers/scsi/eata.cBN(j), SCpnt->target, SCpnt->pid);
SCpnt677drivers/scsi/eata.cdone(SCpnt);    
SCpnt721drivers/scsi/eata.cif (SCarg != HD(j)->cp[i].SCpnt)
SCpnt723drivers/scsi/eata.cBN(j), i, SCarg, HD(j)->cp[i].SCpnt);
SCpnt747drivers/scsi/eata.cScsi_Cmnd *SCpnt;
SCpnt784drivers/scsi/eata.cSCpnt = HD(j)->cp[i].SCpnt;
SCpnt787drivers/scsi/eata.cBN(j), i, SCpnt->pid);
SCpnt789drivers/scsi/eata.cif (SCpnt == NULL)
SCpnt792drivers/scsi/eata.cif (SCpnt->host_scribble == NULL)
SCpnt795drivers/scsi/eata.cif (*(unsigned int *)SCpnt->host_scribble != i) 
SCpnt798drivers/scsi/eata.cif (SCpnt->scsi_done == NULL) 
SCpnt801drivers/scsi/eata.cif (SCpnt == SCarg) arg_done = TRUE;
SCpnt828drivers/scsi/eata.cSCpnt = HD(j)->cp[i].SCpnt;
SCpnt829drivers/scsi/eata.cSCpnt->result = DID_RESET << 16;
SCpnt830drivers/scsi/eata.cSCpnt->host_scribble = NULL;
SCpnt836drivers/scsi/eata.cBN(j), i, SCpnt->pid);
SCpnt838drivers/scsi/eata.cSCpnt->scsi_done(SCpnt);
SCpnt857drivers/scsi/eata.cScsi_Cmnd *SCpnt;
SCpnt923drivers/scsi/eata.cSCpnt = spp->SCpnt;
SCpnt925drivers/scsi/eata.cif (SCpnt == NULL)
SCpnt928drivers/scsi/eata.cif (SCpnt != cpp->SCpnt)
SCpnt930drivers/scsi/eata.cBN(j), i, SCpnt, cpp->SCpnt);
SCpnt932drivers/scsi/eata.cif (SCpnt->host_scribble == NULL)
SCpnt934drivers/scsi/eata.cBN(j), i, SCpnt->pid, SCpnt);
SCpnt936drivers/scsi/eata.cif (*(unsigned int *)SCpnt->host_scribble != i) 
SCpnt938drivers/scsi/eata.c" irq %d.\n", BN(j), i, SCpnt->pid, 
SCpnt939drivers/scsi/eata.c*(unsigned int *)SCpnt->host_scribble, irq);
SCpnt947drivers/scsi/eata.cif (tstatus == BUSY && SCpnt->device->type != TYPE_TAPE) 
SCpnt952drivers/scsi/eata.c&& SCpnt->device->type == TYPE_DISK
SCpnt953drivers/scsi/eata.c&& HD(j)->target_reset[SCpnt->target])
SCpnt958drivers/scsi/eata.c&& SCpnt->device->type == TYPE_DISK
SCpnt959drivers/scsi/eata.c&& (SCpnt->sense_buffer[2] & 0xf) == RECOVERED_ERROR)
SCpnt963drivers/scsi/eata.c&& SCpnt->device->type == TYPE_DISK
SCpnt964drivers/scsi/eata.c&& (SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION)
SCpnt971drivers/scsi/eata.cHD(j)->target_reset[SCpnt->target] = FALSE;
SCpnt973drivers/scsi/eata.cif (spp->target_status && SCpnt->device->type == TYPE_DISK)
SCpnt976drivers/scsi/eata.cSCpnt->target, SCpnt->lun, SCpnt->pid,
SCpnt977drivers/scsi/eata.cspp->target_status, SCpnt->sense_buffer[2]);
SCpnt979drivers/scsi/eata.cHD(j)->target_time_out[SCpnt->target] = 0;
SCpnt985drivers/scsi/eata.cif (HD(j)->target_time_out[SCpnt->target] > 1)
SCpnt989drivers/scsi/eata.cHD(j)->target_time_out[SCpnt->target]++;
SCpnt996drivers/scsi/eata.cif (SCpnt->device->type != TYPE_TAPE)
SCpnt1018drivers/scsi/eata.cSCpnt->result = status | spp->target_status;
SCpnt1024drivers/scsi/eata.cif (SCpnt->result || do_trace)
SCpnt1034drivers/scsi/eata.cSCpnt->target, SCpnt->lun, SCpnt->pid, HD(j)->iocount);
SCpnt1037drivers/scsi/eata.cSCpnt->host_scribble = NULL;
SCpnt1040drivers/scsi/eata.cSCpnt->scsi_done(SCpnt);
SCpnt99drivers/scsi/eata_dma.cvoid eata_scsi_done (Scsi_Cmnd * SCpnt)
SCpnt1333drivers/scsi/fdomain.cint fdomain_16x0_queue( Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt1340drivers/scsi/fdomain.cSCpnt->target,
SCpnt1341drivers/scsi/fdomain.c*(unsigned char *)SCpnt->cmnd,
SCpnt1342drivers/scsi/fdomain.cSCpnt->use_sg,
SCpnt1343drivers/scsi/fdomain.cSCpnt->request_bufflen );
SCpnt1348drivers/scsi/fdomain.ccurrent_SC            = SCpnt; /* Save this for the done function */
SCpnt1391drivers/scsi/fdomain.cstatic void internal_done( Scsi_Cmnd *SCpnt )
SCpnt1393drivers/scsi/fdomain.cinternal_done_errcode = SCpnt->result;
SCpnt1397drivers/scsi/fdomain.cint fdomain_16x0_command( Scsi_Cmnd *SCpnt )
SCpnt1399drivers/scsi/fdomain.cfdomain_16x0_queue( SCpnt, internal_done );
SCpnt1409drivers/scsi/fdomain.cvoid print_info( Scsi_Cmnd *SCpnt )
SCpnt1415drivers/scsi/fdomain.cif (!SCpnt || !SCpnt->host) {
SCpnt1419drivers/scsi/fdomain.cprintk( "%s\n", fdomain_16x0_info( SCpnt->host ) );
SCpnt1420drivers/scsi/fdomain.cprint_banner( SCpnt->host );
SCpnt1421drivers/scsi/fdomain.cswitch (SCpnt->SCp.phase) {
SCpnt1429drivers/scsi/fdomain.cSCpnt->SCp.phase,
SCpnt1430drivers/scsi/fdomain.cSCpnt->target,
SCpnt1431drivers/scsi/fdomain.c*(unsigned char *)SCpnt->cmnd,
SCpnt1432drivers/scsi/fdomain.cSCpnt->use_sg,
SCpnt1433drivers/scsi/fdomain.cSCpnt->request_bufflen );
SCpnt1435drivers/scsi/fdomain.cSCpnt->SCp.sent_command,
SCpnt1436drivers/scsi/fdomain.cSCpnt->SCp.have_data_in,
SCpnt1437drivers/scsi/fdomain.cSCpnt->timeout );
SCpnt1478drivers/scsi/fdomain.cint fdomain_16x0_abort( Scsi_Cmnd *SCpnt)
SCpnt1496drivers/scsi/fdomain.cprint_info( SCpnt );
SCpnt1513drivers/scsi/fdomain.cint fdomain_16x0_reset( Scsi_Cmnd *SCpnt )
SCpnt1520drivers/scsi/fdomain.cif (SCpnt) printk( "fdomain: SCSI Bus Reset\n" );
SCpnt409drivers/scsi/in2000.cint in2000_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt412drivers/scsi/in2000.cunchar *cmd = (unchar *) SCpnt->cmnd;
SCpnt413drivers/scsi/in2000.cunchar target = SCpnt->target;
SCpnt414drivers/scsi/in2000.cvoid *buff = SCpnt->request_buffer;
SCpnt416drivers/scsi/in2000.cint bufflen = SCpnt->request_bufflen;
SCpnt443drivers/scsi/in2000.cfor (i = 0; i < SCpnt->cmd_len; i++) printk("%02x ", cmd[i]);
SCpnt449drivers/scsi/in2000.csize = SCpnt->cmd_len;  /* CDB length */ 
SCpnt487drivers/scsi/in2000.cSCpnt->result = DID_TIME_OUT << 16;
SCpnt488drivers/scsi/in2000.c(*done)(SCpnt);
SCpnt492drivers/scsi/in2000.cin2000_nsegment = SCpnt->use_sg;
SCpnt494drivers/scsi/in2000.cif(SCpnt->use_sg){
SCpnt504drivers/scsi/in2000.cin2000_SCptr = SCpnt;
SCpnt512drivers/scsi/in2000.coutb(SCpnt->lun & 7,INDATA);
SCpnt513drivers/scsi/in2000.cSCpnt->host_scribble = NULL;
SCpnt557drivers/scsi/in2000.cstatic void internal_done(Scsi_Cmnd * SCpnt)
SCpnt559drivers/scsi/in2000.cinternal_done_errcode = SCpnt->result;
SCpnt563drivers/scsi/in2000.cint in2000_command(Scsi_Cmnd * SCpnt)
SCpnt565drivers/scsi/in2000.cin2000_queuecommand(SCpnt, internal_done);
SCpnt644drivers/scsi/in2000.cint in2000_abort(Scsi_Cmnd * SCpnt)
SCpnt661drivers/scsi/in2000.cint in2000_reset(Scsi_Cmnd * SCpnt)
SCpnt678drivers/scsi/in2000.cif(SCpnt) SCpnt->flags |= NEEDS_JUMPSTART;
SCpnt46drivers/scsi/scsi.cstatic void scsi_done (Scsi_Cmnd *SCpnt);
SCpnt49drivers/scsi/scsi.cstatic void scsi_times_out (Scsi_Cmnd * SCpnt, int pid);
SCpnt270drivers/scsi/scsi.cstatic void scan_scsis_done (Scsi_Cmnd * SCpnt)
SCpnt274drivers/scsi/scsi.cprintk ("scan_scsis_done(%d, %06x)\n", SCpnt->host, SCpnt->result);
SCpnt276drivers/scsi/scsi.cSCpnt->request.dev = 0xfffe;
SCpnt278drivers/scsi/scsi.cif (SCpnt->request.sem != NULL)
SCpnt279drivers/scsi/scsi.cup(SCpnt->request.sem);
SCpnt311drivers/scsi/scsi.cScsi_Cmnd  *SCpnt;
SCpnt316drivers/scsi/scsi.cSCpnt = (Scsi_Cmnd *) scsi_init_malloc(sizeof(Scsi_Cmnd), GFP_ATOMIC|GFP_DMA);
SCpnt327drivers/scsi/scsi.cshpnt->host_queue = SCpnt;  /* We need this so that commands can time out */
SCpnt354drivers/scsi/scsi.cmemset(SCpnt, 0,  sizeof(Scsi_Cmnd));
SCpnt355drivers/scsi/scsi.cSCpnt->host = SDpnt->host;
SCpnt356drivers/scsi/scsi.cSCpnt->device = SDpnt;
SCpnt357drivers/scsi/scsi.cSCpnt->target = SDpnt->id;
SCpnt358drivers/scsi/scsi.cSCpnt->lun = SDpnt->lun;
SCpnt361drivers/scsi/scsi.cSCpnt->request.sem = NULL;
SCpnt363drivers/scsi/scsi.cSCpnt->request.dev = 0xffff; /* Mark not busy */
SCpnt365drivers/scsi/scsi.cscsi_do_cmd (SCpnt, (void *)  scsi_cmd, (void *) scsi_result,
SCpnt372drivers/scsi/scsi.cwhile (SCpnt->request.dev != 0xfffe);
SCpnt373drivers/scsi/scsi.celse if (SCpnt->request.dev != 0xfffe) {
SCpnt376drivers/scsi/scsi.cSCpnt->request.sem = &sem;
SCpnt380drivers/scsi/scsi.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt385drivers/scsi/scsi.cprintk("scsi: return code %08x\n", SCpnt->result);
SCpnt389drivers/scsi/scsi.cif(SCpnt->result) {
SCpnt390drivers/scsi/scsi.cif ((driver_byte(SCpnt->result)  & DRIVER_SENSE) &&
SCpnt391drivers/scsi/scsi.c((SCpnt->sense_buffer[0] & 0x70) >> 4) == 7) {
SCpnt392drivers/scsi/scsi.cif (SCpnt->sense_buffer[2] &0xe0)
SCpnt394drivers/scsi/scsi.cif(((SCpnt->sense_buffer[2] & 0xf) != NOT_READY) &&
SCpnt395drivers/scsi/scsi.c((SCpnt->sense_buffer[2] & 0xf) != UNIT_ATTENTION))
SCpnt416drivers/scsi/scsi.cSCpnt->request.dev = 0xffff; /* Mark not busy */
SCpnt417drivers/scsi/scsi.cSCpnt->cmd_len = 0;
SCpnt419drivers/scsi/scsi.cscsi_do_cmd (SCpnt, (void *)  scsi_cmd, (void *) scsi_result,
SCpnt423drivers/scsi/scsi.cwhile (SCpnt->request.dev != 0xfffe);
SCpnt424drivers/scsi/scsi.celse if (SCpnt->request.dev != 0xfffe) {
SCpnt427drivers/scsi/scsi.cSCpnt->request.sem = &sem;
SCpnt431drivers/scsi/scsi.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt434drivers/scsi/scsi.cthe_result = SCpnt->result;
SCpnt573drivers/scsi/scsi.cSCpnt->request.dev = 0xffff; /* Mark not busy */
SCpnt574drivers/scsi/scsi.cSCpnt->cmd_len = 0;
SCpnt576drivers/scsi/scsi.cscsi_do_cmd (SCpnt, (void *)  scsi_cmd,
SCpnt581drivers/scsi/scsi.cwhile (SCpnt->request.dev != 0xfffe);
SCpnt582drivers/scsi/scsi.celse if (SCpnt->request.dev != 0xfffe) {
SCpnt585drivers/scsi/scsi.cSCpnt->request.sem = &sem;
SCpnt589drivers/scsi/scsi.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt619drivers/scsi/scsi.cscsi_init_free((char *) SCpnt, sizeof(Scsi_Cmnd));
SCpnt641drivers/scsi/scsi.cstatic void scsi_times_out (Scsi_Cmnd * SCpnt, int pid)
SCpnt644drivers/scsi/scsi.cswitch (SCpnt->internal_timeout & (IN_ABORT | IN_RESET))
SCpnt653drivers/scsi/scsi.cif (!scsi_abort  (SCpnt, DID_TIME_OUT, pid))
SCpnt657drivers/scsi/scsi.cSCpnt->host->host_no);
SCpnt658drivers/scsi/scsi.cif (!scsi_reset (SCpnt))
SCpnt665drivers/scsi/scsi.cprintk("Unable to reset scsi host %d - ",SCpnt->host->host_no);
SCpnt684drivers/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt694drivers/scsi/scsi.cSCpnt =  device->host->host_queue;
SCpnt695drivers/scsi/scsi.cwhile(SCpnt){
SCpnt696drivers/scsi/scsi.cif(SCpnt->target == device->id &&
SCpnt697drivers/scsi/scsi.cSCpnt->lun == device->lun)
SCpnt698drivers/scsi/scsi.cif(SCpnt->request.dev < 0) break;
SCpnt699drivers/scsi/scsi.cSCpnt = SCpnt->next;
SCpnt702drivers/scsi/scsi.cif (!SCpnt) return NULL;
SCpnt707drivers/scsi/scsi.cmemcpy(&SCpnt->request, req, sizeof(struct request));
SCpnt722drivers/scsi/scsi.cSCpnt->request.bhtail = bh;
SCpnt728drivers/scsi/scsi.cSCpnt->request.nr_sectors -= req->nr_sectors;
SCpnt731drivers/scsi/scsi.cSCpnt->request.sem = NULL; /* Wait until whole thing done */
SCpnt737drivers/scsi/scsi.cSCpnt->request.dev = 0xffff; /* Busy, but no request */
SCpnt738drivers/scsi/scsi.cSCpnt->request.sem = NULL;  /* And no one is waiting for the device either */
SCpnt741drivers/scsi/scsi.cSCpnt->use_sg = 0;  /* Reset the scatter-gather flag */
SCpnt742drivers/scsi/scsi.cSCpnt->old_use_sg  = 0;
SCpnt743drivers/scsi/scsi.cSCpnt->transfersize = 0;
SCpnt744drivers/scsi/scsi.cSCpnt->underflow = 0;
SCpnt745drivers/scsi/scsi.cSCpnt->cmd_len = 0;
SCpnt746drivers/scsi/scsi.creturn SCpnt;
SCpnt767drivers/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt783drivers/scsi/scsi.cSCpnt = host->host_queue;
SCpnt784drivers/scsi/scsi.cwhile(SCpnt){
SCpnt785drivers/scsi/scsi.cif(SCpnt->target == device->id &&
SCpnt786drivers/scsi/scsi.cSCpnt->lun == device->lun) {
SCpnt787drivers/scsi/scsi.cSCwait = SCpnt;
SCpnt788drivers/scsi/scsi.cif(SCpnt->request.dev < 0) break;
SCpnt790drivers/scsi/scsi.cSCpnt = SCpnt->next;
SCpnt799drivers/scsi/scsi.cif (!SCpnt || SCpnt->request.dev >= 0)  /* Might have changed */
SCpnt812drivers/scsi/scsi.cmemcpy(&SCpnt->request, req, sizeof(struct request));
SCpnt827drivers/scsi/scsi.cSCpnt->request.bhtail = bh;
SCpnt832drivers/scsi/scsi.cSCpnt->request.nr_sectors -= req->nr_sectors;
SCpnt835drivers/scsi/scsi.cSCpnt->request.sem = NULL; /* Wait until whole thing done */
SCpnt844drivers/scsi/scsi.cSCpnt->request.dev = 0xffff; /* Busy */
SCpnt845drivers/scsi/scsi.cSCpnt->request.sem = NULL;  /* And no one is waiting for this to complete */
SCpnt852drivers/scsi/scsi.cSCpnt->use_sg = 0;  /* Reset the scatter-gather flag */
SCpnt853drivers/scsi/scsi.cSCpnt->old_use_sg  = 0;
SCpnt854drivers/scsi/scsi.cSCpnt->transfersize = 0;      /* No default transfer size */
SCpnt855drivers/scsi/scsi.cSCpnt->cmd_len = 0;
SCpnt856drivers/scsi/scsi.cSCpnt->underflow = 0;         /* Do not flag underflow conditions */
SCpnt857drivers/scsi/scsi.creturn SCpnt;
SCpnt864drivers/scsi/scsi.cinline void internal_cmnd (Scsi_Cmnd * SCpnt)
SCpnt873drivers/scsi/scsi.cif ((unsigned long) &SCpnt < current->kernel_stack_page)
SCpnt876drivers/scsi/scsi.chost = SCpnt->host;
SCpnt888drivers/scsi/scsi.cupdate_timeout(SCpnt, SCpnt->timeout_per_command);
SCpnt896drivers/scsi/scsi.c"bufflen = %d, done = %08x)\n", SCpnt->host->host_no, SCpnt->target, SCpnt->cmnd, SCpnt->buffer, SCpnt->bufflen, SCpnt->done);
SCpnt913drivers/scsi/scsi.cif(!intr_count && SCpnt->host->irq)
SCpnt914drivers/scsi/scsi.cdisable_irq(SCpnt->host->irq);
SCpnt916drivers/scsi/scsi.chost->hostt->queuecommand (SCpnt, scsi_done);
SCpnt918drivers/scsi/scsi.cif(!intr_count && SCpnt->host->irq)
SCpnt919drivers/scsi/scsi.cenable_irq(SCpnt->host->irq);
SCpnt927drivers/scsi/scsi.ctemp=host->hostt->command (SCpnt);
SCpnt928drivers/scsi/scsi.cSCpnt->result = temp;
SCpnt934drivers/scsi/scsi.cscsi_done(SCpnt);
SCpnt941drivers/scsi/scsi.cstatic void scsi_request_sense (Scsi_Cmnd * SCpnt)
SCpnt947drivers/scsi/scsi.cSCpnt->flags |= WAS_SENSE | ASKED_FOR_SENSE;
SCpnt948drivers/scsi/scsi.cupdate_timeout(SCpnt, SENSE_TIMEOUT);
SCpnt952drivers/scsi/scsi.cmemcpy ((void *) SCpnt->cmnd , (void *) generic_sense,
SCpnt955drivers/scsi/scsi.cSCpnt->cmnd[1] = SCpnt->lun << 5;
SCpnt956drivers/scsi/scsi.cSCpnt->cmnd[4] = sizeof(SCpnt->sense_buffer);
SCpnt958drivers/scsi/scsi.cSCpnt->request_buffer = &SCpnt->sense_buffer;
SCpnt959drivers/scsi/scsi.cSCpnt->request_bufflen = sizeof(SCpnt->sense_buffer);
SCpnt960drivers/scsi/scsi.cSCpnt->use_sg = 0;
SCpnt961drivers/scsi/scsi.cSCpnt->cmd_len = COMMAND_SIZE(SCpnt->cmnd[0]);
SCpnt962drivers/scsi/scsi.cinternal_cmnd (SCpnt);
SCpnt974drivers/scsi/scsi.cvoid scsi_do_cmd (Scsi_Cmnd * SCpnt, const void *cmnd ,
SCpnt980drivers/scsi/scsi.cstruct Scsi_Host * host = SCpnt->host;
SCpnt985drivers/scsi/scsi.cint target = SCpnt->target;
SCpnt1011drivers/scsi/scsi.cSCpnt->pid = scsi_pid++;
SCpnt1032drivers/scsi/scsi.cmemcpy ((void *) SCpnt->data_cmnd , (void *) cmnd, 12);
SCpnt1034drivers/scsi/scsi.cSCpnt->host = host;
SCpnt1035drivers/scsi/scsi.cSCpnt->target = target;
SCpnt1036drivers/scsi/scsi.cSCpnt->lun = (SCpnt->data_cmnd[1] >> 5);
SCpnt1038drivers/scsi/scsi.cSCpnt->bufflen = bufflen;
SCpnt1039drivers/scsi/scsi.cSCpnt->buffer = buffer;
SCpnt1040drivers/scsi/scsi.cSCpnt->flags=0;
SCpnt1041drivers/scsi/scsi.cSCpnt->retries=0;
SCpnt1042drivers/scsi/scsi.cSCpnt->allowed=retries;
SCpnt1043drivers/scsi/scsi.cSCpnt->done = done;
SCpnt1044drivers/scsi/scsi.cSCpnt->timeout_per_command = timeout;
SCpnt1046drivers/scsi/scsi.cmemcpy ((void *) SCpnt->cmnd , (void *) cmnd, 12);
SCpnt1049drivers/scsi/scsi.cmemset ((void *) SCpnt->sense_buffer, 0, sizeof SCpnt->sense_buffer);
SCpnt1050drivers/scsi/scsi.cSCpnt->request_buffer = buffer;
SCpnt1051drivers/scsi/scsi.cSCpnt->request_bufflen = bufflen;
SCpnt1052drivers/scsi/scsi.cSCpnt->old_use_sg = SCpnt->use_sg;
SCpnt1053drivers/scsi/scsi.cif (SCpnt->cmd_len == 0)
SCpnt1054drivers/scsi/scsi.cSCpnt->cmd_len = COMMAND_SIZE(SCpnt->cmnd[0]);
SCpnt1055drivers/scsi/scsi.cSCpnt->old_cmd_len = SCpnt->cmd_len;
SCpnt1059drivers/scsi/scsi.cSCpnt->internal_timeout = 0;
SCpnt1060drivers/scsi/scsi.cSCpnt->abort_reason = 0;
SCpnt1061drivers/scsi/scsi.cinternal_cmnd (SCpnt);
SCpnt1076drivers/scsi/scsi.cstatic void reset (Scsi_Cmnd * SCpnt)
SCpnt1079drivers/scsi/scsi.cprintk("scsi: reset(%d)\n", SCpnt->host->host_no);
SCpnt1082drivers/scsi/scsi.cSCpnt->flags |= (WAS_RESET | IS_RESETTING);
SCpnt1083drivers/scsi/scsi.cscsi_reset(SCpnt);
SCpnt1090drivers/scsi/scsi.cif(SCpnt->flags & NEEDS_JUMPSTART) {
SCpnt1091drivers/scsi/scsi.cSCpnt->flags &= ~NEEDS_JUMPSTART;
SCpnt1092drivers/scsi/scsi.cscsi_request_sense (SCpnt);
SCpnt1099drivers/scsi/scsi.cstatic int check_sense (Scsi_Cmnd * SCpnt)
SCpnt1104drivers/scsi/scsi.cif (((SCpnt->sense_buffer[0] & 0x70) >> 4) != 7) {
SCpnt1105drivers/scsi/scsi.cif(!(SCpnt->flags & ASKED_FOR_SENSE))
SCpnt1111drivers/scsi/scsi.cSCpnt->flags &= ~ASKED_FOR_SENSE;
SCpnt1114drivers/scsi/scsi.cprintk("scsi%d : ", SCpnt->host->host_no);
SCpnt1115drivers/scsi/scsi.cprint_sense("", SCpnt);
SCpnt1118drivers/scsi/scsi.cif (SCpnt->sense_buffer[2] &0xe0)
SCpnt1121drivers/scsi/scsi.cswitch (SCpnt->sense_buffer[2] & 0xf)
SCpnt1171drivers/scsi/scsi.cstatic void scsi_done (Scsi_Cmnd * SCpnt)
SCpnt1177drivers/scsi/scsi.cstruct Scsi_Host * host = SCpnt->host;
SCpnt1178drivers/scsi/scsi.cint result = SCpnt->result;
SCpnt1179drivers/scsi/scsi.coldto = update_timeout(SCpnt, 0);
SCpnt1183drivers/scsi/scsi.cresult, SCpnt->target, SCpnt->lun);
SCpnt1188drivers/scsi/scsi.cif(host_byte(result) == DID_ABORT && SCpnt->abort_reason)
SCpnt1189drivers/scsi/scsi.cSCpnt->result = result = (result & 0xff00ffff) |
SCpnt1190drivers/scsi/scsi.c(SCpnt->abort_reason << 16);
SCpnt1202drivers/scsi/scsi.cif(SCpnt->flags & WAS_SENSE)
SCpnt1204drivers/scsi/scsi.cSCpnt->use_sg = SCpnt->old_use_sg;
SCpnt1205drivers/scsi/scsi.cSCpnt->cmd_len = SCpnt->old_cmd_len;
SCpnt1211drivers/scsi/scsi.cif (status_byte(result) && (SCpnt->flags & WAS_SENSE))
SCpnt1214drivers/scsi/scsi.cSCpnt->flags &= ~WAS_SENSE;
SCpnt1215drivers/scsi/scsi.cSCpnt->internal_timeout &= ~SENSE_TIMEOUT;
SCpnt1217drivers/scsi/scsi.cif (!(SCpnt->flags & WAS_RESET))
SCpnt1220drivers/scsi/scsi.cSCpnt->host->host_no, SCpnt->target, SCpnt->lun);
SCpnt1221drivers/scsi/scsi.creset(SCpnt);
SCpnt1236drivers/scsi/scsi.cif (SCpnt->flags & WAS_SENSE)
SCpnt1242drivers/scsi/scsi.cSCpnt->flags &= ~WAS_SENSE;
SCpnt1243drivers/scsi/scsi.cSCpnt->internal_timeout &= ~SENSE_TIMEOUT;
SCpnt1245drivers/scsi/scsi.cswitch (checked = check_sense(SCpnt))
SCpnt1253drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1292drivers/scsi/scsi.cswitch (check_sense(SCpnt))
SCpnt1295drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1308drivers/scsi/scsi.cscsi_request_sense (SCpnt);
SCpnt1320drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1326drivers/scsi/scsi.cSCpnt->host->host_no);
SCpnt1327drivers/scsi/scsi.creset(SCpnt);
SCpnt1350drivers/scsi/scsi.cif (SCpnt->flags & WAS_TIMEDOUT)
SCpnt1362drivers/scsi/scsi.cSCpnt->flags  |= WAS_TIMEDOUT;
SCpnt1363drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_ABORT;
SCpnt1386drivers/scsi/scsi.cif (SCpnt->flags & IS_RESETTING)
SCpnt1388drivers/scsi/scsi.cSCpnt->flags &= ~IS_RESETTING;
SCpnt1395drivers/scsi/scsi.cswitch (check_sense(SCpnt)) {
SCpnt1397drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1410drivers/scsi/scsi.cscsi_request_sense (SCpnt);
SCpnt1432drivers/scsi/scsi.cSCpnt->allowed, SCpnt->retries);
SCpnt1435drivers/scsi/scsi.cif ((++SCpnt->retries) < SCpnt->allowed)
SCpnt1437drivers/scsi/scsi.cif ((SCpnt->retries >= (SCpnt->allowed >> 1))
SCpnt1438drivers/scsi/scsi.c&& !(jiffies < SCpnt->host->last_reset + MIN_RESET_PERIOD)
SCpnt1439drivers/scsi/scsi.c&& !(SCpnt->flags & WAS_RESET))
SCpnt1442drivers/scsi/scsi.cSCpnt->host->host_no);
SCpnt1443drivers/scsi/scsi.creset(SCpnt);
SCpnt1457drivers/scsi/scsi.cif (SCpnt->flags & WAS_SENSE)
SCpnt1458drivers/scsi/scsi.cscsi_request_sense(SCpnt);
SCpnt1461drivers/scsi/scsi.cmemcpy ((void *) SCpnt->cmnd,
SCpnt1462drivers/scsi/scsi.c(void*) SCpnt->data_cmnd,
SCpnt1463drivers/scsi/scsi.csizeof(SCpnt->data_cmnd));
SCpnt1464drivers/scsi/scsi.cSCpnt->request_buffer = SCpnt->buffer;
SCpnt1465drivers/scsi/scsi.cSCpnt->request_bufflen = SCpnt->bufflen;
SCpnt1466drivers/scsi/scsi.cSCpnt->use_sg = SCpnt->old_use_sg;
SCpnt1467drivers/scsi/scsi.cSCpnt->cmd_len = SCpnt->old_cmd_len;
SCpnt1468drivers/scsi/scsi.cinternal_cmnd (SCpnt);
SCpnt1478drivers/scsi/scsi.cprintk("Calling done function - at address %08x\n", SCpnt->done);
SCpnt1486drivers/scsi/scsi.cif (MAJOR(SCpnt->request.dev) != SCSI_DISK_MAJOR &&
SCpnt1487drivers/scsi/scsi.cMAJOR(SCpnt->request.dev) != SCSI_CDROM_MAJOR) {
SCpnt1497drivers/scsi/scsi.cSCpnt->result = result | ((exit & 0xff) << 24);
SCpnt1498drivers/scsi/scsi.cSCpnt->use_sg = SCpnt->old_use_sg;
SCpnt1499drivers/scsi/scsi.cSCpnt->cmd_len = SCpnt->old_cmd_len;
SCpnt1500drivers/scsi/scsi.cSCpnt->done (SCpnt);
SCpnt1525drivers/scsi/scsi.cint scsi_abort (Scsi_Cmnd * SCpnt, int why, int pid)
SCpnt1529drivers/scsi/scsi.cstruct Scsi_Host * host = SCpnt->host;
SCpnt1540drivers/scsi/scsi.cif (SCpnt->request.dev == -1 || pid != SCpnt->pid) {
SCpnt1545drivers/scsi/scsi.cif (SCpnt->internal_timeout & IN_ABORT)
SCpnt1548drivers/scsi/scsi.cwhile (SCpnt->internal_timeout & IN_ABORT);
SCpnt1552drivers/scsi/scsi.cSCpnt->internal_timeout |= IN_ABORT;
SCpnt1553drivers/scsi/scsi.coldto = update_timeout(SCpnt, ABORT_TIMEOUT);
SCpnt1555drivers/scsi/scsi.cif ((SCpnt->flags & IS_RESETTING) &&
SCpnt1556drivers/scsi/scsi.cSCpnt->device->soft_reset) {
SCpnt1560drivers/scsi/scsi.c" the bus was reset\n", SCpnt->target, SCpnt->lun);
SCpnt1565drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_ABORT;
SCpnt1566drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1570drivers/scsi/scsi.cSCpnt->pid, SCpnt->host->host_no, (int) SCpnt->target, (int)
SCpnt1571drivers/scsi/scsi.cSCpnt->lun);
SCpnt1572drivers/scsi/scsi.cprint_command (SCpnt->cmnd);
SCpnt1573drivers/scsi/scsi.cif (SCpnt->request.dev == -1 || pid != SCpnt->pid)
SCpnt1575drivers/scsi/scsi.cSCpnt->abort_reason = why;
SCpnt1576drivers/scsi/scsi.cswitch(host->hostt->abort(SCpnt)) {
SCpnt1587drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_ABORT;
SCpnt1588drivers/scsi/scsi.cif(SCpnt->flags & WAS_TIMEDOUT) {
SCpnt1594drivers/scsi/scsi.cSCpnt->flags |= WAS_TIMEDOUT;
SCpnt1595drivers/scsi/scsi.coldto = SCpnt->timeout_per_command;
SCpnt1596drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1605drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1613drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_ABORT;
SCpnt1614drivers/scsi/scsi.cupdate_timeout(SCpnt, 0);
SCpnt1618drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_ABORT;
SCpnt1625drivers/scsi/scsi.cint scsi_reset (Scsi_Cmnd * SCpnt)
SCpnt1630drivers/scsi/scsi.cstruct Scsi_Host * host = SCpnt->host;
SCpnt1638drivers/scsi/scsi.cif (SCpnt->internal_timeout & IN_RESET)
SCpnt1641drivers/scsi/scsi.cwhile (SCpnt->internal_timeout & IN_RESET);
SCpnt1645drivers/scsi/scsi.cSCpnt->internal_timeout |= IN_RESET;
SCpnt1646drivers/scsi/scsi.coldto = update_timeout(SCpnt, RESET_TIMEOUT);
SCpnt1657drivers/scsi/scsi.cscsi_abort(SCpnt1, DID_RESET, SCpnt->pid);
SCpnt1665drivers/scsi/scsi.ctemp = host->hostt->reset(SCpnt);
SCpnt1673drivers/scsi/scsi.ctemp = host->hostt->reset(SCpnt);
SCpnt1685drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_RESET;
SCpnt1686drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1693drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_RESET;
SCpnt1694drivers/scsi/scsi.cscsi_request_sense (SCpnt);
SCpnt1703drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_RESET;
SCpnt1704drivers/scsi/scsi.cupdate_timeout(SCpnt, 0);
SCpnt1727drivers/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt1741drivers/scsi/scsi.cfor(SCpnt = host->host_queue; SCpnt; SCpnt = SCpnt->next)
SCpnt1742drivers/scsi/scsi.cif (SCpnt->timeout == -1)
SCpnt1744drivers/scsi/scsi.cSCpnt->timeout = 0;
SCpnt1745drivers/scsi/scsi.cpid = SCpnt->pid;
SCpnt1747drivers/scsi/scsi.cscsi_times_out(SCpnt, pid);
SCpnt1771drivers/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt1798drivers/scsi/scsi.cfor(SCpnt = host->host_queue; SCpnt; SCpnt = SCpnt->next)
SCpnt1799drivers/scsi/scsi.cif (SCpnt->timeout > 0) {
SCpnt1800drivers/scsi/scsi.cSCpnt->timeout -= used;
SCpnt1801drivers/scsi/scsi.cif(SCpnt->timeout <= 0) SCpnt->timeout = -1;
SCpnt1802drivers/scsi/scsi.cif(SCpnt->timeout > 0 && SCpnt->timeout < least)
SCpnt1803drivers/scsi/scsi.cleast = SCpnt->timeout;
SCpnt1975drivers/scsi/scsi.cScsi_Cmnd * SCpnt;
SCpnt2016drivers/scsi/scsi.cSCpnt = (Scsi_Cmnd *) scsi_init_malloc(sizeof(Scsi_Cmnd), GFP_ATOMIC);
SCpnt2017drivers/scsi/scsi.cSCpnt->host = SDpnt->host;
SCpnt2018drivers/scsi/scsi.cSCpnt->device = SDpnt;
SCpnt2019drivers/scsi/scsi.cSCpnt->target = SDpnt->id;
SCpnt2020drivers/scsi/scsi.cSCpnt->lun = SDpnt->lun;
SCpnt2021drivers/scsi/scsi.cSCpnt->request.dev = -1; /* Mark not busy */
SCpnt2022drivers/scsi/scsi.cSCpnt->use_sg = 0;
SCpnt2023drivers/scsi/scsi.cSCpnt->old_use_sg = 0;
SCpnt2024drivers/scsi/scsi.cSCpnt->old_cmd_len = 0;
SCpnt2025drivers/scsi/scsi.cSCpnt->timeout = 0;
SCpnt2026drivers/scsi/scsi.cSCpnt->underflow = 0;
SCpnt2027drivers/scsi/scsi.cSCpnt->transfersize = 0;
SCpnt2028drivers/scsi/scsi.cSCpnt->host_scribble = NULL;
SCpnt2031drivers/scsi/scsi.chost->host_queue->prev = SCpnt;
SCpnt2032drivers/scsi/scsi.cSCpnt->next = host->host_queue;
SCpnt2033drivers/scsi/scsi.cSCpnt->prev = NULL;
SCpnt2034drivers/scsi/scsi.chost->host_queue = SCpnt;
SCpnt2159drivers/scsi/scsi.cScsi_Cmnd * SCpnt;
SCpnt2216drivers/scsi/scsi.cSCpnt = (Scsi_Cmnd *) scsi_init_malloc(sizeof(Scsi_Cmnd), GFP_ATOMIC);
SCpnt2217drivers/scsi/scsi.cSCpnt->host = SDpnt->host;
SCpnt2218drivers/scsi/scsi.cSCpnt->device = SDpnt;
SCpnt2219drivers/scsi/scsi.cSCpnt->target = SDpnt->id;
SCpnt2220drivers/scsi/scsi.cSCpnt->lun = SDpnt->lun;
SCpnt2221drivers/scsi/scsi.cSCpnt->request.dev = -1; /* Mark not busy */
SCpnt2222drivers/scsi/scsi.cSCpnt->request.sem = NULL;
SCpnt2223drivers/scsi/scsi.cSCpnt->use_sg = 0;
SCpnt2224drivers/scsi/scsi.cSCpnt->old_use_sg = 0;
SCpnt2225drivers/scsi/scsi.cSCpnt->underflow = 0;
SCpnt2226drivers/scsi/scsi.cSCpnt->timeout = 0;
SCpnt2227drivers/scsi/scsi.cSCpnt->transfersize = 0;
SCpnt2228drivers/scsi/scsi.cSCpnt->host_scribble = NULL;
SCpnt2230drivers/scsi/scsi.cSCpnt->next = host->host_queue;
SCpnt2231drivers/scsi/scsi.cSCpnt->prev = NULL;
SCpnt2232drivers/scsi/scsi.chost->host_queue = SCpnt;
SCpnt2234drivers/scsi/scsi.chost->host_queue->prev = SCpnt;
SCpnt2323drivers/scsi/scsi.cScsi_Cmnd * SCpnt;
SCpnt2339drivers/scsi/scsi.cfor(SCpnt = shpnt->host_queue; SCpnt; SCpnt = SCpnt->next)
SCpnt2343drivers/scsi/scsi.cif(SCpnt->request.dev != -1) {
SCpnt2345drivers/scsi/scsi.cfor(SCpnt = shpnt->host_queue; SCpnt; SCpnt = SCpnt->next)
SCpnt2346drivers/scsi/scsi.cif(SCpnt->request.dev == 0xffe0) SCpnt->request.dev = -1;
SCpnt2350drivers/scsi/scsi.cSCpnt->request.dev = 0xffe0;  /* Mark as busy */
SCpnt2373drivers/scsi/scsi.cSCpnt = sdpnt->host->host_queue->next;
SCpnt2375drivers/scsi/scsi.csdpnt->host->host_queue = SCpnt;
SCpnt2376drivers/scsi/scsi.cif (SCpnt) SCpnt->prev = NULL;
SCpnt2492drivers/scsi/scsi.cScsi_Cmnd * SCpnt;
SCpnt2496drivers/scsi/scsi.cfor(SCpnt=shpnt->host_queue; SCpnt; SCpnt = SCpnt->next)
SCpnt2500drivers/scsi/scsi.ci++, SCpnt->host->host_no,
SCpnt2501drivers/scsi/scsi.cSCpnt->target,
SCpnt2502drivers/scsi/scsi.cSCpnt->lun,
SCpnt2503drivers/scsi/scsi.cSCpnt->request.dev,
SCpnt2504drivers/scsi/scsi.cSCpnt->request.sector,
SCpnt2505drivers/scsi/scsi.cSCpnt->request.nr_sectors,
SCpnt2506drivers/scsi/scsi.cSCpnt->request.current_nr_sectors,
SCpnt2507drivers/scsi/scsi.cSCpnt->use_sg,
SCpnt2508drivers/scsi/scsi.cSCpnt->retries,
SCpnt2509drivers/scsi/scsi.cSCpnt->allowed,
SCpnt2510drivers/scsi/scsi.cSCpnt->flags,
SCpnt2511drivers/scsi/scsi.cSCpnt->timeout_per_command,
SCpnt2512drivers/scsi/scsi.cSCpnt->timeout,
SCpnt2513drivers/scsi/scsi.cSCpnt->internal_timeout,
SCpnt2514drivers/scsi/scsi.cSCpnt->cmnd[0],
SCpnt2515drivers/scsi/scsi.cSCpnt->sense_buffer[2],
SCpnt2516drivers/scsi/scsi.cSCpnt->result);
SCpnt533drivers/scsi/scsi.hstatic Scsi_Cmnd * end_scsi_request(Scsi_Cmnd * SCpnt, int uptodate, int sectors)
SCpnt538drivers/scsi/scsi.hreq = &SCpnt->request;
SCpnt565drivers/scsi/scsi.hreturn SCpnt;
SCpnt572drivers/scsi/scsi.hif (SCpnt->host->block) {
SCpnt575drivers/scsi/scsi.hfor (next = SCpnt->host->block; next != SCpnt->host;
SCpnt582drivers/scsi/scsi.hwake_up(&SCpnt->device->device_wait);
SCpnt67drivers/scsi/scsi_debug.cif ((SCpnt->request.dev & 0xf) != 0) start = starts[(SCpnt->request.dev & 0xf) - 1];    \
SCpnt73drivers/scsi/scsi_debug.cif (bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\
SCpnt79drivers/scsi/scsi_debug.cif ((SCpnt->request.dev & 0xfff0) != ((target + NR_REAL) << 4) +(MAJOR_NR << 8)){  \
SCpnt80drivers/scsi/scsi_debug.cprintk("Dev #s %x %x ",SCpnt->request.dev, target);      \
SCpnt86drivers/scsi/scsi_debug.cif (bufflen != 1024 && (!SCpnt->use_sg)) {printk("%x %d\n ",bufflen, SCpnt->use_sg); panic("Bad bufflen");};     \
SCpnt88drivers/scsi/scsi_debug.cif ((SCpnt->request.dev & 0xf) > npart) panic ("Bad partition");  \
SCpnt89drivers/scsi/scsi_debug.cif ((SCpnt->request.dev & 0xf) != 0) start = starts[(SCpnt->request.dev & 0xf) - 1];    \
SCpnt90drivers/scsi/scsi_debug.cif (SCpnt->request.cmd != RW) panic ("Wrong  operation");    \
SCpnt91drivers/scsi/scsi_debug.cif (SCpnt->request.sector + start != block) panic("Wrong block.");  \
SCpnt92drivers/scsi/scsi_debug.cif (SCpnt->request.current_nr_sectors != 2 && (!SCpnt->use_sg)) panic ("Wrong # blocks");  \
SCpnt93drivers/scsi/scsi_debug.cif (SCpnt->request.bh){              \
SCpnt94drivers/scsi/scsi_debug.cif (SCpnt->request.bh->b_size != 1024) panic ("Wrong bh size");  \
SCpnt95drivers/scsi/scsi_debug.cif ((SCpnt->request.bh->b_blocknr << 1) + start != block)           \
SCpnt96drivers/scsi/scsi_debug.c{  printk("Wrong bh block# %d %d ",SCpnt->request.bh->b_blocknr, block);  \
SCpnt98drivers/scsi/scsi_debug.cif (SCpnt->request.bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\
SCpnt110drivers/scsi/scsi_debug.cstatic void scsi_dump(Scsi_Cmnd * SCpnt, int flag){
SCpnt117drivers/scsi/scsi_debug.cprintk("use_sg: %d",SCpnt->use_sg);
SCpnt118drivers/scsi/scsi_debug.cif (SCpnt->use_sg){
SCpnt119drivers/scsi/scsi_debug.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt120drivers/scsi/scsi_debug.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt126drivers/scsi/scsi_debug.cprintk("nosg: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer,
SCpnt127drivers/scsi/scsi_debug.cSCpnt->bufflen);
SCpnt128drivers/scsi/scsi_debug.clpnt = (int *) SCpnt->request.buffer;
SCpnt131drivers/scsi/scsi_debug.clpnt = (unsigned int *) SCpnt;
SCpnt155drivers/scsi/scsi_debug.cint scsi_debug_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt157drivers/scsi/scsi_debug.cunchar *cmd = (unchar *) SCpnt->cmnd;
SCpnt165drivers/scsi/scsi_debug.cint target = SCpnt->target;
SCpnt166drivers/scsi/scsi_debug.cint bufflen = SCpnt->request_bufflen;
SCpnt172drivers/scsi/scsi_debug.cDEB(if (target > 1) { SCpnt->result = DID_TIME_OUT << 16;done(SCpnt);return 0;});
SCpnt174drivers/scsi/scsi_debug.cbuff = (unsigned char *) SCpnt->request_buffer;
SCpnt176drivers/scsi/scsi_debug.cif(target>=1 || SCpnt->lun != 0) {
SCpnt177drivers/scsi/scsi_debug.cSCpnt->result =  DID_NO_CONNECT << 16;
SCpnt178drivers/scsi/scsi_debug.cdone(SCpnt);
SCpnt187drivers/scsi/scsi_debug.cprintk("scsi_debug: Requesting sense buffer (%x %x %x %d):", SCpnt, buff, done, bufflen);
SCpnt195drivers/scsi/scsi_debug.cSCpnt->result = 0;
SCpnt196drivers/scsi/scsi_debug.cdone(SCpnt); 
SCpnt223drivers/scsi/scsi_debug.cif(NR_REAL < 0) NR_REAL = (SCpnt->request.dev >> 4) & 0x0f;
SCpnt248drivers/scsi/scsi_debug.cusec = (SCpnt->request.nr_sectors << 9) * 1.0e6 / SCSI_DATARATE;
SCpnt255drivers/scsi/scsi_debug.cprintk("(r%d)",SCpnt->request.nr_sectors);
SCpnt258drivers/scsi/scsi_debug.cif(SCpnt->use_sg){
SCpnt263drivers/scsi/scsi_debug.cbh = SCpnt->request.bh;
SCpnt289drivers/scsi/scsi_debug.cif (SCpnt->use_sg) printk("Block %x (%d %d)\n",block, SCpnt->request.nr_sectors,
SCpnt290drivers/scsi/scsi_debug.cSCpnt->request.current_nr_sectors);
SCpnt318drivers/scsi/scsi_debug.cmemcpy(buff+64, SCpnt, sizeof(Scsi_Cmnd));
SCpnt321drivers/scsi/scsi_debug.cif(SCpnt->use_sg){
SCpnt336drivers/scsi/scsi_debug.cSCpnt->result = 0;
SCpnt337drivers/scsi/scsi_debug.c(done)(SCpnt);
SCpnt340drivers/scsi/scsi_debug.cif (SCpnt->use_sg && !scsi_debug_errsts)
SCpnt341drivers/scsi/scsi_debug.cif(bh) scsi_dump(SCpnt, 0);
SCpnt354drivers/scsi/scsi_debug.cif (SCpnt->use_sg){
SCpnt355drivers/scsi/scsi_debug.cif ((bufflen >> 9) != SCpnt->request.nr_sectors)
SCpnt363drivers/scsi/scsi_debug.cscsi_dump(SCpnt,1);
SCpnt371drivers/scsi/scsi_debug.cSCpnt->result =  DID_NO_CONNECT << 16;
SCpnt372drivers/scsi/scsi_debug.cdone(SCpnt);
SCpnt385drivers/scsi/scsi_debug.cSCint[i] = SCpnt;
SCpnt398drivers/scsi/scsi_debug.cSCpnt->result = scsi_debug_errsts;
SCpnt409drivers/scsi/scsi_debug.cSCpnt->result = scsi_debug_errsts;
SCpnt422drivers/scsi/scsi_debug.cstatic void internal_done(Scsi_Cmnd * SCpnt)
SCpnt424drivers/scsi/scsi_debug.cinternal_done_errcode = SCpnt->result;
SCpnt428drivers/scsi/scsi_debug.cint scsi_debug_command(Scsi_Cmnd * SCpnt)
SCpnt431drivers/scsi/scsi_debug.cscsi_debug_queuecommand(SCpnt, internal_done);
SCpnt528drivers/scsi/scsi_debug.cint scsi_debug_abort(Scsi_Cmnd * SCpnt)
SCpnt535drivers/scsi/scsi_debug.cSCpnt->result = SCpnt->abort_reason << 16;
SCpnt537drivers/scsi/scsi_debug.cif(SCpnt == SCint[j]) {
SCpnt539drivers/scsi/scsi_debug.cmy_done(SCpnt);
SCpnt560drivers/scsi/scsi_debug.cint scsi_debug_reset(Scsi_Cmnd * SCpnt)
SCpnt79drivers/scsi/scsi_ioctl.cstatic void scsi_ioctl_done (Scsi_Cmnd * SCpnt)
SCpnt83drivers/scsi/scsi_ioctl.creq = &SCpnt->request;
SCpnt94drivers/scsi/scsi_ioctl.cScsi_Cmnd * SCpnt;
SCpnt96drivers/scsi/scsi_ioctl.cSCpnt = allocate_device(NULL, dev, 1);
SCpnt97drivers/scsi/scsi_ioctl.cscsi_do_cmd(SCpnt,  cmd, NULL,  0,
SCpnt101drivers/scsi/scsi_ioctl.cif (SCpnt->request.dev != 0xfffe){
SCpnt103drivers/scsi/scsi_ioctl.cSCpnt->request.sem = &sem;
SCpnt106drivers/scsi/scsi_ioctl.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt109drivers/scsi/scsi_ioctl.cif(driver_byte(SCpnt->result) != 0)
SCpnt110drivers/scsi/scsi_ioctl.cswitch(SCpnt->sense_buffer[2] & 0xf) {
SCpnt123drivers/scsi/scsi_ioctl.cSCpnt->result = 0; /* This is no longer considered an error */
SCpnt132drivers/scsi/scsi_ioctl.cSCpnt->result);
SCpnt134drivers/scsi/scsi_ioctl.csense_class(SCpnt->sense_buffer[0]),
SCpnt135drivers/scsi/scsi_ioctl.csense_error(SCpnt->sense_buffer[0]),
SCpnt136drivers/scsi/scsi_ioctl.cSCpnt->sense_buffer[2] & 0xf);
SCpnt140drivers/scsi/scsi_ioctl.cresult = SCpnt->result;
SCpnt141drivers/scsi/scsi_ioctl.cSCpnt->request.dev = -1;
SCpnt142drivers/scsi/scsi_ioctl.cwake_up(&SCpnt->device->device_wait);
SCpnt151drivers/scsi/scsi_ioctl.cScsi_Cmnd * SCpnt;
SCpnt183drivers/scsi/scsi_ioctl.cSCpnt = allocate_device(NULL, dev, 1);
SCpnt185drivers/scsi/scsi_ioctl.cscsi_do_cmd(SCpnt,  cmd,  buf, needed,  scsi_ioctl_done,  MAX_TIMEOUT, 
SCpnt188drivers/scsi/scsi_ioctl.cif (SCpnt->request.dev != 0xfffe){
SCpnt190drivers/scsi/scsi_ioctl.cSCpnt->request.sem = &sem;
SCpnt193drivers/scsi/scsi_ioctl.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt198drivers/scsi/scsi_ioctl.cif(SCpnt->result) {
SCpnt199drivers/scsi/scsi_ioctl.cresult = verify_area(VERIFY_WRITE, cmd_in, sizeof(SCpnt->sense_buffer));
SCpnt202drivers/scsi/scsi_ioctl.cmemcpy_tofs((void *) cmd_in,  SCpnt->sense_buffer, sizeof(SCpnt->sense_buffer));
SCpnt210drivers/scsi/scsi_ioctl.cresult = SCpnt->result;
SCpnt211drivers/scsi/scsi_ioctl.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt214drivers/scsi/scsi_ioctl.cif(SCpnt->device->scsi_request_fn)
SCpnt215drivers/scsi/scsi_ioctl.c(*SCpnt->device->scsi_request_fn)();
SCpnt217drivers/scsi/scsi_ioctl.cwake_up(&SCpnt->device->device_wait);
SCpnt68drivers/scsi/sd.cstatic void requeue_sd_request (Scsi_Cmnd * SCpnt);
SCpnt181drivers/scsi/sd.cstatic void rw_intr (Scsi_Cmnd *SCpnt)
SCpnt183drivers/scsi/sd.cint result = SCpnt->result;
SCpnt184drivers/scsi/sd.cint this_count = SCpnt->bufflen >> 9;
SCpnt187drivers/scsi/sd.cprintk("sd%c : rw_intr(%d, %d)\n", 'a' + MINOR(SCpnt->request.dev), SCpnt->host->host_no, result);
SCpnt199drivers/scsi/sd.cprintk("sd%c : %d sectors remain.\n", 'a' + MINOR(SCpnt->request.dev), SCpnt->request.nr_sectors);
SCpnt200drivers/scsi/sd.cprintk("use_sg is %d\n ",SCpnt->use_sg);
SCpnt202drivers/scsi/sd.cif (SCpnt->use_sg) {
SCpnt205drivers/scsi/sd.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt206drivers/scsi/sd.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt211drivers/scsi/sd.cif (SCpnt->request.cmd == READ)
SCpnt216drivers/scsi/sd.cscsi_free(SCpnt->buffer, SCpnt->sglist_len);  /* Free list of scatter-gather pointers */
SCpnt218drivers/scsi/sd.cif (SCpnt->buffer != SCpnt->request.buffer) {
SCpnt220drivers/scsi/sd.cprintk("nosg: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer,
SCpnt221drivers/scsi/sd.cSCpnt->bufflen);
SCpnt223drivers/scsi/sd.cif (SCpnt->request.cmd == READ)
SCpnt224drivers/scsi/sd.cmemcpy(SCpnt->request.buffer, SCpnt->buffer,
SCpnt225drivers/scsi/sd.cSCpnt->bufflen);
SCpnt226drivers/scsi/sd.cscsi_free(SCpnt->buffer, SCpnt->bufflen);
SCpnt234drivers/scsi/sd.cif (SCpnt->request.nr_sectors > this_count)
SCpnt236drivers/scsi/sd.cSCpnt->request.errors = 0;
SCpnt238drivers/scsi/sd.cif (!SCpnt->request.bh)
SCpnt242drivers/scsi/sd.c'a' + MINOR(SCpnt->request.dev));
SCpnt249drivers/scsi/sd.cSCpnt->request.sector, this_count);
SCpnt252drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 1, this_count);
SCpnt253drivers/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt258drivers/scsi/sd.cif (SCpnt->use_sg) {
SCpnt261drivers/scsi/sd.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt262drivers/scsi/sd.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt264drivers/scsi/sd.cprintk("err: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer,
SCpnt265drivers/scsi/sd.cSCpnt->bufflen);
SCpnt271drivers/scsi/sd.cscsi_free(SCpnt->buffer, SCpnt->sglist_len);  /* Free list of scatter-gather pointers */
SCpnt274drivers/scsi/sd.cprintk("nosgerr: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer,
SCpnt275drivers/scsi/sd.cSCpnt->bufflen);
SCpnt277drivers/scsi/sd.cif (SCpnt->buffer != SCpnt->request.buffer)
SCpnt278drivers/scsi/sd.cscsi_free(SCpnt->buffer, SCpnt->bufflen);
SCpnt294drivers/scsi/sd.cif rscsi_disks[DEVICE_NR(SCpnt->request.dev)].remap
SCpnt303drivers/scsi/sd.cif ((SCpnt->sense_buffer[0] & 0x7f) == 0x70) {
SCpnt304drivers/scsi/sd.cif ((SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) {
SCpnt305drivers/scsi/sd.cif(rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->removable) {
SCpnt309drivers/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->changed = 1;
SCpnt310drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 0, this_count);
SCpnt311drivers/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt325drivers/scsi/sd.cif (SCpnt->sense_buffer[2] == ILLEGAL_REQUEST) {
SCpnt326drivers/scsi/sd.cif (rscsi_disks[DEVICE_NR(SCpnt->request.dev)].ten) {
SCpnt327drivers/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.dev)].ten = 0;
SCpnt328drivers/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt336drivers/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->host->host_no,
SCpnt337drivers/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->id,
SCpnt338drivers/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->lun, result);
SCpnt341drivers/scsi/sd.cprint_sense("sd", SCpnt);
SCpnt342drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.current_nr_sectors);
SCpnt343drivers/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt356drivers/scsi/sd.cScsi_Cmnd * SCpnt = NULL;
SCpnt384drivers/scsi/sd.cSCpnt = allocate_device(&CURRENT,
SCpnt386drivers/scsi/sd.celse SCpnt = NULL;
SCpnt404drivers/scsi/sd.cif (!SCpnt && sd_template.nr_dev > 1){
SCpnt411drivers/scsi/sd.cSCpnt = request_queueable(req,
SCpnt413drivers/scsi/sd.cif(SCpnt) break;
SCpnt417drivers/scsi/sd.cif (SCpnt && req->dev == -1) {
SCpnt426drivers/scsi/sd.cif (!SCpnt) return; /* Could not find anything to do */
SCpnt429drivers/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt433drivers/scsi/sd.cstatic void requeue_sd_request (Scsi_Cmnd * SCpnt)
SCpnt444drivers/scsi/sd.cif(!SCpnt || SCpnt->request.dev <= 0) {
SCpnt449drivers/scsi/sd.cdev =  MINOR(SCpnt->request.dev);
SCpnt450drivers/scsi/sd.cblock = SCpnt->request.sector;
SCpnt459drivers/scsi/sd.cblock + SCpnt->request.nr_sectors > sd[dev].nr_sects)
SCpnt461drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt474drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt479drivers/scsi/sd.cprintk("sd%c : real dev = /dev/sd%c, block = %d\n", 'a' + MINOR(SCpnt->request.dev), dev, block);
SCpnt494drivers/scsi/sd.cif((block & 1) || (SCpnt->request.nr_sectors & 1)) {
SCpnt496drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt500drivers/scsi/sd.cswitch (SCpnt->request.cmd)
SCpnt505drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt514drivers/scsi/sd.cpanic ("Unknown sd command %d\n", SCpnt->request.cmd);
SCpnt517drivers/scsi/sd.cSCpnt->this_count = 0;
SCpnt521drivers/scsi/sd.ccontiguous = (!CLUSTERABLE_DEVICE(SCpnt) ? 0 :1);
SCpnt523drivers/scsi/sd.cbounce_size = (SCpnt->request.nr_sectors << 9);
SCpnt530drivers/scsi/sd.cif (contiguous && SCpnt->request.bh &&
SCpnt531drivers/scsi/sd.c((long) SCpnt->request.bh->b_data) + (SCpnt->request.nr_sectors << 9) - 1 > 
SCpnt532drivers/scsi/sd.cISA_DMA_THRESHOLD && SCpnt->host->unchecked_isa_dma) {
SCpnt533drivers/scsi/sd.cif(((long) SCpnt->request.bh->b_data) > ISA_DMA_THRESHOLD)
SCpnt538drivers/scsi/sd.cif(contiguous && SCpnt->request.bh && SCpnt->request.bh->b_reqnext)
SCpnt539drivers/scsi/sd.cfor(bh = SCpnt->request.bh, bhp = bh->b_reqnext; bhp; bh = bhp, 
SCpnt547drivers/scsi/sd.cif (!SCpnt->request.bh || contiguous) {
SCpnt550drivers/scsi/sd.cthis_count = SCpnt->request.nr_sectors;
SCpnt551drivers/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt552drivers/scsi/sd.cSCpnt->use_sg = 0;
SCpnt554drivers/scsi/sd.c} else if (SCpnt->host->sg_tablesize == 0 ||
SCpnt565drivers/scsi/sd.cif (SCpnt->host->sg_tablesize != 0 &&
SCpnt570drivers/scsi/sd.cthis_count = SCpnt->request.current_nr_sectors;
SCpnt571drivers/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt572drivers/scsi/sd.cSCpnt->use_sg = 0;
SCpnt581drivers/scsi/sd.cbh = SCpnt->request.bh;
SCpnt589drivers/scsi/sd.c!CLUSTERABLE_DEVICE(SCpnt) ||
SCpnt590drivers/scsi/sd.c(SCpnt->host->unchecked_isa_dma &&
SCpnt592drivers/scsi/sd.cif (count < SCpnt->host->sg_tablesize) count++;
SCpnt600drivers/scsi/sd.cif(SCpnt->host->unchecked_isa_dma &&
SCpnt601drivers/scsi/sd.c((unsigned int) SCpnt->request.bh->b_data-1) == ISA_DMA_THRESHOLD) count--;
SCpnt603drivers/scsi/sd.cSCpnt->use_sg = count;  /* Number of chains */
SCpnt605drivers/scsi/sd.cwhile( count < (SCpnt->use_sg * sizeof(struct scatterlist))) 
SCpnt607drivers/scsi/sd.cSCpnt->sglist_len = count;
SCpnt609drivers/scsi/sd.cif(SCpnt->host->sg_tablesize < max_sg) max_sg = SCpnt->host->sg_tablesize;
SCpnt614drivers/scsi/sd.cSCpnt->use_sg = 0;  /* No memory left - bail out */
SCpnt615drivers/scsi/sd.cthis_count = SCpnt->request.current_nr_sectors;
SCpnt616drivers/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt620drivers/scsi/sd.cfor(count = 0, bh = SCpnt->request.bh, bhp = bh->b_reqnext;
SCpnt621drivers/scsi/sd.ccount < SCpnt->use_sg && bh; 
SCpnt631drivers/scsi/sd.cISA_DMA_THRESHOLD && (SCpnt->host->unchecked_isa_dma) &&
SCpnt654drivers/scsi/sd.cthis_count = SCpnt->request.current_nr_sectors;
SCpnt655drivers/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt656drivers/scsi/sd.cSCpnt->use_sg = 0;
SCpnt657drivers/scsi/sd.cscsi_free(sgpnt, SCpnt->sglist_len);
SCpnt659drivers/scsi/sd.cSCpnt->use_sg = count;
SCpnt670drivers/scsi/sd.cif(bhp && CONTIGUOUS_BUFFERS(bh,bhp) && CLUSTERABLE_DEVICE(SCpnt)) {
SCpnt675drivers/scsi/sd.c(SCpnt->host->unchecked_isa_dma) &&
SCpnt683drivers/scsi/sd.cmax_sg = SCpnt->use_sg;
SCpnt695drivers/scsi/sd.cif (SCpnt->use_sg < max_sg) SCpnt->use_sg++;
SCpnt701drivers/scsi/sd.cif(count < SCpnt->use_sg || SCpnt->use_sg > SCpnt->host->sg_tablesize){
SCpnt702drivers/scsi/sd.cbh = SCpnt->request.bh;
SCpnt703drivers/scsi/sd.cprintk("Use sg, count %d %x %d\n", SCpnt->use_sg, count, dma_free_sectors);
SCpnt709drivers/scsi/sd.cif(SCpnt->use_sg < 16)
SCpnt710drivers/scsi/sd.cfor(count=0; count<SCpnt->use_sg; count++)
SCpnt718drivers/scsi/sd.cif (SCpnt->request.cmd == WRITE)
SCpnt719drivers/scsi/sd.cfor(count=0; count<SCpnt->use_sg; count++)
SCpnt728drivers/scsi/sd.cif(SCpnt->use_sg == 0){
SCpnt730drivers/scsi/sd.c(SCpnt->host->unchecked_isa_dma)) {
SCpnt736drivers/scsi/sd.cthis_count = SCpnt->request.current_nr_sectors;
SCpnt740drivers/scsi/sd.cif (SCpnt->request.cmd == WRITE)
SCpnt741drivers/scsi/sd.cmemcpy(buff, (char *)SCpnt->request.buffer, this_count << 9);
SCpnt745drivers/scsi/sd.cprintk("sd%c : %s %d/%d 512 byte blocks.\n", 'a' + MINOR(SCpnt->request.dev),
SCpnt746drivers/scsi/sd.c(SCpnt->request.cmd == WRITE) ? "writing" : "reading",
SCpnt747drivers/scsi/sd.cthis_count, SCpnt->request.nr_sectors);
SCpnt750drivers/scsi/sd.ccmd[1] = (SCpnt->lun << 5) & 0xe0;
SCpnt796drivers/scsi/sd.cSCpnt->transfersize = rscsi_disks[dev].sector_size;
SCpnt797drivers/scsi/sd.cSCpnt->underflow = this_count << 9; 
SCpnt798drivers/scsi/sd.cscsi_do_cmd (SCpnt, (void *) cmd, buff, 
SCpnt801drivers/scsi/sd.c(SCpnt->device->type == TYPE_DISK ? 
SCpnt840drivers/scsi/sd.cstatic void sd_init_done (Scsi_Cmnd * SCpnt)
SCpnt844drivers/scsi/sd.creq = &SCpnt->request;
SCpnt858drivers/scsi/sd.cScsi_Cmnd * SCpnt;
SCpnt864drivers/scsi/sd.cSCpnt = allocate_device(NULL, rscsi_disks[i].device, 1);
SCpnt875drivers/scsi/sd.cSCpnt->request.dev = 0xffff;  /* Mark as really busy again */
SCpnt876drivers/scsi/sd.cSCpnt->cmd_len = 0;
SCpnt877drivers/scsi/sd.cSCpnt->sense_buffer[0] = 0;
SCpnt878drivers/scsi/sd.cSCpnt->sense_buffer[2] = 0;
SCpnt880drivers/scsi/sd.cscsi_do_cmd (SCpnt,
SCpnt885drivers/scsi/sd.cwhile(SCpnt->request.dev != 0xfffe);
SCpnt887drivers/scsi/sd.cthe_result = SCpnt->result;
SCpnt892drivers/scsi/sd.cSCpnt->sense_buffer[2] == NOT_READY) {
SCpnt901drivers/scsi/sd.cSCpnt->request.dev = 0xffff;  /* Mark as really busy again */
SCpnt902drivers/scsi/sd.cSCpnt->cmd_len = 0;
SCpnt903drivers/scsi/sd.cSCpnt->sense_buffer[0] = 0;
SCpnt904drivers/scsi/sd.cSCpnt->sense_buffer[2] = 0;
SCpnt906drivers/scsi/sd.cscsi_do_cmd (SCpnt,
SCpnt911drivers/scsi/sd.cwhile(SCpnt->request.dev != 0xfffe);
SCpnt936drivers/scsi/sd.cSCpnt->request.dev = 0xffff;  /* Mark as really busy again */
SCpnt937drivers/scsi/sd.cSCpnt->cmd_len = 0;
SCpnt938drivers/scsi/sd.cSCpnt->sense_buffer[0] = 0;
SCpnt939drivers/scsi/sd.cSCpnt->sense_buffer[2] = 0;
SCpnt941drivers/scsi/sd.cscsi_do_cmd (SCpnt,
SCpnt947drivers/scsi/sd.cwhile(SCpnt->request.dev != 0xfffe);
SCpnt949drivers/scsi/sd.cif (SCpnt->request.dev != 0xfffe){
SCpnt951drivers/scsi/sd.cSCpnt->request.sem = &sem;
SCpnt954drivers/scsi/sd.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt957drivers/scsi/sd.cthe_result = SCpnt->result;
SCpnt962drivers/scsi/sd.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt964drivers/scsi/sd.cwake_up(&SCpnt->device->device_wait); 
SCpnt992drivers/scsi/sd.cprintk("sd%c : extended sense code = %1x \n", 'a' + i, SCpnt->sense_buffer[2] & 0xf);
SCpnt1003drivers/scsi/sd.cSCpnt->sense_buffer[2] == NOT_READY)
SCpnt513drivers/scsi/seagate.cint seagate_st0x_queue_command (Scsi_Cmnd * SCpnt,  void (*done)(Scsi_Cmnd *))
SCpnt519drivers/scsi/seagate.ccurrent_target = SCpnt->target;
SCpnt520drivers/scsi/seagate.ccurrent_lun = SCpnt->lun;
SCpnt521drivers/scsi/seagate.c(const void *) current_cmnd = SCpnt->cmnd;
SCpnt522drivers/scsi/seagate.ccurrent_data = (unsigned char *) SCpnt->request_buffer;
SCpnt523drivers/scsi/seagate.ccurrent_bufflen = SCpnt->request_bufflen;
SCpnt524drivers/scsi/seagate.cSCint = SCpnt;
SCpnt535drivers/scsi/seagate.ccurrent_cmnd[SCpnt->cmd_len] |= 0x01;
SCpnt574drivers/scsi/seagate.cint seagate_st0x_command (Scsi_Cmnd * SCpnt) {
SCpnt575drivers/scsi/seagate.creturn internal_command (SCpnt->target, SCpnt->lun, SCpnt->cmnd, SCpnt->request_buffer,
SCpnt576drivers/scsi/seagate.cSCpnt->request_bufflen, 
SCpnt1550drivers/scsi/seagate.cint seagate_st0x_abort (Scsi_Cmnd * SCpnt)
SCpnt1561drivers/scsi/seagate.cint seagate_st0x_reset (Scsi_Cmnd * SCpnt)
SCpnt206drivers/scsi/sg.cstatic void sg_command_done(Scsi_Cmnd * SCpnt)
SCpnt208drivers/scsi/sg.cint dev=SCpnt->request.dev;
SCpnt213drivers/scsi/sg.cSCpnt->request.dev=-1;
SCpnt216drivers/scsi/sg.cmemcpy(device->header.sense_buffer, SCpnt->sense_buffer, sizeof(SCpnt->sense_buffer));
SCpnt217drivers/scsi/sg.cif (SCpnt->sense_buffer[0])
SCpnt222drivers/scsi/sg.cdevice->header.result=SCpnt->result;
SCpnt224drivers/scsi/sg.cSCpnt->request.dev=-1;
SCpnt231drivers/scsi/sg.cScsi_Cmnd *SCpnt;
SCpnt278drivers/scsi/sg.cif (!(SCpnt=allocate_device(NULL,device->device, !(filp->f_flags & O_NONBLOCK))))
SCpnt290drivers/scsi/sg.cSCpnt->request.dev=dev;
SCpnt291drivers/scsi/sg.cSCpnt->sense_buffer[0]=0;
SCpnt295drivers/scsi/sg.cSCpnt->cmd_len = size;
SCpnt315drivers/scsi/sg.cscsi_do_cmd (SCpnt,(void *) cmnd,
SCpnt61drivers/scsi/sr.cvoid requeue_sr_request (Scsi_Cmnd * SCpnt);
SCpnt140drivers/scsi/sr.cstatic void rw_intr (Scsi_Cmnd * SCpnt)
SCpnt142drivers/scsi/sr.cint result = SCpnt->result;
SCpnt143drivers/scsi/sr.cint this_count = SCpnt->this_count;
SCpnt146drivers/scsi/sr.cprintk("sr.c done: %x %x\n",result, SCpnt->request.bh->b_data);
SCpnt150drivers/scsi/sr.cif (SCpnt->use_sg == 0) {
SCpnt151drivers/scsi/sr.cif (SCpnt->buffer != SCpnt->request.buffer)
SCpnt154drivers/scsi/sr.coffset = (SCpnt->request.sector % 4) << 9;
SCpnt155drivers/scsi/sr.cmemcpy((char *)SCpnt->request.buffer, 
SCpnt156drivers/scsi/sr.c(char *)SCpnt->buffer + offset, 
SCpnt163drivers/scsi/sr.cSCpnt->request.nr_sectors > this_count && 
SCpnt164drivers/scsi/sr.cSCpnt->request.bh &&
SCpnt165drivers/scsi/sr.cSCpnt->request.bh->b_reqnext &&
SCpnt166drivers/scsi/sr.cSCpnt->request.bh->b_reqnext->b_size == 1024) {
SCpnt167drivers/scsi/sr.cmemcpy((char *)SCpnt->request.bh->b_reqnext->b_data, 
SCpnt168drivers/scsi/sr.c(char *)SCpnt->buffer + 1024, 
SCpnt173drivers/scsi/sr.cscsi_free(SCpnt->buffer, 2048);
SCpnt178drivers/scsi/sr.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt179drivers/scsi/sr.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt187drivers/scsi/sr.cscsi_free(SCpnt->buffer, SCpnt->sglist_len);  /* Free list of scatter-gather pointers */
SCpnt188drivers/scsi/sr.cif(SCpnt->request.sector % 4) this_count -= 2;
SCpnt190drivers/scsi/sr.cif(this_count > SCpnt->request.nr_sectors)
SCpnt195drivers/scsi/sr.cprintk("(%x %x %x) ",SCpnt->request.bh, SCpnt->request.nr_sectors, 
SCpnt198drivers/scsi/sr.cif (SCpnt->request.nr_sectors > this_count)
SCpnt200drivers/scsi/sr.cSCpnt->request.errors = 0;
SCpnt201drivers/scsi/sr.cif (!SCpnt->request.bh)
SCpnt203drivers/scsi/sr.cSCpnt->request.sector, this_count);
SCpnt206drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 1, this_count);  /* All done */
SCpnt207drivers/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt214drivers/scsi/sr.cif (SCpnt->use_sg) {
SCpnt217drivers/scsi/sr.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt218drivers/scsi/sr.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt223drivers/scsi/sr.cscsi_free(SCpnt->buffer, SCpnt->sglist_len);  /* Free list of scatter-gather pointers */
SCpnt225drivers/scsi/sr.cif (SCpnt->buffer != SCpnt->request.buffer)
SCpnt226drivers/scsi/sr.cscsi_free(SCpnt->buffer, SCpnt->bufflen);
SCpnt230drivers/scsi/sr.cif ((SCpnt->sense_buffer[0] & 0x7f) == 0x70) {
SCpnt231drivers/scsi/sr.cif ((SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) {
SCpnt235drivers/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->changed = 1;
SCpnt236drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, this_count);
SCpnt237drivers/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt242drivers/scsi/sr.cif (SCpnt->sense_buffer[2] == ILLEGAL_REQUEST) {
SCpnt244drivers/scsi/sr.cprint_sense("sr", SCpnt);
SCpnt246drivers/scsi/sr.cprint_command(SCpnt->cmnd);
SCpnt247drivers/scsi/sr.cif (scsi_CDs[DEVICE_NR(SCpnt->request.dev)].ten) {
SCpnt248drivers/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.dev)].ten = 0;
SCpnt249drivers/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt253drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, this_count);
SCpnt254drivers/scsi/sr.crequeue_sr_request(SCpnt); /* Do next request */
SCpnt260drivers/scsi/sr.cif (SCpnt->sense_buffer[2] == NOT_READY) {
SCpnt262drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, this_count);
SCpnt263drivers/scsi/sr.crequeue_sr_request(SCpnt); /* Do next request */
SCpnt271drivers/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->host->host_no, 
SCpnt272drivers/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->id,
SCpnt273drivers/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->lun,
SCpnt277drivers/scsi/sr.cprint_sense("sr", SCpnt);
SCpnt279drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.current_nr_sectors);
SCpnt280drivers/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt508drivers/scsi/sr.cScsi_Cmnd * SCpnt = NULL;
SCpnt524drivers/scsi/sr.cSCpnt = allocate_device(&CURRENT,
SCpnt526drivers/scsi/sr.celse SCpnt = NULL;
SCpnt536drivers/scsi/sr.cif (!SCpnt && sr_template.nr_dev > 1){
SCpnt543drivers/scsi/sr.cSCpnt = request_queueable(req,
SCpnt545drivers/scsi/sr.cif(SCpnt) break;
SCpnt549drivers/scsi/sr.cif (SCpnt && req->dev == -1) {
SCpnt558drivers/scsi/sr.cif (!SCpnt)
SCpnt564drivers/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt568drivers/scsi/sr.cvoid requeue_sr_request (Scsi_Cmnd * SCpnt)
SCpnt577drivers/scsi/sr.cif(!SCpnt || SCpnt->request.dev <= 0) {
SCpnt582drivers/scsi/sr.cdev =  MINOR(SCpnt->request.dev);
SCpnt583drivers/scsi/sr.cblock = SCpnt->request.sector;  
SCpnt590drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt598drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt609drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt614drivers/scsi/sr.cswitch (SCpnt->request.cmd)
SCpnt617drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt624drivers/scsi/sr.cpanic ("Unknown sr command %d\n", SCpnt->request.cmd);
SCpnt627drivers/scsi/sr.ccmd[1] = (SCpnt->lun << 5) & 0xe0;
SCpnt645drivers/scsi/sr.cSCpnt->use_sg = 0;
SCpnt647drivers/scsi/sr.cif (SCpnt->host->sg_tablesize > 0 &&
SCpnt653drivers/scsi/sr.cbh = SCpnt->request.bh;
SCpnt659drivers/scsi/sr.cthis_count = SCpnt->request.sector % 4;
SCpnt661drivers/scsi/sr.cwhile(bh && count < SCpnt->host->sg_tablesize) {
SCpnt670drivers/scsi/sr.cif (count < SCpnt->host->sg_tablesize) {
SCpnt679drivers/scsi/sr.cSCpnt->use_sg = count;  /* Number of chains */
SCpnt681drivers/scsi/sr.cwhile( count < (SCpnt->use_sg * sizeof(struct scatterlist))) 
SCpnt683drivers/scsi/sr.cSCpnt->sglist_len = count;
SCpnt687drivers/scsi/sr.cSCpnt->use_sg = 0;  /* No memory left - bail out */
SCpnt691drivers/scsi/sr.cbh = SCpnt->request.bh;
SCpnt692drivers/scsi/sr.cif(SCpnt->request.sector % 4) {
SCpnt693drivers/scsi/sr.csgpnt[count].length = (SCpnt->request.sector % 4) << 9;
SCpnt700drivers/scsi/sr.cfor(bh = SCpnt->request.bh; count < SCpnt->use_sg; 
SCpnt711drivers/scsi/sr.cif (count+1 != SCpnt->use_sg) panic("Bad sr request list");
SCpnt715drivers/scsi/sr.cISA_DMA_THRESHOLD & (SCpnt->host->unchecked_isa_dma)) {
SCpnt736drivers/scsi/sr.cSCpnt->use_sg = 0;
SCpnt737drivers/scsi/sr.cscsi_free(buffer, SCpnt->sglist_len);
SCpnt743drivers/scsi/sr.cprintk("SR: %d %d %d %d %d *** ",SCpnt->use_sg, SCpnt->request.sector,
SCpnt745drivers/scsi/sr.cSCpnt->request.current_nr_sectors,
SCpnt746drivers/scsi/sr.cSCpnt->request.nr_sectors);
SCpnt747drivers/scsi/sr.cfor(count=0; count<SCpnt->use_sg; count++)
SCpnt756drivers/scsi/sr.cif (SCpnt->use_sg == 0){
SCpnt758drivers/scsi/sr.cif (!SCpnt->request.bh)    
SCpnt759drivers/scsi/sr.cthis_count = SCpnt->request.nr_sectors;
SCpnt761drivers/scsi/sr.cthis_count = (SCpnt->request.bh->b_size >> 9);
SCpnt777drivers/scsi/sr.cbuffer = (unsigned char *) SCpnt->request.buffer;
SCpnt779drivers/scsi/sr.c(SCpnt->host->unchecked_isa_dma))
SCpnt829drivers/scsi/sr.cprintk("Use sg: %d\n", SCpnt->use_sg);
SCpnt846drivers/scsi/sr.cSCpnt->transfersize = (scsi_CDs[dev].sector_size > 1024) ?
SCpnt849drivers/scsi/sr.cSCpnt->this_count = this_count;
SCpnt850drivers/scsi/sr.cscsi_do_cmd (SCpnt, (void *) cmd, buffer, 
SCpnt892drivers/scsi/sr.cstatic void sr_init_done (Scsi_Cmnd * SCpnt)
SCpnt896drivers/scsi/sr.creq = &SCpnt->request;
SCpnt908drivers/scsi/sr.cScsi_Cmnd * SCpnt;
SCpnt911drivers/scsi/sr.cSCpnt = allocate_device(NULL, scsi_CDs[i].device, 1);
SCpnt918drivers/scsi/sr.cSCpnt->request.dev = 0xffff;  /* Mark as really busy */
SCpnt919drivers/scsi/sr.cSCpnt->cmd_len = 0;
SCpnt923drivers/scsi/sr.cscsi_do_cmd (SCpnt,
SCpnt929drivers/scsi/sr.cwhile(SCpnt->request.dev != 0xfffe);
SCpnt931drivers/scsi/sr.cif (SCpnt->request.dev != 0xfffe){
SCpnt933drivers/scsi/sr.cSCpnt->request.sem = &sem;
SCpnt936drivers/scsi/sr.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt939drivers/scsi/sr.cthe_result = SCpnt->result;
SCpnt944drivers/scsi/sr.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt946drivers/scsi/sr.cwake_up(&SCpnt->device->device_wait); 
SCpnt23drivers/scsi/sr_ioctl.cstatic void sr_ioctl_done(Scsi_Cmnd * SCpnt)
SCpnt27drivers/scsi/sr_ioctl.creq = &SCpnt->request;
SCpnt41drivers/scsi/sr_ioctl.cScsi_Cmnd * SCpnt;
SCpnt44drivers/scsi/sr_ioctl.cSCpnt = allocate_device(NULL, scsi_CDs[target].device, 1);
SCpnt45drivers/scsi/sr_ioctl.cscsi_do_cmd(SCpnt,
SCpnt50drivers/scsi/sr_ioctl.cif (SCpnt->request.dev != 0xfffe){
SCpnt52drivers/scsi/sr_ioctl.cSCpnt->request.sem = &sem;
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(&SCpnt->device->device_wait);
SCpnt110drivers/scsi/st.cst_chk_result(Scsi_Cmnd * SCpnt)
SCpnt112drivers/scsi/st.cint dev = SCpnt->request.dev;
SCpnt113drivers/scsi/st.cint result = SCpnt->result;
SCpnt114drivers/scsi/st.cunsigned char * sense = SCpnt->sense_buffer, scode;
SCpnt122drivers/scsi/st.cSCpnt->cmnd[0], SCpnt->cmnd[1], SCpnt->cmnd[2],
SCpnt123drivers/scsi/st.cSCpnt->cmnd[3], SCpnt->cmnd[4], SCpnt->cmnd[5],
SCpnt124drivers/scsi/st.cSCpnt->request_bufflen);
SCpnt126drivers/scsi/st.cprint_sense("st", SCpnt);
SCpnt139drivers/scsi/st.cprint_sense("st", SCpnt);
SCpnt147drivers/scsi/st.c&& SCpnt->cmnd[0] != WRITE_6
SCpnt148drivers/scsi/st.c&& SCpnt->cmnd[0] != WRITE_FILEMARKS
SCpnt153drivers/scsi/st.cif (SCpnt->cmnd[0] == READ_6)
SCpnt155drivers/scsi/st.celse if (SCpnt->cmnd[0] == WRITE_6)
SCpnt169drivers/scsi/st.cst_sleep_done (Scsi_Cmnd * SCpnt)
SCpnt174drivers/scsi/st.cif ((st_nbr = SCpnt->request.dev) < st_template.nr_dev && st_nbr >= 0) {
SCpnt177drivers/scsi/st.c(SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt178drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x40)) {
SCpnt180drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x80) != 0)
SCpnt181drivers/scsi/st.cremainder = (SCpnt->sense_buffer[3] << 24) |
SCpnt182drivers/scsi/st.c(SCpnt->sense_buffer[4] << 16) |
SCpnt183drivers/scsi/st.c(SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6];
SCpnt186drivers/scsi/st.cif ((SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW ||
SCpnt188drivers/scsi/st.c(STp->buffer)->last_result = SCpnt->result; /* Error */
SCpnt193drivers/scsi/st.c(STp->buffer)->last_result = SCpnt->result;
SCpnt194drivers/scsi/st.c(STp->buffer)->last_result_fatal = st_chk_result(SCpnt);
SCpnt196drivers/scsi/st.cSCpnt->request.dev = -1;
SCpnt198drivers/scsi/st.cSCpnt->request.dev = 0xffff;
SCpnt251drivers/scsi/st.cScsi_Cmnd *SCpnt;
SCpnt260drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt261drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt262drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt263drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt267drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt268drivers/scsi/st.cSCpnt->request.dev = -1;
SCpnt287drivers/scsi/st.cScsi_Cmnd *SCpnt;
SCpnt306drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt317drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt325drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt326drivers/scsi/st.cscsi_do_cmd (SCpnt,
SCpnt330drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt334drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt335drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x40) &&
SCpnt336drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) != VOLUME_OVERFLOW) {
SCpnt351drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt411drivers/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt447drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt448drivers/scsi/st.cif (!SCpnt) {
SCpnt453drivers/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt456drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt457drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt462drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt464drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt465drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == UNIT_ATTENTION) { /* New media? */
SCpnt467drivers/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt470drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt471drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt476drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt482drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt483drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == NO_TAPE) {
SCpnt491drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt504drivers/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt507drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt508drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt512drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt514drivers/scsi/st.cif (!SCpnt->result && !SCpnt->sense_buffer[0]) {
SCpnt533drivers/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt537drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt538drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt542drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt552drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt627drivers/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt645drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt647drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt651drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt652drivers/scsi/st.cscsi_do_cmd( SCpnt,
SCpnt656drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt659drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt663drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt711drivers/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt774drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt810drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt811drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt812drivers/scsi/st.cscsi_do_cmd (SCpnt,
SCpnt816drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt823drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt824drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x40)) {
SCpnt825drivers/scsi/st.cif (STp->block_size != 0 && (SCpnt->sense_buffer[0] & 0x80) != 0)
SCpnt826drivers/scsi/st.ctransfer = (SCpnt->sense_buffer[3] << 24) |
SCpnt827drivers/scsi/st.c(SCpnt->sense_buffer[4] << 16) |
SCpnt828drivers/scsi/st.c(SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6];
SCpnt830drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW)
SCpnt868drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt898drivers/scsi/st.cSCpnt->request.dev = -1;
SCpnt921drivers/scsi/st.cSCpnt->result = (STp->buffer)->last_result = -1;
SCpnt922drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt923drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt924drivers/scsi/st.cscsi_do_cmd (SCpnt,
SCpnt930drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt945drivers/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt986drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt1015drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt1016drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt1017drivers/scsi/st.cscsi_do_cmd (SCpnt,
SCpnt1022drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt1032drivers/scsi/st.cSCpnt->sense_buffer[0], SCpnt->sense_buffer[1],
SCpnt1033drivers/scsi/st.cSCpnt->sense_buffer[2], SCpnt->sense_buffer[3],
SCpnt1034drivers/scsi/st.cSCpnt->sense_buffer[4], SCpnt->sense_buffer[5],
SCpnt1035drivers/scsi/st.cSCpnt->sense_buffer[6], SCpnt->sense_buffer[7]);
SCpnt1037drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70) { /* extended sense */
SCpnt1039drivers/scsi/st.cif ((SCpnt->sense_buffer[2] & 0xe0) != 0) { /* EOF, EOM, or ILI */
SCpnt1041drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x80) != 0)
SCpnt1042drivers/scsi/st.ctransfer = (SCpnt->sense_buffer[3] << 24) |
SCpnt1043drivers/scsi/st.c(SCpnt->sense_buffer[4] << 16) |
SCpnt1044drivers/scsi/st.c(SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6];
SCpnt1048drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == MEDIUM_ERROR)
SCpnt1051drivers/scsi/st.cif (SCpnt->sense_buffer[2] & 0x20) {
SCpnt1059drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt1063drivers/scsi/st.celse if (SCpnt->sense_buffer[2] & 0x40) {
SCpnt1076drivers/scsi/st.celse if (SCpnt->sense_buffer[2] & 0x80) {
SCpnt1096drivers/scsi/st.cSCpnt->request.dev = -1;
SCpnt1101drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == BLANK_CHECK) {
SCpnt1116drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt1151drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt1170drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt1232drivers/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt1547drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt1548drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt1549drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt1550drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt1554drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt1558drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt1606drivers/scsi/st.cif (SCpnt->sense_buffer[2] & 0x40) {
SCpnt1614drivers/scsi/st.c(SCpnt->sense_buffer[3] << 24) +
SCpnt1615drivers/scsi/st.c(SCpnt->sense_buffer[4] << 16) +
SCpnt1616drivers/scsi/st.c(SCpnt->sense_buffer[5] << 8) +
SCpnt1617drivers/scsi/st.cSCpnt->sense_buffer[6] );
SCpnt1630drivers/scsi/st.cif (SCpnt->sense_buffer[2] & 0x80) { /* Hit filemark */
SCpnt1642drivers/scsi/st.cif (SCpnt->sense_buffer[2] & 0x80) { /* Hit filemark */
SCpnt1658drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == BLANK_CHECK)
SCpnt1677drivers/scsi/st.cScsi_Cmnd *SCpnt;
SCpnt1788drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt1790drivers/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt1800drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt1801drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt1802drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt1806drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt1830drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt53drivers/scsi/st.hScsi_Cmnd SCpnt;
SCpnt231drivers/scsi/u14-34f.cScsi_Cmnd *SCpnt;
SCpnt509drivers/scsi/u14-34f.cstatic inline void build_sg_list(struct mscp *cpp, Scsi_Cmnd *SCpnt) {
SCpnt513drivers/scsi/u14-34f.csgpnt = (struct scatterlist *) SCpnt->request_buffer;
SCpnt515drivers/scsi/u14-34f.cfor (k = 0; k < SCpnt->use_sg; k++) {
SCpnt521drivers/scsi/u14-34f.ccpp->use_sg = SCpnt->use_sg;
SCpnt526drivers/scsi/u14-34f.cint u14_34f_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) {
SCpnt533drivers/scsi/u14-34f.cj = ((struct hostdata *) SCpnt->host->hostdata)->board_number;
SCpnt535drivers/scsi/u14-34f.cif (!done) panic("%s: qcomm, pid %ld, null done.\n", BN(j), SCpnt->pid);
SCpnt556drivers/scsi/u14-34f.celse if (u14_34f_reset(SCpnt) == SCSI_RESET_SUCCESS) 
SCpnt559drivers/scsi/u14-34f.cSCpnt->result = DID_BUS_BUSY << 16; 
SCpnt560drivers/scsi/u14-34f.cSCpnt->host_scribble = NULL;
SCpnt561drivers/scsi/u14-34f.cprintk("%s: qcomm, pid %ld, DID_BUS_BUSY, done.\n", BN(j), SCpnt->pid);
SCpnt563drivers/scsi/u14-34f.cdone(SCpnt);    
SCpnt571drivers/scsi/u14-34f.cSCpnt->scsi_done = done;
SCpnt573drivers/scsi/u14-34f.cSCpnt->host_scribble = (unsigned char *) &cpp->index;
SCpnt576drivers/scsi/u14-34f.cBN(j), i, SCpnt->target, SCpnt->pid);
SCpnt580drivers/scsi/u14-34f.ccpp->target = SCpnt->target;
SCpnt581drivers/scsi/u14-34f.ccpp->lun = SCpnt->lun;
SCpnt582drivers/scsi/u14-34f.ccpp->SCpnt = SCpnt;
SCpnt583drivers/scsi/u14-34f.ccpp->sense_addr = (unsigned int) SCpnt->sense_buffer;
SCpnt584drivers/scsi/u14-34f.ccpp->sense_len = sizeof SCpnt->sense_buffer;
SCpnt586drivers/scsi/u14-34f.cif (SCpnt->use_sg) {
SCpnt588drivers/scsi/u14-34f.cbuild_sg_list(cpp, SCpnt);
SCpnt591drivers/scsi/u14-34f.ccpp->data_address = (unsigned int)SCpnt->request_buffer;
SCpnt592drivers/scsi/u14-34f.ccpp->data_len = SCpnt->request_bufflen;
SCpnt595drivers/scsi/u14-34f.ccpp->scsi_cdbs_len = SCpnt->cmd_len;
SCpnt596drivers/scsi/u14-34f.cmemcpy(cpp->scsi_cdbs, SCpnt->cmnd, cpp->scsi_cdbs_len);
SCpnt599drivers/scsi/u14-34f.cSCpnt->result = DID_ERROR << 16;
SCpnt600drivers/scsi/u14-34f.cSCpnt->host_scribble = NULL;
SCpnt602drivers/scsi/u14-34f.cBN(j), SCpnt->target, SCpnt->pid);
SCpnt604drivers/scsi/u14-34f.cdone(SCpnt);
SCpnt654drivers/scsi/u14-34f.cif (SCarg != HD(j)->cp[i].SCpnt)
SCpnt656drivers/scsi/u14-34f.cBN(j), i, SCarg, HD(j)->cp[i].SCpnt);
SCpnt680drivers/scsi/u14-34f.cScsi_Cmnd *SCpnt;
SCpnt717drivers/scsi/u14-34f.cSCpnt = HD(j)->cp[i].SCpnt;
SCpnt720drivers/scsi/u14-34f.cBN(j), i, SCpnt->pid);
SCpnt722drivers/scsi/u14-34f.cif (SCpnt == NULL)
SCpnt725drivers/scsi/u14-34f.cif (SCpnt->host_scribble == NULL)
SCpnt728drivers/scsi/u14-34f.cif (*(unsigned int *)SCpnt->host_scribble != i) 
SCpnt731drivers/scsi/u14-34f.cif (SCpnt->scsi_done == NULL) 
SCpnt734drivers/scsi/u14-34f.cif (SCpnt == SCarg) arg_done = TRUE;
SCpnt762drivers/scsi/u14-34f.cSCpnt = HD(j)->cp[i].SCpnt;
SCpnt763drivers/scsi/u14-34f.cSCpnt->result = DID_RESET << 16;
SCpnt764drivers/scsi/u14-34f.cSCpnt->host_scribble = NULL;
SCpnt770drivers/scsi/u14-34f.cBN(j), i, SCpnt->pid);
SCpnt772drivers/scsi/u14-34f.cSCpnt->scsi_done(SCpnt);
SCpnt801drivers/scsi/u14-34f.cScsi_Cmnd *SCpnt;
SCpnt863drivers/scsi/u14-34f.cSCpnt = spp->SCpnt;
SCpnt865drivers/scsi/u14-34f.cif (SCpnt == NULL) 
SCpnt868drivers/scsi/u14-34f.cif (SCpnt->host_scribble == NULL) 
SCpnt870drivers/scsi/u14-34f.cBN(j), i, SCpnt->pid, SCpnt);
SCpnt872drivers/scsi/u14-34f.cif (*(unsigned int *)SCpnt->host_scribble != i) 
SCpnt874drivers/scsi/u14-34f.c" irq %d.\n", BN(j), i, SCpnt->pid, 
SCpnt875drivers/scsi/u14-34f.c*(unsigned int *)SCpnt->host_scribble, irq);
SCpnt883drivers/scsi/u14-34f.cif (tstatus == BUSY && SCpnt->device->type != TYPE_TAPE) 
SCpnt888drivers/scsi/u14-34f.c&& SCpnt->device->type == TYPE_DISK
SCpnt889drivers/scsi/u14-34f.c&& HD(j)->target_reset[SCpnt->target])
SCpnt894drivers/scsi/u14-34f.c&& SCpnt->device->type == TYPE_DISK
SCpnt895drivers/scsi/u14-34f.c&& (SCpnt->sense_buffer[2] & 0xf) == RECOVERED_ERROR)
SCpnt899drivers/scsi/u14-34f.c&& SCpnt->device->type == TYPE_DISK
SCpnt900drivers/scsi/u14-34f.c&& (SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION)
SCpnt907drivers/scsi/u14-34f.cHD(j)->target_reset[SCpnt->target] = FALSE;
SCpnt909drivers/scsi/u14-34f.cif (spp->target_status && SCpnt->device->type == TYPE_DISK)
SCpnt912drivers/scsi/u14-34f.cSCpnt->target, SCpnt->lun, SCpnt->pid,
SCpnt913drivers/scsi/u14-34f.cspp->target_status, SCpnt->sense_buffer[2]);
SCpnt915drivers/scsi/u14-34f.cHD(j)->target_time_out[SCpnt->target] = 0;
SCpnt920drivers/scsi/u14-34f.cif (HD(j)->target_time_out[SCpnt->target] > 1)
SCpnt924drivers/scsi/u14-34f.cHD(j)->target_time_out[SCpnt->target]++;
SCpnt934drivers/scsi/u14-34f.cif (SCpnt->device->type != TYPE_TAPE)
SCpnt955drivers/scsi/u14-34f.cSCpnt->result = status | spp->target_status;
SCpnt961drivers/scsi/u14-34f.cif (SCpnt->result || do_trace) 
SCpnt971drivers/scsi/u14-34f.cSCpnt->target, SCpnt->lun, SCpnt->pid, HD(j)->iocount);
SCpnt974drivers/scsi/u14-34f.cSCpnt->host_scribble = NULL;
SCpnt977drivers/scsi/u14-34f.cSCpnt->scsi_done(SCpnt);
SCpnt287drivers/scsi/ultrastor.cstatic inline void build_sg_list(struct mscp *, Scsi_Cmnd *SCpnt);
SCpnt645drivers/scsi/ultrastor.cstatic inline void build_sg_list(register struct mscp *mscp, Scsi_Cmnd *SCpnt)
SCpnt651drivers/scsi/ultrastor.csl = (struct scatterlist *) SCpnt->request_buffer;
SCpnt652drivers/scsi/ultrastor.cmax = SCpnt->use_sg;
SCpnt666drivers/scsi/ultrastor.cint ultrastor_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt704drivers/scsi/ultrastor.cmy_mscp->ca = SCpnt->device->type != TYPE_TAPE;
SCpnt705drivers/scsi/ultrastor.cmy_mscp->target_id = SCpnt->target;
SCpnt707drivers/scsi/ultrastor.cmy_mscp->lun = SCpnt->lun;
SCpnt708drivers/scsi/ultrastor.cif (SCpnt->use_sg) {
SCpnt711drivers/scsi/ultrastor.cbuild_sg_list(my_mscp, SCpnt);
SCpnt715drivers/scsi/ultrastor.cmy_mscp->transfer_data = (unsigned int)SCpnt->request_buffer;
SCpnt716drivers/scsi/ultrastor.cmy_mscp->transfer_data_length = SCpnt->request_bufflen;
SCpnt720drivers/scsi/ultrastor.cmy_mscp->length_of_sense_byte = sizeof SCpnt->sense_buffer;
SCpnt721drivers/scsi/ultrastor.cmy_mscp->length_of_scsi_cdbs = SCpnt->cmd_len;
SCpnt722drivers/scsi/ultrastor.cmemcpy(my_mscp->scsi_cdbs, SCpnt->cmnd, my_mscp->length_of_scsi_cdbs);
SCpnt725drivers/scsi/ultrastor.cmy_mscp->sense_data = (unsigned int)&SCpnt->sense_buffer;
SCpnt727drivers/scsi/ultrastor.cmy_mscp->SCint = SCpnt;
SCpnt728drivers/scsi/ultrastor.cSCpnt->host_scribble = (unsigned char *)my_mscp;
SCpnt774drivers/scsi/ultrastor.cSCpnt->result = status;
SCpnt775drivers/scsi/ultrastor.cdone(SCpnt);
SCpnt818drivers/scsi/ultrastor.cint ultrastor_abort(Scsi_Cmnd *SCpnt)
SCpnt833drivers/scsi/ultrastor.cif(!SCpnt->host_scribble)
SCpnt836drivers/scsi/ultrastor.cmscp_index = ((struct mscp *)SCpnt->host_scribble) - config.mscp;
SCpnt924drivers/scsi/ultrastor.cif (config.mscp[mscp_index].SCint != SCpnt)
SCpnt926drivers/scsi/ultrastor.cconfig.mscp[mscp_index].SCint, SCpnt);
SCpnt931drivers/scsi/ultrastor.cif (config.mscp[mscp_index].SCint != SCpnt) panic("Bad abort");
SCpnt935drivers/scsi/ultrastor.cSCpnt->result = DID_ABORT << 16;
SCpnt937drivers/scsi/ultrastor.cdone(SCpnt);
SCpnt943drivers/scsi/ultrastor.cint ultrastor_reset(Scsi_Cmnd * SCpnt)
SCpnt340drivers/scsi/wd7000.cScsi_Cmnd *SCpnt;             /* Scsi_Cmnd using this SCB */
SCpnt671drivers/scsi/wd7000.cscbs[i].next = &(scbs[i+1]);  scbs[i].SCpnt = NULL;
SCpnt674drivers/scsi/wd7000.cscbs[MAX_SCBS-1].SCpnt = NULL;
SCpnt789drivers/scsi/wd7000.cstatic void wd7000_scsi_done(Scsi_Cmnd * SCpnt)
SCpnt792drivers/scsi/wd7000.cprintk("wd7000_scsi_done: %06x\n",(unsigned int) SCpnt);
SCpnt794drivers/scsi/wd7000.cSCpnt->SCp.phase = 0;
SCpnt806drivers/scsi/wd7000.cregister Scsi_Cmnd *SCpnt;
SCpnt863drivers/scsi/wd7000.cSCpnt = scb->SCpnt;
SCpnt864drivers/scsi/wd7000.cif (--(SCpnt->SCp.phase) <= 0)  {  /* all scbs are done */
SCpnt868drivers/scsi/wd7000.cSCpnt->result = errstatus;
SCpnt872drivers/scsi/wd7000.cSCpnt->scsi_done(SCpnt);
SCpnt887drivers/scsi/wd7000.cint wd7000_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt891drivers/scsi/wd7000.cregister unchar *cdb = (unchar *) SCpnt->cmnd;
SCpnt894drivers/scsi/wd7000.cAdapter *host = (Adapter *) SCpnt->host->hostdata;
SCpnt896drivers/scsi/wd7000.ccdblen = SCpnt->cmd_len;
SCpnt897drivers/scsi/wd7000.cidlun = ((SCpnt->target << 5) & 0xe0) | (SCpnt->lun & 7);
SCpnt898drivers/scsi/wd7000.cSCpnt->scsi_done = done;
SCpnt899drivers/scsi/wd7000.cSCpnt->SCp.phase = 1;
SCpnt905drivers/scsi/wd7000.cscb->SCpnt = SCpnt;         /* so we can find stuff later */
SCpnt906drivers/scsi/wd7000.cSCpnt->host_scribble = (unchar *) scb;
SCpnt909drivers/scsi/wd7000.cif (SCpnt->use_sg)  {
SCpnt910drivers/scsi/wd7000.cstruct scatterlist *sg = (struct scatterlist *) SCpnt->request_buffer;
SCpnt913drivers/scsi/wd7000.cif (SCpnt->host->sg_tablesize == SG_NONE)  {
SCpnt917drivers/scsi/wd7000.cprintk("Using scatter/gather with %d elements.\n",SCpnt->use_sg);
SCpnt923drivers/scsi/wd7000.cany2scsi(scb->maxlen, SCpnt->use_sg * sizeof (Sgb) );
SCpnt925drivers/scsi/wd7000.cfor (i = 0;  i < SCpnt->use_sg;  i++)  {
SCpnt931drivers/scsi/wd7000.cany2scsi(scb->dataptr, (int) SCpnt->request_buffer);
SCpnt932drivers/scsi/wd7000.cany2scsi(scb->maxlen, SCpnt->request_bufflen);
SCpnt940drivers/scsi/wd7000.cint wd7000_command(Scsi_Cmnd *SCpnt)
SCpnt942drivers/scsi/wd7000.cwd7000_queuecommand(SCpnt, wd7000_scsi_done);
SCpnt944drivers/scsi/wd7000.cwhile (SCpnt->SCp.phase > 0);  /* phase counts scbs down to 0 */
SCpnt946drivers/scsi/wd7000.creturn SCpnt->result;
SCpnt1179drivers/scsi/wd7000.cint wd7000_abort(Scsi_Cmnd * SCpnt)
SCpnt1181drivers/scsi/wd7000.cAdapter *host = (Adapter *) SCpnt->host->hostdata;
SCpnt1196drivers/scsi/wd7000.cint wd7000_reset(Scsi_Cmnd * SCpnt)