taglinefilesource code
SCpnt777drivers/scsi/aha152x.cint aha152x_queue( Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt793drivers/scsi/aha152x.cprintk( "SCpnt (target = %d lun = %d cmnd = ", SCpnt->target, SCpnt->lun);
SCpnt794drivers/scsi/aha152x.cprint_command(SCpnt->cmnd);
SCpnt796drivers/scsi/aha152x.cSCpnt->cmd_len, SCpnt->use_sg, SCpnt->request_bufflen );
SCpnt801drivers/scsi/aha152x.cSCpnt->scsi_done =       done;
SCpnt809drivers/scsi/aha152x.cSCpnt->SCp.phase = not_issued;
SCpnt810drivers/scsi/aha152x.cif (SCpnt->use_sg)
SCpnt812drivers/scsi/aha152x.cSCpnt->SCp.buffer           = (struct scatterlist *)SCpnt->request_buffer;
SCpnt813drivers/scsi/aha152x.cSCpnt->SCp.ptr              = SCpnt->SCp.buffer->address;
SCpnt814drivers/scsi/aha152x.cSCpnt->SCp.this_residual    = SCpnt->SCp.buffer->length;
SCpnt815drivers/scsi/aha152x.cSCpnt->SCp.buffers_residual = SCpnt->use_sg - 1;
SCpnt819drivers/scsi/aha152x.cSCpnt->SCp.ptr              = (char *)SCpnt->request_buffer;
SCpnt820drivers/scsi/aha152x.cSCpnt->SCp.this_residual    = SCpnt->request_bufflen;
SCpnt821drivers/scsi/aha152x.cSCpnt->SCp.buffer           = NULL;
SCpnt822drivers/scsi/aha152x.cSCpnt->SCp.buffers_residual = 0;
SCpnt825drivers/scsi/aha152x.cSCpnt->SCp.Status              = CHECK_CONDITION;
SCpnt826drivers/scsi/aha152x.cSCpnt->SCp.Message             = 0;
SCpnt827drivers/scsi/aha152x.cSCpnt->SCp.have_data_in        = 0;
SCpnt828drivers/scsi/aha152x.cSCpnt->SCp.sent_command        = 0;
SCpnt841drivers/scsi/aha152x.cappend_SC( &issue_SC, SCpnt);
SCpnt861drivers/scsi/aha152x.cint aha152x_command( Scsi_Cmnd *SCpnt )
SCpnt871drivers/scsi/aha152x.cint aha152x_abort( Scsi_Cmnd *SCpnt)
SCpnt882drivers/scsi/aha152x.cprintk("aha152x: abort(), SCpnt=0x%08x, ", (unsigned int) SCpnt );
SCpnt890drivers/scsi/aha152x.cptr && ptr!=SCpnt;
SCpnt911drivers/scsi/aha152x.cif ( TESTLO(SSTAT1, BUSFREE) || (current_SC && current_SC!=SCpnt))
SCpnt936drivers/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);
SCpnt251drivers/scsi/eata.cScsi_Cmnd *SCpnt;           /* Address set in cp */
SCpnt278drivers/scsi/eata.cScsi_Cmnd *SCpnt;     /* Address to be returned is sp */
SCpnt578drivers/scsi/eata.cstatic inline void build_sg_list(struct mscp *cpp, Scsi_Cmnd *SCpnt) {
SCpnt582drivers/scsi/eata.csgpnt = (struct scatterlist *) SCpnt->request_buffer;
SCpnt584drivers/scsi/eata.cfor (k = 0; k < SCpnt->use_sg; k++) {
SCpnt590drivers/scsi/eata.ccpp->data_len = htonl((SCpnt->use_sg * sizeof(struct sg_list)));
SCpnt593drivers/scsi/eata.cint eata2x_queuecommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) {
SCpnt607drivers/scsi/eata.cj = ((struct hostdata *) SCpnt->host->hostdata)->board_number;
SCpnt609drivers/scsi/eata.cif (!done) panic("%s: qcomm, pid %ld, null done.\n", BN(j), SCpnt->pid);
SCpnt630drivers/scsi/eata.celse if (eata2x_reset(SCpnt) == SCSI_RESET_SUCCESS) 
SCpnt633drivers/scsi/eata.cSCpnt->result = DID_BUS_BUSY << 16; 
SCpnt634drivers/scsi/eata.cSCpnt->host_scribble = NULL;
SCpnt635drivers/scsi/eata.cprintk("%s: qcomm, pid %ld, DID_BUS_BUSY, done.\n", BN(j), SCpnt->pid);
SCpnt637drivers/scsi/eata.cdone(SCpnt);    
SCpnt654drivers/scsi/eata.cSCpnt->scsi_done = done;
SCpnt656drivers/scsi/eata.cSCpnt->host_scribble = (unsigned char *) &cpp->index;
SCpnt659drivers/scsi/eata.cBN(j), i, SCpnt->target, SCpnt->pid);
SCpnt662drivers/scsi/eata.cif (SCpnt->cmnd[0] == data_out_cmds[k]) {
SCpnt671drivers/scsi/eata.ccpp->target = SCpnt->target;
SCpnt672drivers/scsi/eata.ccpp->lun = SCpnt->lun;  
SCpnt673drivers/scsi/eata.ccpp->SCpnt = SCpnt;
SCpnt674drivers/scsi/eata.ccpp->sense_addr = htonl((unsigned int) SCpnt->sense_buffer); 
SCpnt675drivers/scsi/eata.ccpp->sense_len = sizeof SCpnt->sense_buffer;
SCpnt677drivers/scsi/eata.cif (SCpnt->use_sg) {
SCpnt679drivers/scsi/eata.cbuild_sg_list(cpp, SCpnt);
SCpnt682drivers/scsi/eata.ccpp->data_address = htonl((unsigned int) SCpnt->request_buffer);
SCpnt683drivers/scsi/eata.ccpp->data_len = htonl(SCpnt->request_bufflen);
SCpnt686drivers/scsi/eata.cmemcpy(cpp->cdb, SCpnt->cmnd, SCpnt->cmd_len);
SCpnt690drivers/scsi/eata.cSCpnt->result = DID_ERROR << 16; 
SCpnt691drivers/scsi/eata.cSCpnt->host_scribble = NULL;
SCpnt693drivers/scsi/eata.cBN(j), SCpnt->target, SCpnt->pid);
SCpnt695drivers/scsi/eata.cdone(SCpnt);    
SCpnt739drivers/scsi/eata.cif (SCarg != HD(j)->cp[i].SCpnt)
SCpnt741drivers/scsi/eata.cBN(j), i, SCarg, HD(j)->cp[i].SCpnt);
SCpnt765drivers/scsi/eata.cScsi_Cmnd *SCpnt;
SCpnt802drivers/scsi/eata.cSCpnt = HD(j)->cp[i].SCpnt;
SCpnt805drivers/scsi/eata.cBN(j), i, SCpnt->pid);
SCpnt807drivers/scsi/eata.cif (SCpnt == NULL)
SCpnt810drivers/scsi/eata.cif (SCpnt->host_scribble == NULL)
SCpnt813drivers/scsi/eata.cif (*(unsigned int *)SCpnt->host_scribble != i) 
SCpnt816drivers/scsi/eata.cif (SCpnt->scsi_done == NULL) 
SCpnt819drivers/scsi/eata.cif (SCpnt == SCarg) arg_done = TRUE;
SCpnt846drivers/scsi/eata.cSCpnt = HD(j)->cp[i].SCpnt;
SCpnt847drivers/scsi/eata.cSCpnt->result = DID_RESET << 16;
SCpnt848drivers/scsi/eata.cSCpnt->host_scribble = NULL;
SCpnt854drivers/scsi/eata.cBN(j), i, SCpnt->pid);
SCpnt856drivers/scsi/eata.cSCpnt->scsi_done(SCpnt);
SCpnt875drivers/scsi/eata.cScsi_Cmnd *SCpnt;
SCpnt941drivers/scsi/eata.cSCpnt = spp->SCpnt;
SCpnt943drivers/scsi/eata.cif (SCpnt == NULL)
SCpnt946drivers/scsi/eata.cif (SCpnt != cpp->SCpnt)
SCpnt948drivers/scsi/eata.cBN(j), i, SCpnt, cpp->SCpnt);
SCpnt950drivers/scsi/eata.cif (SCpnt->host_scribble == NULL)
SCpnt952drivers/scsi/eata.cBN(j), i, SCpnt->pid, SCpnt);
SCpnt954drivers/scsi/eata.cif (*(unsigned int *)SCpnt->host_scribble != i) 
SCpnt956drivers/scsi/eata.c" irq %d.\n", BN(j), i, SCpnt->pid, 
SCpnt957drivers/scsi/eata.c*(unsigned int *)SCpnt->host_scribble, irq);
SCpnt965drivers/scsi/eata.cif (tstatus == BUSY && SCpnt->device->type != TYPE_TAPE) 
SCpnt970drivers/scsi/eata.c&& SCpnt->device->type == TYPE_DISK
SCpnt971drivers/scsi/eata.c&& HD(j)->target_reset[SCpnt->target])
SCpnt976drivers/scsi/eata.c&& SCpnt->device->type == TYPE_DISK
SCpnt977drivers/scsi/eata.c&& (SCpnt->sense_buffer[2] & 0xf) == RECOVERED_ERROR)
SCpnt984drivers/scsi/eata.cHD(j)->target_reset[SCpnt->target] = FALSE;
SCpnt986drivers/scsi/eata.cif (spp->target_status && SCpnt->device->type == TYPE_DISK)
SCpnt989drivers/scsi/eata.cSCpnt->target, SCpnt->lun, SCpnt->pid,
SCpnt990drivers/scsi/eata.cspp->target_status, SCpnt->sense_buffer[2]);
SCpnt992drivers/scsi/eata.cHD(j)->target_time_out[SCpnt->target] = 0;
SCpnt998drivers/scsi/eata.cif (HD(j)->target_time_out[SCpnt->target] > 1)
SCpnt1002drivers/scsi/eata.cHD(j)->target_time_out[SCpnt->target]++;
SCpnt1009drivers/scsi/eata.cif (SCpnt->device->type != TYPE_TAPE)
SCpnt1031drivers/scsi/eata.cSCpnt->result = status | spp->target_status;
SCpnt1037drivers/scsi/eata.cif (SCpnt->result || do_trace)
SCpnt1047drivers/scsi/eata.cSCpnt->target, SCpnt->lun, SCpnt->pid, HD(j)->iocount);
SCpnt1050drivers/scsi/eata.cSCpnt->host_scribble = NULL;
SCpnt1053drivers/scsi/eata.cSCpnt->scsi_done(SCpnt);
SCpnt104drivers/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(status_byte(SCpnt->result) & CHECK_CONDITION)) &&
SCpnt392drivers/scsi/scsi.c((SCpnt->sense_buffer[0] & 0x70) >> 4) == 7) {
SCpnt393drivers/scsi/scsi.cif (SCpnt->sense_buffer[2] &0xe0)
SCpnt395drivers/scsi/scsi.cif(((SCpnt->sense_buffer[2] & 0xf) != NOT_READY) &&
SCpnt396drivers/scsi/scsi.c((SCpnt->sense_buffer[2] & 0xf) != UNIT_ATTENTION))
SCpnt417drivers/scsi/scsi.cSCpnt->request.dev = 0xffff; /* Mark not busy */
SCpnt418drivers/scsi/scsi.cSCpnt->cmd_len = 0;
SCpnt420drivers/scsi/scsi.cscsi_do_cmd (SCpnt, (void *)  scsi_cmd, (void *) scsi_result,
SCpnt424drivers/scsi/scsi.cwhile (SCpnt->request.dev != 0xfffe);
SCpnt425drivers/scsi/scsi.celse if (SCpnt->request.dev != 0xfffe) {
SCpnt428drivers/scsi/scsi.cSCpnt->request.sem = &sem;
SCpnt432drivers/scsi/scsi.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt435drivers/scsi/scsi.cthe_result = SCpnt->result;
SCpnt579drivers/scsi/scsi.cSCpnt->request.dev = 0xffff; /* Mark not busy */
SCpnt580drivers/scsi/scsi.cSCpnt->cmd_len = 0;
SCpnt582drivers/scsi/scsi.cscsi_do_cmd (SCpnt, (void *)  scsi_cmd,
SCpnt587drivers/scsi/scsi.cwhile (SCpnt->request.dev != 0xfffe);
SCpnt588drivers/scsi/scsi.celse if (SCpnt->request.dev != 0xfffe) {
SCpnt591drivers/scsi/scsi.cSCpnt->request.sem = &sem;
SCpnt595drivers/scsi/scsi.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt625drivers/scsi/scsi.cscsi_init_free((char *) SCpnt, sizeof(Scsi_Cmnd));
SCpnt647drivers/scsi/scsi.cstatic void scsi_times_out (Scsi_Cmnd * SCpnt, int pid)
SCpnt650drivers/scsi/scsi.cswitch (SCpnt->internal_timeout & (IN_ABORT | IN_RESET))
SCpnt659drivers/scsi/scsi.cif (!scsi_abort  (SCpnt, DID_TIME_OUT, pid))
SCpnt663drivers/scsi/scsi.cSCpnt->host->host_no);
SCpnt664drivers/scsi/scsi.cif (!scsi_reset (SCpnt))
SCpnt671drivers/scsi/scsi.cprintk("Unable to reset scsi host %d - ",SCpnt->host->host_no);
SCpnt690drivers/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt700drivers/scsi/scsi.cSCpnt =  device->host->host_queue;
SCpnt701drivers/scsi/scsi.cwhile(SCpnt){
SCpnt702drivers/scsi/scsi.cif(SCpnt->target == device->id &&
SCpnt703drivers/scsi/scsi.cSCpnt->lun == device->lun)
SCpnt704drivers/scsi/scsi.cif(SCpnt->request.dev < 0) break;
SCpnt705drivers/scsi/scsi.cSCpnt = SCpnt->next;
SCpnt708drivers/scsi/scsi.cif (!SCpnt) return NULL;
SCpnt713drivers/scsi/scsi.cmemcpy(&SCpnt->request, req, sizeof(struct request));
SCpnt728drivers/scsi/scsi.cSCpnt->request.bhtail = bh;
SCpnt734drivers/scsi/scsi.cSCpnt->request.nr_sectors -= req->nr_sectors;
SCpnt737drivers/scsi/scsi.cSCpnt->request.sem = NULL; /* Wait until whole thing done */
SCpnt743drivers/scsi/scsi.cSCpnt->request.dev = 0xffff; /* Busy, but no request */
SCpnt744drivers/scsi/scsi.cSCpnt->request.sem = NULL;  /* And no one is waiting for the device either */
SCpnt747drivers/scsi/scsi.cSCpnt->use_sg = 0;  /* Reset the scatter-gather flag */
SCpnt748drivers/scsi/scsi.cSCpnt->old_use_sg  = 0;
SCpnt749drivers/scsi/scsi.cSCpnt->transfersize = 0;
SCpnt750drivers/scsi/scsi.cSCpnt->underflow = 0;
SCpnt751drivers/scsi/scsi.cSCpnt->cmd_len = 0;
SCpnt752drivers/scsi/scsi.creturn SCpnt;
SCpnt773drivers/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt789drivers/scsi/scsi.cSCpnt = host->host_queue;
SCpnt790drivers/scsi/scsi.cwhile(SCpnt){
SCpnt791drivers/scsi/scsi.cif(SCpnt->target == device->id &&
SCpnt792drivers/scsi/scsi.cSCpnt->lun == device->lun) {
SCpnt793drivers/scsi/scsi.cSCwait = SCpnt;
SCpnt794drivers/scsi/scsi.cif(SCpnt->request.dev < 0) break;
SCpnt796drivers/scsi/scsi.cSCpnt = SCpnt->next;
SCpnt805drivers/scsi/scsi.cif (!SCpnt || SCpnt->request.dev >= 0)  /* Might have changed */
SCpnt818drivers/scsi/scsi.cmemcpy(&SCpnt->request, req, sizeof(struct request));
SCpnt833drivers/scsi/scsi.cSCpnt->request.bhtail = bh;
SCpnt838drivers/scsi/scsi.cSCpnt->request.nr_sectors -= req->nr_sectors;
SCpnt841drivers/scsi/scsi.cSCpnt->request.sem = NULL; /* Wait until whole thing done */
SCpnt850drivers/scsi/scsi.cSCpnt->request.dev = 0xffff; /* Busy */
SCpnt851drivers/scsi/scsi.cSCpnt->request.sem = NULL;  /* And no one is waiting for this to complete */
SCpnt858drivers/scsi/scsi.cSCpnt->use_sg = 0;  /* Reset the scatter-gather flag */
SCpnt859drivers/scsi/scsi.cSCpnt->old_use_sg  = 0;
SCpnt860drivers/scsi/scsi.cSCpnt->transfersize = 0;      /* No default transfer size */
SCpnt861drivers/scsi/scsi.cSCpnt->cmd_len = 0;
SCpnt862drivers/scsi/scsi.cSCpnt->underflow = 0;         /* Do not flag underflow conditions */
SCpnt863drivers/scsi/scsi.creturn SCpnt;
SCpnt870drivers/scsi/scsi.cinline void internal_cmnd (Scsi_Cmnd * SCpnt)
SCpnt879drivers/scsi/scsi.cif ((unsigned long) &SCpnt < current->kernel_stack_page)
SCpnt882drivers/scsi/scsi.chost = SCpnt->host;
SCpnt894drivers/scsi/scsi.cupdate_timeout(SCpnt, SCpnt->timeout_per_command);
SCpnt902drivers/scsi/scsi.c"bufflen = %d, done = %08x)\n", SCpnt->host->host_no, SCpnt->target, SCpnt->cmnd, SCpnt->buffer, SCpnt->bufflen, SCpnt->done);
SCpnt919drivers/scsi/scsi.cif(!intr_count && SCpnt->host->irq)
SCpnt920drivers/scsi/scsi.cdisable_irq(SCpnt->host->irq);
SCpnt922drivers/scsi/scsi.chost->hostt->queuecommand (SCpnt, scsi_done);
SCpnt924drivers/scsi/scsi.cif(!intr_count && SCpnt->host->irq)
SCpnt925drivers/scsi/scsi.cenable_irq(SCpnt->host->irq);
SCpnt933drivers/scsi/scsi.ctemp=host->hostt->command (SCpnt);
SCpnt934drivers/scsi/scsi.cSCpnt->result = temp;
SCpnt940drivers/scsi/scsi.cscsi_done(SCpnt);
SCpnt947drivers/scsi/scsi.cstatic void scsi_request_sense (Scsi_Cmnd * SCpnt)
SCpnt953drivers/scsi/scsi.cSCpnt->flags |= WAS_SENSE | ASKED_FOR_SENSE;
SCpnt954drivers/scsi/scsi.cupdate_timeout(SCpnt, SENSE_TIMEOUT);
SCpnt958drivers/scsi/scsi.cmemcpy ((void *) SCpnt->cmnd , (void *) generic_sense,
SCpnt961drivers/scsi/scsi.cSCpnt->cmnd[1] = SCpnt->lun << 5;
SCpnt962drivers/scsi/scsi.cSCpnt->cmnd[4] = sizeof(SCpnt->sense_buffer);
SCpnt964drivers/scsi/scsi.cSCpnt->request_buffer = &SCpnt->sense_buffer;
SCpnt965drivers/scsi/scsi.cSCpnt->request_bufflen = sizeof(SCpnt->sense_buffer);
SCpnt966drivers/scsi/scsi.cSCpnt->use_sg = 0;
SCpnt967drivers/scsi/scsi.cSCpnt->cmd_len = COMMAND_SIZE(SCpnt->cmnd[0]);
SCpnt968drivers/scsi/scsi.cinternal_cmnd (SCpnt);
SCpnt980drivers/scsi/scsi.cvoid scsi_do_cmd (Scsi_Cmnd * SCpnt, const void *cmnd ,
SCpnt986drivers/scsi/scsi.cstruct Scsi_Host * host = SCpnt->host;
SCpnt991drivers/scsi/scsi.cint target = SCpnt->target;
SCpnt1017drivers/scsi/scsi.cSCpnt->pid = scsi_pid++;
SCpnt1038drivers/scsi/scsi.cmemcpy ((void *) SCpnt->data_cmnd , (void *) cmnd, 12);
SCpnt1040drivers/scsi/scsi.cSCpnt->host = host;
SCpnt1041drivers/scsi/scsi.cSCpnt->target = target;
SCpnt1042drivers/scsi/scsi.cSCpnt->lun = (SCpnt->data_cmnd[1] >> 5);
SCpnt1044drivers/scsi/scsi.cSCpnt->bufflen = bufflen;
SCpnt1045drivers/scsi/scsi.cSCpnt->buffer = buffer;
SCpnt1046drivers/scsi/scsi.cSCpnt->flags=0;
SCpnt1047drivers/scsi/scsi.cSCpnt->retries=0;
SCpnt1048drivers/scsi/scsi.cSCpnt->allowed=retries;
SCpnt1049drivers/scsi/scsi.cSCpnt->done = done;
SCpnt1050drivers/scsi/scsi.cSCpnt->timeout_per_command = timeout;
SCpnt1052drivers/scsi/scsi.cmemcpy ((void *) SCpnt->cmnd , (void *) cmnd, 12);
SCpnt1055drivers/scsi/scsi.cmemset ((void *) SCpnt->sense_buffer, 0, sizeof SCpnt->sense_buffer);
SCpnt1056drivers/scsi/scsi.cSCpnt->request_buffer = buffer;
SCpnt1057drivers/scsi/scsi.cSCpnt->request_bufflen = bufflen;
SCpnt1058drivers/scsi/scsi.cSCpnt->old_use_sg = SCpnt->use_sg;
SCpnt1059drivers/scsi/scsi.cif (SCpnt->cmd_len == 0)
SCpnt1060drivers/scsi/scsi.cSCpnt->cmd_len = COMMAND_SIZE(SCpnt->cmnd[0]);
SCpnt1061drivers/scsi/scsi.cSCpnt->old_cmd_len = SCpnt->cmd_len;
SCpnt1065drivers/scsi/scsi.cSCpnt->internal_timeout = 0;
SCpnt1066drivers/scsi/scsi.cSCpnt->abort_reason = 0;
SCpnt1067drivers/scsi/scsi.cinternal_cmnd (SCpnt);
SCpnt1082drivers/scsi/scsi.cstatic void reset (Scsi_Cmnd * SCpnt)
SCpnt1085drivers/scsi/scsi.cprintk("scsi: reset(%d)\n", SCpnt->host->host_no);
SCpnt1088drivers/scsi/scsi.cSCpnt->flags |= (WAS_RESET | IS_RESETTING);
SCpnt1089drivers/scsi/scsi.cscsi_reset(SCpnt);
SCpnt1096drivers/scsi/scsi.cif(SCpnt->flags & NEEDS_JUMPSTART) {
SCpnt1097drivers/scsi/scsi.cSCpnt->flags &= ~NEEDS_JUMPSTART;
SCpnt1098drivers/scsi/scsi.cscsi_request_sense (SCpnt);
SCpnt1105drivers/scsi/scsi.cstatic int check_sense (Scsi_Cmnd * SCpnt)
SCpnt1110drivers/scsi/scsi.cif (((SCpnt->sense_buffer[0] & 0x70) >> 4) != 7) {
SCpnt1111drivers/scsi/scsi.cif(!(SCpnt->flags & ASKED_FOR_SENSE))
SCpnt1117drivers/scsi/scsi.cSCpnt->flags &= ~ASKED_FOR_SENSE;
SCpnt1120drivers/scsi/scsi.cprintk("scsi%d : ", SCpnt->host->host_no);
SCpnt1121drivers/scsi/scsi.cprint_sense("", SCpnt);
SCpnt1124drivers/scsi/scsi.cif (SCpnt->sense_buffer[2] &0xe0)
SCpnt1127drivers/scsi/scsi.cswitch (SCpnt->sense_buffer[2] & 0xf)
SCpnt1177drivers/scsi/scsi.cstatic void scsi_done (Scsi_Cmnd * SCpnt)
SCpnt1183drivers/scsi/scsi.cstruct Scsi_Host * host = SCpnt->host;
SCpnt1184drivers/scsi/scsi.cint result = SCpnt->result;
SCpnt1185drivers/scsi/scsi.coldto = update_timeout(SCpnt, 0);
SCpnt1189drivers/scsi/scsi.cresult, SCpnt->target, SCpnt->lun);
SCpnt1194drivers/scsi/scsi.cif(host_byte(result) == DID_ABORT && SCpnt->abort_reason)
SCpnt1195drivers/scsi/scsi.cSCpnt->result = result = (result & 0xff00ffff) |
SCpnt1196drivers/scsi/scsi.c(SCpnt->abort_reason << 16);
SCpnt1208drivers/scsi/scsi.cif(SCpnt->flags & WAS_SENSE)
SCpnt1210drivers/scsi/scsi.cSCpnt->use_sg = SCpnt->old_use_sg;
SCpnt1211drivers/scsi/scsi.cSCpnt->cmd_len = SCpnt->old_cmd_len;
SCpnt1217drivers/scsi/scsi.cif (status_byte(result) && (SCpnt->flags & WAS_SENSE))
SCpnt1220drivers/scsi/scsi.cSCpnt->flags &= ~WAS_SENSE;
SCpnt1221drivers/scsi/scsi.cSCpnt->internal_timeout &= ~SENSE_TIMEOUT;
SCpnt1223drivers/scsi/scsi.cif (!(SCpnt->flags & WAS_RESET))
SCpnt1226drivers/scsi/scsi.cSCpnt->host->host_no, SCpnt->target, SCpnt->lun);
SCpnt1227drivers/scsi/scsi.creset(SCpnt);
SCpnt1242drivers/scsi/scsi.cif (SCpnt->flags & WAS_SENSE)
SCpnt1248drivers/scsi/scsi.cSCpnt->flags &= ~WAS_SENSE;
SCpnt1249drivers/scsi/scsi.cSCpnt->internal_timeout &= ~SENSE_TIMEOUT;
SCpnt1251drivers/scsi/scsi.cswitch (checked = check_sense(SCpnt))
SCpnt1259drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1298drivers/scsi/scsi.cswitch (check_sense(SCpnt))
SCpnt1301drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1314drivers/scsi/scsi.cscsi_request_sense (SCpnt);
SCpnt1326drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1332drivers/scsi/scsi.cSCpnt->host->host_no);
SCpnt1333drivers/scsi/scsi.creset(SCpnt);
SCpnt1356drivers/scsi/scsi.cif (SCpnt->flags & WAS_TIMEDOUT)
SCpnt1368drivers/scsi/scsi.cSCpnt->flags  |= WAS_TIMEDOUT;
SCpnt1369drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_ABORT;
SCpnt1392drivers/scsi/scsi.cif (SCpnt->flags & IS_RESETTING)
SCpnt1394drivers/scsi/scsi.cSCpnt->flags &= ~IS_RESETTING;
SCpnt1401drivers/scsi/scsi.cswitch (check_sense(SCpnt)) {
SCpnt1403drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1416drivers/scsi/scsi.cscsi_request_sense (SCpnt);
SCpnt1438drivers/scsi/scsi.cSCpnt->allowed, SCpnt->retries);
SCpnt1441drivers/scsi/scsi.cif ((++SCpnt->retries) < SCpnt->allowed)
SCpnt1443drivers/scsi/scsi.cif ((SCpnt->retries >= (SCpnt->allowed >> 1))
SCpnt1444drivers/scsi/scsi.c&& !(jiffies < SCpnt->host->last_reset + MIN_RESET_PERIOD)
SCpnt1445drivers/scsi/scsi.c&& !(SCpnt->flags & WAS_RESET))
SCpnt1448drivers/scsi/scsi.cSCpnt->host->host_no);
SCpnt1449drivers/scsi/scsi.creset(SCpnt);
SCpnt1463drivers/scsi/scsi.cif (SCpnt->flags & WAS_SENSE)
SCpnt1464drivers/scsi/scsi.cscsi_request_sense(SCpnt);
SCpnt1467drivers/scsi/scsi.cmemcpy ((void *) SCpnt->cmnd,
SCpnt1468drivers/scsi/scsi.c(void*) SCpnt->data_cmnd,
SCpnt1469drivers/scsi/scsi.csizeof(SCpnt->data_cmnd));
SCpnt1470drivers/scsi/scsi.cSCpnt->request_buffer = SCpnt->buffer;
SCpnt1471drivers/scsi/scsi.cSCpnt->request_bufflen = SCpnt->bufflen;
SCpnt1472drivers/scsi/scsi.cSCpnt->use_sg = SCpnt->old_use_sg;
SCpnt1473drivers/scsi/scsi.cSCpnt->cmd_len = SCpnt->old_cmd_len;
SCpnt1474drivers/scsi/scsi.cinternal_cmnd (SCpnt);
SCpnt1484drivers/scsi/scsi.cprintk("Calling done function - at address %08x\n", SCpnt->done);
SCpnt1492drivers/scsi/scsi.cif (MAJOR(SCpnt->request.dev) != SCSI_DISK_MAJOR &&
SCpnt1493drivers/scsi/scsi.cMAJOR(SCpnt->request.dev) != SCSI_CDROM_MAJOR) {
SCpnt1503drivers/scsi/scsi.cSCpnt->result = result | ((exit & 0xff) << 24);
SCpnt1504drivers/scsi/scsi.cSCpnt->use_sg = SCpnt->old_use_sg;
SCpnt1505drivers/scsi/scsi.cSCpnt->cmd_len = SCpnt->old_cmd_len;
SCpnt1506drivers/scsi/scsi.cSCpnt->done (SCpnt);
SCpnt1531drivers/scsi/scsi.cint scsi_abort (Scsi_Cmnd * SCpnt, int why, int pid)
SCpnt1535drivers/scsi/scsi.cstruct Scsi_Host * host = SCpnt->host;
SCpnt1546drivers/scsi/scsi.cif (SCpnt->request.dev == -1 || pid != SCpnt->pid) {
SCpnt1551drivers/scsi/scsi.cif (SCpnt->internal_timeout & IN_ABORT)
SCpnt1554drivers/scsi/scsi.cwhile (SCpnt->internal_timeout & IN_ABORT);
SCpnt1558drivers/scsi/scsi.cSCpnt->internal_timeout |= IN_ABORT;
SCpnt1559drivers/scsi/scsi.coldto = update_timeout(SCpnt, ABORT_TIMEOUT);
SCpnt1561drivers/scsi/scsi.cif ((SCpnt->flags & IS_RESETTING) &&
SCpnt1562drivers/scsi/scsi.cSCpnt->device->soft_reset) {
SCpnt1566drivers/scsi/scsi.c" the bus was reset\n", SCpnt->target, SCpnt->lun);
SCpnt1571drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_ABORT;
SCpnt1572drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1576drivers/scsi/scsi.cSCpnt->pid, SCpnt->host->host_no, (int) SCpnt->target, (int)
SCpnt1577drivers/scsi/scsi.cSCpnt->lun);
SCpnt1578drivers/scsi/scsi.cprint_command (SCpnt->cmnd);
SCpnt1579drivers/scsi/scsi.cif (SCpnt->request.dev == -1 || pid != SCpnt->pid)
SCpnt1581drivers/scsi/scsi.cSCpnt->abort_reason = why;
SCpnt1582drivers/scsi/scsi.cswitch(host->hostt->abort(SCpnt)) {
SCpnt1593drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_ABORT;
SCpnt1594drivers/scsi/scsi.cif(SCpnt->flags & WAS_TIMEDOUT) {
SCpnt1600drivers/scsi/scsi.cSCpnt->flags |= WAS_TIMEDOUT;
SCpnt1601drivers/scsi/scsi.coldto = SCpnt->timeout_per_command;
SCpnt1602drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1611drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1619drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_ABORT;
SCpnt1620drivers/scsi/scsi.cupdate_timeout(SCpnt, 0);
SCpnt1624drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_ABORT;
SCpnt1631drivers/scsi/scsi.cint scsi_reset (Scsi_Cmnd * SCpnt)
SCpnt1636drivers/scsi/scsi.cstruct Scsi_Host * host = SCpnt->host;
SCpnt1644drivers/scsi/scsi.cif (SCpnt->internal_timeout & IN_RESET)
SCpnt1647drivers/scsi/scsi.cwhile (SCpnt->internal_timeout & IN_RESET);
SCpnt1651drivers/scsi/scsi.cSCpnt->internal_timeout |= IN_RESET;
SCpnt1652drivers/scsi/scsi.coldto = update_timeout(SCpnt, RESET_TIMEOUT);
SCpnt1663drivers/scsi/scsi.cscsi_abort(SCpnt1, DID_RESET, SCpnt->pid);
SCpnt1671drivers/scsi/scsi.ctemp = host->hostt->reset(SCpnt);
SCpnt1679drivers/scsi/scsi.ctemp = host->hostt->reset(SCpnt);
SCpnt1691drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_RESET;
SCpnt1692drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1699drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_RESET;
SCpnt1700drivers/scsi/scsi.cscsi_request_sense (SCpnt);
SCpnt1709drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_RESET;
SCpnt1710drivers/scsi/scsi.cupdate_timeout(SCpnt, 0);
SCpnt1733drivers/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt1747drivers/scsi/scsi.cfor(SCpnt = host->host_queue; SCpnt; SCpnt = SCpnt->next)
SCpnt1748drivers/scsi/scsi.cif (SCpnt->timeout == -1)
SCpnt1750drivers/scsi/scsi.cSCpnt->timeout = 0;
SCpnt1751drivers/scsi/scsi.cpid = SCpnt->pid;
SCpnt1753drivers/scsi/scsi.cscsi_times_out(SCpnt, pid);
SCpnt1777drivers/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt1804drivers/scsi/scsi.cfor(SCpnt = host->host_queue; SCpnt; SCpnt = SCpnt->next)
SCpnt1805drivers/scsi/scsi.cif (SCpnt->timeout > 0) {
SCpnt1806drivers/scsi/scsi.cSCpnt->timeout -= used;
SCpnt1807drivers/scsi/scsi.cif(SCpnt->timeout <= 0) SCpnt->timeout = -1;
SCpnt1808drivers/scsi/scsi.cif(SCpnt->timeout > 0 && SCpnt->timeout < least)
SCpnt1809drivers/scsi/scsi.cleast = SCpnt->timeout;
SCpnt1981drivers/scsi/scsi.cScsi_Cmnd * SCpnt;
SCpnt2022drivers/scsi/scsi.cSCpnt = (Scsi_Cmnd *) scsi_init_malloc(sizeof(Scsi_Cmnd), GFP_ATOMIC);
SCpnt2023drivers/scsi/scsi.cSCpnt->host = SDpnt->host;
SCpnt2024drivers/scsi/scsi.cSCpnt->device = SDpnt;
SCpnt2025drivers/scsi/scsi.cSCpnt->target = SDpnt->id;
SCpnt2026drivers/scsi/scsi.cSCpnt->lun = SDpnt->lun;
SCpnt2027drivers/scsi/scsi.cSCpnt->request.dev = -1; /* Mark not busy */
SCpnt2028drivers/scsi/scsi.cSCpnt->use_sg = 0;
SCpnt2029drivers/scsi/scsi.cSCpnt->old_use_sg = 0;
SCpnt2030drivers/scsi/scsi.cSCpnt->old_cmd_len = 0;
SCpnt2031drivers/scsi/scsi.cSCpnt->timeout = 0;
SCpnt2032drivers/scsi/scsi.cSCpnt->underflow = 0;
SCpnt2033drivers/scsi/scsi.cSCpnt->transfersize = 0;
SCpnt2034drivers/scsi/scsi.cSCpnt->host_scribble = NULL;
SCpnt2037drivers/scsi/scsi.chost->host_queue->prev = SCpnt;
SCpnt2038drivers/scsi/scsi.cSCpnt->next = host->host_queue;
SCpnt2039drivers/scsi/scsi.cSCpnt->prev = NULL;
SCpnt2040drivers/scsi/scsi.chost->host_queue = SCpnt;
SCpnt2165drivers/scsi/scsi.cScsi_Cmnd * SCpnt;
SCpnt2222drivers/scsi/scsi.cSCpnt = (Scsi_Cmnd *) scsi_init_malloc(sizeof(Scsi_Cmnd), GFP_ATOMIC);
SCpnt2223drivers/scsi/scsi.cSCpnt->host = SDpnt->host;
SCpnt2224drivers/scsi/scsi.cSCpnt->device = SDpnt;
SCpnt2225drivers/scsi/scsi.cSCpnt->target = SDpnt->id;
SCpnt2226drivers/scsi/scsi.cSCpnt->lun = SDpnt->lun;
SCpnt2227drivers/scsi/scsi.cSCpnt->request.dev = -1; /* Mark not busy */
SCpnt2228drivers/scsi/scsi.cSCpnt->request.sem = NULL;
SCpnt2229drivers/scsi/scsi.cSCpnt->use_sg = 0;
SCpnt2230drivers/scsi/scsi.cSCpnt->old_use_sg = 0;
SCpnt2231drivers/scsi/scsi.cSCpnt->underflow = 0;
SCpnt2232drivers/scsi/scsi.cSCpnt->timeout = 0;
SCpnt2233drivers/scsi/scsi.cSCpnt->transfersize = 0;
SCpnt2234drivers/scsi/scsi.cSCpnt->host_scribble = NULL;
SCpnt2236drivers/scsi/scsi.cSCpnt->next = host->host_queue;
SCpnt2237drivers/scsi/scsi.cSCpnt->prev = NULL;
SCpnt2238drivers/scsi/scsi.chost->host_queue = SCpnt;
SCpnt2240drivers/scsi/scsi.chost->host_queue->prev = SCpnt;
SCpnt2329drivers/scsi/scsi.cScsi_Cmnd * SCpnt;
SCpnt2345drivers/scsi/scsi.cfor(SCpnt = shpnt->host_queue; SCpnt; SCpnt = SCpnt->next)
SCpnt2349drivers/scsi/scsi.cif(SCpnt->request.dev != -1) {
SCpnt2351drivers/scsi/scsi.cfor(SCpnt = shpnt->host_queue; SCpnt; SCpnt = SCpnt->next)
SCpnt2352drivers/scsi/scsi.cif(SCpnt->request.dev == 0xffe0) SCpnt->request.dev = -1;
SCpnt2356drivers/scsi/scsi.cSCpnt->request.dev = 0xffe0;  /* Mark as busy */
SCpnt2379drivers/scsi/scsi.cSCpnt = sdpnt->host->host_queue->next;
SCpnt2381drivers/scsi/scsi.csdpnt->host->host_queue = SCpnt;
SCpnt2382drivers/scsi/scsi.cif (SCpnt) SCpnt->prev = NULL;
SCpnt2498drivers/scsi/scsi.cScsi_Cmnd * SCpnt;
SCpnt2502drivers/scsi/scsi.cfor(SCpnt=shpnt->host_queue; SCpnt; SCpnt = SCpnt->next)
SCpnt2506drivers/scsi/scsi.ci++, SCpnt->host->host_no,
SCpnt2507drivers/scsi/scsi.cSCpnt->target,
SCpnt2508drivers/scsi/scsi.cSCpnt->lun,
SCpnt2509drivers/scsi/scsi.cSCpnt->request.dev,
SCpnt2510drivers/scsi/scsi.cSCpnt->request.sector,
SCpnt2511drivers/scsi/scsi.cSCpnt->request.nr_sectors,
SCpnt2512drivers/scsi/scsi.cSCpnt->request.current_nr_sectors,
SCpnt2513drivers/scsi/scsi.cSCpnt->use_sg,
SCpnt2514drivers/scsi/scsi.cSCpnt->retries,
SCpnt2515drivers/scsi/scsi.cSCpnt->allowed,
SCpnt2516drivers/scsi/scsi.cSCpnt->flags,
SCpnt2517drivers/scsi/scsi.cSCpnt->timeout_per_command,
SCpnt2518drivers/scsi/scsi.cSCpnt->timeout,
SCpnt2519drivers/scsi/scsi.cSCpnt->internal_timeout,
SCpnt2520drivers/scsi/scsi.cSCpnt->cmnd[0],
SCpnt2521drivers/scsi/scsi.cSCpnt->sense_buffer[2],
SCpnt2522drivers/scsi/scsi.cSCpnt->result);
SCpnt545drivers/scsi/scsi.hstatic Scsi_Cmnd * end_scsi_request(Scsi_Cmnd * SCpnt, int uptodate, int sectors)
SCpnt550drivers/scsi/scsi.hreq = &SCpnt->request;
SCpnt577drivers/scsi/scsi.hreturn SCpnt;
SCpnt584drivers/scsi/scsi.hif (SCpnt->host->block) {
SCpnt587drivers/scsi/scsi.hfor (next = SCpnt->host->block; next != SCpnt->host;
SCpnt594drivers/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;
SCpnt402drivers/scsi/sd.cif (!SCpnt && sd_template.nr_dev > 1){
SCpnt408drivers/scsi/sd.cSCpnt = request_queueable(req,
SCpnt410drivers/scsi/sd.cif(SCpnt) break;
SCpnt414drivers/scsi/sd.cif (SCpnt && req->dev == -1) {
SCpnt423drivers/scsi/sd.cif (!SCpnt) return; /* Could not find anything to do */
SCpnt426drivers/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt430drivers/scsi/sd.cstatic void requeue_sd_request (Scsi_Cmnd * SCpnt)
SCpnt441drivers/scsi/sd.cif(!SCpnt || SCpnt->request.dev <= 0) {
SCpnt446drivers/scsi/sd.cdev =  MINOR(SCpnt->request.dev);
SCpnt447drivers/scsi/sd.cblock = SCpnt->request.sector;
SCpnt456drivers/scsi/sd.cblock + SCpnt->request.nr_sectors > sd[dev].nr_sects)
SCpnt458drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt471drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt476drivers/scsi/sd.cprintk("sd%c : real dev = /dev/sd%c, block = %d\n", 'a' + MINOR(SCpnt->request.dev), dev, block);
SCpnt491drivers/scsi/sd.cif((block & 1) || (SCpnt->request.nr_sectors & 1)) {
SCpnt493drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt497drivers/scsi/sd.cswitch (SCpnt->request.cmd)
SCpnt502drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt511drivers/scsi/sd.cpanic ("Unknown sd command %d\n", SCpnt->request.cmd);
SCpnt514drivers/scsi/sd.cSCpnt->this_count = 0;
SCpnt518drivers/scsi/sd.ccontiguous = (!CLUSTERABLE_DEVICE(SCpnt) ? 0 :1);
SCpnt520drivers/scsi/sd.cbounce_size = (SCpnt->request.nr_sectors << 9);
SCpnt527drivers/scsi/sd.cif (contiguous && SCpnt->request.bh &&
SCpnt528drivers/scsi/sd.c((long) SCpnt->request.bh->b_data) + (SCpnt->request.nr_sectors << 9) - 1 > 
SCpnt529drivers/scsi/sd.cISA_DMA_THRESHOLD && SCpnt->host->unchecked_isa_dma) {
SCpnt530drivers/scsi/sd.cif(((long) SCpnt->request.bh->b_data) > ISA_DMA_THRESHOLD)
SCpnt535drivers/scsi/sd.cif(contiguous && SCpnt->request.bh && SCpnt->request.bh->b_reqnext)
SCpnt536drivers/scsi/sd.cfor(bh = SCpnt->request.bh, bhp = bh->b_reqnext; bhp; bh = bhp, 
SCpnt544drivers/scsi/sd.cif (!SCpnt->request.bh || contiguous) {
SCpnt547drivers/scsi/sd.cthis_count = SCpnt->request.nr_sectors;
SCpnt548drivers/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt549drivers/scsi/sd.cSCpnt->use_sg = 0;
SCpnt551drivers/scsi/sd.c} else if (SCpnt->host->sg_tablesize == 0 ||
SCpnt562drivers/scsi/sd.cif (SCpnt->host->sg_tablesize != 0 &&
SCpnt567drivers/scsi/sd.cthis_count = SCpnt->request.current_nr_sectors;
SCpnt568drivers/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt569drivers/scsi/sd.cSCpnt->use_sg = 0;
SCpnt578drivers/scsi/sd.cbh = SCpnt->request.bh;
SCpnt586drivers/scsi/sd.c!CLUSTERABLE_DEVICE(SCpnt) ||
SCpnt587drivers/scsi/sd.c(SCpnt->host->unchecked_isa_dma &&
SCpnt589drivers/scsi/sd.cif (count < SCpnt->host->sg_tablesize) count++;
SCpnt597drivers/scsi/sd.cif(SCpnt->host->unchecked_isa_dma &&
SCpnt598drivers/scsi/sd.c((unsigned int) SCpnt->request.bh->b_data-1) == ISA_DMA_THRESHOLD) count--;
SCpnt600drivers/scsi/sd.cSCpnt->use_sg = count;  /* Number of chains */
SCpnt602drivers/scsi/sd.cwhile( count < (SCpnt->use_sg * sizeof(struct scatterlist))) 
SCpnt604drivers/scsi/sd.cSCpnt->sglist_len = count;
SCpnt606drivers/scsi/sd.cif(SCpnt->host->sg_tablesize < max_sg) max_sg = SCpnt->host->sg_tablesize;
SCpnt611drivers/scsi/sd.cSCpnt->use_sg = 0;  /* No memory left - bail out */
SCpnt612drivers/scsi/sd.cthis_count = SCpnt->request.current_nr_sectors;
SCpnt613drivers/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt617drivers/scsi/sd.cfor(count = 0, bh = SCpnt->request.bh, bhp = bh->b_reqnext;
SCpnt618drivers/scsi/sd.ccount < SCpnt->use_sg && bh; 
SCpnt628drivers/scsi/sd.cISA_DMA_THRESHOLD && (SCpnt->host->unchecked_isa_dma) &&
SCpnt651drivers/scsi/sd.cthis_count = SCpnt->request.current_nr_sectors;
SCpnt652drivers/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt653drivers/scsi/sd.cSCpnt->use_sg = 0;
SCpnt654drivers/scsi/sd.cscsi_free(sgpnt, SCpnt->sglist_len);
SCpnt656drivers/scsi/sd.cSCpnt->use_sg = count;
SCpnt667drivers/scsi/sd.cif(bhp && CONTIGUOUS_BUFFERS(bh,bhp) && CLUSTERABLE_DEVICE(SCpnt)) {
SCpnt672drivers/scsi/sd.c(SCpnt->host->unchecked_isa_dma) &&
SCpnt680drivers/scsi/sd.cmax_sg = SCpnt->use_sg;
SCpnt692drivers/scsi/sd.cif (SCpnt->use_sg < max_sg) SCpnt->use_sg++;
SCpnt698drivers/scsi/sd.cif(count < SCpnt->use_sg || SCpnt->use_sg > SCpnt->host->sg_tablesize){
SCpnt699drivers/scsi/sd.cbh = SCpnt->request.bh;
SCpnt700drivers/scsi/sd.cprintk("Use sg, count %d %x %d\n", SCpnt->use_sg, count, dma_free_sectors);
SCpnt706drivers/scsi/sd.cif(SCpnt->use_sg < 16)
SCpnt707drivers/scsi/sd.cfor(count=0; count<SCpnt->use_sg; count++)
SCpnt715drivers/scsi/sd.cif (SCpnt->request.cmd == WRITE)
SCpnt716drivers/scsi/sd.cfor(count=0; count<SCpnt->use_sg; count++)
SCpnt725drivers/scsi/sd.cif(SCpnt->use_sg == 0){
SCpnt727drivers/scsi/sd.c(SCpnt->host->unchecked_isa_dma)) {
SCpnt733drivers/scsi/sd.cthis_count = SCpnt->request.current_nr_sectors;
SCpnt737drivers/scsi/sd.cif (SCpnt->request.cmd == WRITE)
SCpnt738drivers/scsi/sd.cmemcpy(buff, (char *)SCpnt->request.buffer, this_count << 9);
SCpnt742drivers/scsi/sd.cprintk("sd%c : %s %d/%d 512 byte blocks.\n", 'a' + MINOR(SCpnt->request.dev),
SCpnt743drivers/scsi/sd.c(SCpnt->request.cmd == WRITE) ? "writing" : "reading",
SCpnt744drivers/scsi/sd.cthis_count, SCpnt->request.nr_sectors);
SCpnt747drivers/scsi/sd.ccmd[1] = (SCpnt->lun << 5) & 0xe0;
SCpnt793drivers/scsi/sd.cSCpnt->transfersize = rscsi_disks[dev].sector_size;
SCpnt794drivers/scsi/sd.cSCpnt->underflow = this_count << 9; 
SCpnt795drivers/scsi/sd.cscsi_do_cmd (SCpnt, (void *) cmd, buff, 
SCpnt798drivers/scsi/sd.c(SCpnt->device->type == TYPE_DISK ? 
SCpnt837drivers/scsi/sd.cstatic void sd_init_done (Scsi_Cmnd * SCpnt)
SCpnt841drivers/scsi/sd.creq = &SCpnt->request;
SCpnt855drivers/scsi/sd.cScsi_Cmnd * SCpnt;
SCpnt861drivers/scsi/sd.cSCpnt = allocate_device(NULL, rscsi_disks[i].device, 1);
SCpnt872drivers/scsi/sd.cSCpnt->request.dev = 0xffff;  /* Mark as really busy again */
SCpnt873drivers/scsi/sd.cSCpnt->cmd_len = 0;
SCpnt874drivers/scsi/sd.cSCpnt->sense_buffer[0] = 0;
SCpnt875drivers/scsi/sd.cSCpnt->sense_buffer[2] = 0;
SCpnt877drivers/scsi/sd.cscsi_do_cmd (SCpnt,
SCpnt882drivers/scsi/sd.cwhile(SCpnt->request.dev != 0xfffe);
SCpnt884drivers/scsi/sd.cthe_result = SCpnt->result;
SCpnt889drivers/scsi/sd.cSCpnt->sense_buffer[2] == NOT_READY) {
SCpnt898drivers/scsi/sd.cSCpnt->request.dev = 0xffff;  /* Mark as really busy again */
SCpnt899drivers/scsi/sd.cSCpnt->cmd_len = 0;
SCpnt900drivers/scsi/sd.cSCpnt->sense_buffer[0] = 0;
SCpnt901drivers/scsi/sd.cSCpnt->sense_buffer[2] = 0;
SCpnt903drivers/scsi/sd.cscsi_do_cmd (SCpnt,
SCpnt908drivers/scsi/sd.cwhile(SCpnt->request.dev != 0xfffe);
SCpnt933drivers/scsi/sd.cSCpnt->request.dev = 0xffff;  /* Mark as really busy again */
SCpnt934drivers/scsi/sd.cSCpnt->cmd_len = 0;
SCpnt935drivers/scsi/sd.cSCpnt->sense_buffer[0] = 0;
SCpnt936drivers/scsi/sd.cSCpnt->sense_buffer[2] = 0;
SCpnt938drivers/scsi/sd.cscsi_do_cmd (SCpnt,
SCpnt944drivers/scsi/sd.cwhile(SCpnt->request.dev != 0xfffe);
SCpnt946drivers/scsi/sd.cif (SCpnt->request.dev != 0xfffe){
SCpnt948drivers/scsi/sd.cSCpnt->request.sem = &sem;
SCpnt951drivers/scsi/sd.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt954drivers/scsi/sd.cthe_result = SCpnt->result;
SCpnt959drivers/scsi/sd.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt961drivers/scsi/sd.cwake_up(&SCpnt->device->device_wait); 
SCpnt989drivers/scsi/sd.cprintk("sd%c : extended sense code = %1x \n", 'a' + i, SCpnt->sense_buffer[2] & 0xf);
SCpnt1000drivers/scsi/sd.cSCpnt->sense_buffer[2] == NOT_READY)
SCpnt514drivers/scsi/seagate.cint seagate_st0x_queue_command (Scsi_Cmnd * SCpnt,  void (*done)(Scsi_Cmnd *))
SCpnt520drivers/scsi/seagate.ccurrent_target = SCpnt->target;
SCpnt521drivers/scsi/seagate.ccurrent_lun = SCpnt->lun;
SCpnt522drivers/scsi/seagate.c(const void *) current_cmnd = SCpnt->cmnd;
SCpnt523drivers/scsi/seagate.ccurrent_data = (unsigned char *) SCpnt->request_buffer;
SCpnt524drivers/scsi/seagate.ccurrent_bufflen = SCpnt->request_bufflen;
SCpnt525drivers/scsi/seagate.cSCint = SCpnt;
SCpnt536drivers/scsi/seagate.ccurrent_cmnd[SCpnt->cmd_len] |= 0x01;
SCpnt575drivers/scsi/seagate.cint seagate_st0x_command (Scsi_Cmnd * SCpnt) {
SCpnt576drivers/scsi/seagate.creturn internal_command (SCpnt->target, SCpnt->lun, SCpnt->cmnd, SCpnt->request_buffer,
SCpnt577drivers/scsi/seagate.cSCpnt->request_bufflen, 
SCpnt1551drivers/scsi/seagate.cint seagate_st0x_abort (Scsi_Cmnd * SCpnt)
SCpnt1562drivers/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;
SCpnt261drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt262drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt263drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt264drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt271drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt274drivers/scsi/st.cSCpnt->request.dev = -1;
SCpnt294drivers/scsi/st.cScsi_Cmnd *SCpnt;
SCpnt313drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt324drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt332drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt333drivers/scsi/st.cscsi_do_cmd (SCpnt,
SCpnt340drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt345drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt346drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x40) &&
SCpnt347drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) != VOLUME_OVERFLOW) {
SCpnt362drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt423drivers/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt459drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt460drivers/scsi/st.cif (!SCpnt) {
SCpnt465drivers/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt468drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt469drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt478drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt481drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt482drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == UNIT_ATTENTION) { /* New media? */
SCpnt484drivers/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt487drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt488drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt497drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt505drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt506drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == NO_TAPE) {
SCpnt514drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt527drivers/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt530drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt531drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt539drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt542drivers/scsi/st.cif (!SCpnt->result && !SCpnt->sense_buffer[0]) {
SCpnt561drivers/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt565drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt566drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt574drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt585drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt660drivers/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt679drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt681drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt685drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt686drivers/scsi/st.cscsi_do_cmd( SCpnt,
SCpnt694drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt699drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt703drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt751drivers/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt815drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt851drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt852drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt853drivers/scsi/st.cscsi_do_cmd (SCpnt,
SCpnt861drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt869drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt870drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x40)) {
SCpnt871drivers/scsi/st.cif (STp->block_size != 0 && (SCpnt->sense_buffer[0] & 0x80) != 0)
SCpnt872drivers/scsi/st.ctransfer = (SCpnt->sense_buffer[3] << 24) |
SCpnt873drivers/scsi/st.c(SCpnt->sense_buffer[4] << 16) |
SCpnt874drivers/scsi/st.c(SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6];
SCpnt876drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW)
SCpnt914drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt944drivers/scsi/st.cSCpnt->request.dev = -1;
SCpnt967drivers/scsi/st.cSCpnt->result = (STp->buffer)->last_result = -1;
SCpnt968drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt969drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt970drivers/scsi/st.cscsi_do_cmd (SCpnt,
SCpnt976drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt991drivers/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt1033drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt1062drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt1063drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt1064drivers/scsi/st.cscsi_do_cmd (SCpnt,
SCpnt1072drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt1083drivers/scsi/st.cSCpnt->sense_buffer[0], SCpnt->sense_buffer[1],
SCpnt1084drivers/scsi/st.cSCpnt->sense_buffer[2], SCpnt->sense_buffer[3],
SCpnt1085drivers/scsi/st.cSCpnt->sense_buffer[4], SCpnt->sense_buffer[5],
SCpnt1086drivers/scsi/st.cSCpnt->sense_buffer[6], SCpnt->sense_buffer[7]);
SCpnt1088drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70) { /* extended sense */
SCpnt1090drivers/scsi/st.cif ((SCpnt->sense_buffer[2] & 0xe0) != 0) { /* EOF, EOM, or ILI */
SCpnt1092drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x80) != 0)
SCpnt1093drivers/scsi/st.ctransfer = (SCpnt->sense_buffer[3] << 24) |
SCpnt1094drivers/scsi/st.c(SCpnt->sense_buffer[4] << 16) |
SCpnt1095drivers/scsi/st.c(SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6];
SCpnt1099drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == MEDIUM_ERROR)
SCpnt1102drivers/scsi/st.cif (SCpnt->sense_buffer[2] & 0x20) {
SCpnt1110drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt1114drivers/scsi/st.celse if (SCpnt->sense_buffer[2] & 0x40) {
SCpnt1127drivers/scsi/st.celse if (SCpnt->sense_buffer[2] & 0x80) {
SCpnt1147drivers/scsi/st.cSCpnt->request.dev = -1;
SCpnt1152drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == BLANK_CHECK) {
SCpnt1167drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt1202drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt1221drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt1283drivers/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt1599drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt1600drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt1601drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt1602drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt1610drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt1616drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt1664drivers/scsi/st.cif (SCpnt->sense_buffer[2] & 0x40) {
SCpnt1672drivers/scsi/st.c(SCpnt->sense_buffer[3] << 24) +
SCpnt1673drivers/scsi/st.c(SCpnt->sense_buffer[4] << 16) +
SCpnt1674drivers/scsi/st.c(SCpnt->sense_buffer[5] << 8) +
SCpnt1675drivers/scsi/st.cSCpnt->sense_buffer[6] );
SCpnt1688drivers/scsi/st.cif (SCpnt->sense_buffer[2] & 0x80) { /* Hit filemark */
SCpnt1700drivers/scsi/st.cif (SCpnt->sense_buffer[2] & 0x80) { /* Hit filemark */
SCpnt1716drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == BLANK_CHECK)
SCpnt1735drivers/scsi/st.cScsi_Cmnd *SCpnt;
SCpnt1847drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt1849drivers/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt1859drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt1860drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt1861drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt1869drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt1895drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt53drivers/scsi/st.hScsi_Cmnd SCpnt;
SCpnt238drivers/scsi/u14-34f.cScsi_Cmnd *SCpnt;
SCpnt527drivers/scsi/u14-34f.cstatic inline void build_sg_list(struct mscp *cpp, Scsi_Cmnd *SCpnt) {
SCpnt531drivers/scsi/u14-34f.csgpnt = (struct scatterlist *) SCpnt->request_buffer;
SCpnt533drivers/scsi/u14-34f.cfor (k = 0; k < SCpnt->use_sg; k++) {
SCpnt539drivers/scsi/u14-34f.ccpp->use_sg = SCpnt->use_sg;
SCpnt544drivers/scsi/u14-34f.cint u14_34f_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) {
SCpnt551drivers/scsi/u14-34f.cj = ((struct hostdata *) SCpnt->host->hostdata)->board_number;
SCpnt553drivers/scsi/u14-34f.cif (!done) panic("%s: qcomm, pid %ld, null done.\n", BN(j), SCpnt->pid);
SCpnt574drivers/scsi/u14-34f.celse if (u14_34f_reset(SCpnt) == SCSI_RESET_SUCCESS) 
SCpnt577drivers/scsi/u14-34f.cSCpnt->result = DID_BUS_BUSY << 16; 
SCpnt578drivers/scsi/u14-34f.cSCpnt->host_scribble = NULL;
SCpnt579drivers/scsi/u14-34f.cprintk("%s: qcomm, pid %ld, DID_BUS_BUSY, done.\n", BN(j), SCpnt->pid);
SCpnt581drivers/scsi/u14-34f.cdone(SCpnt);    
SCpnt589drivers/scsi/u14-34f.cSCpnt->scsi_done = done;
SCpnt591drivers/scsi/u14-34f.cSCpnt->host_scribble = (unsigned char *) &cpp->index;
SCpnt594drivers/scsi/u14-34f.cBN(j), i, SCpnt->target, SCpnt->pid);
SCpnt598drivers/scsi/u14-34f.ccpp->target = SCpnt->target;
SCpnt599drivers/scsi/u14-34f.ccpp->lun = SCpnt->lun;
SCpnt600drivers/scsi/u14-34f.ccpp->SCpnt = SCpnt;
SCpnt601drivers/scsi/u14-34f.ccpp->sense_addr = (unsigned int) SCpnt->sense_buffer;
SCpnt602drivers/scsi/u14-34f.ccpp->sense_len = sizeof SCpnt->sense_buffer;
SCpnt604drivers/scsi/u14-34f.cif (SCpnt->use_sg) {
SCpnt606drivers/scsi/u14-34f.cbuild_sg_list(cpp, SCpnt);
SCpnt609drivers/scsi/u14-34f.ccpp->data_address = (unsigned int)SCpnt->request_buffer;
SCpnt610drivers/scsi/u14-34f.ccpp->data_len = SCpnt->request_bufflen;
SCpnt613drivers/scsi/u14-34f.ccpp->scsi_cdbs_len = SCpnt->cmd_len;
SCpnt614drivers/scsi/u14-34f.cmemcpy(cpp->scsi_cdbs, SCpnt->cmnd, cpp->scsi_cdbs_len);
SCpnt617drivers/scsi/u14-34f.cSCpnt->result = DID_ERROR << 16;
SCpnt618drivers/scsi/u14-34f.cSCpnt->host_scribble = NULL;
SCpnt620drivers/scsi/u14-34f.cBN(j), SCpnt->target, SCpnt->pid);
SCpnt622drivers/scsi/u14-34f.cdone(SCpnt);
SCpnt672drivers/scsi/u14-34f.cif (SCarg != HD(j)->cp[i].SCpnt)
SCpnt674drivers/scsi/u14-34f.cBN(j), i, SCarg, HD(j)->cp[i].SCpnt);
SCpnt698drivers/scsi/u14-34f.cScsi_Cmnd *SCpnt;
SCpnt735drivers/scsi/u14-34f.cSCpnt = HD(j)->cp[i].SCpnt;
SCpnt738drivers/scsi/u14-34f.cBN(j), i, SCpnt->pid);
SCpnt740drivers/scsi/u14-34f.cif (SCpnt == NULL)
SCpnt743drivers/scsi/u14-34f.cif (SCpnt->host_scribble == NULL)
SCpnt746drivers/scsi/u14-34f.cif (*(unsigned int *)SCpnt->host_scribble != i) 
SCpnt749drivers/scsi/u14-34f.cif (SCpnt->scsi_done == NULL) 
SCpnt752drivers/scsi/u14-34f.cif (SCpnt == SCarg) arg_done = TRUE;
SCpnt780drivers/scsi/u14-34f.cSCpnt = HD(j)->cp[i].SCpnt;
SCpnt781drivers/scsi/u14-34f.cSCpnt->result = DID_RESET << 16;
SCpnt782drivers/scsi/u14-34f.cSCpnt->host_scribble = NULL;
SCpnt788drivers/scsi/u14-34f.cBN(j), i, SCpnt->pid);
SCpnt790drivers/scsi/u14-34f.cSCpnt->scsi_done(SCpnt);
SCpnt819drivers/scsi/u14-34f.cScsi_Cmnd *SCpnt;
SCpnt881drivers/scsi/u14-34f.cSCpnt = spp->SCpnt;
SCpnt883drivers/scsi/u14-34f.cif (SCpnt == NULL) 
SCpnt886drivers/scsi/u14-34f.cif (SCpnt->host_scribble == NULL) 
SCpnt888drivers/scsi/u14-34f.cBN(j), i, SCpnt->pid, SCpnt);
SCpnt890drivers/scsi/u14-34f.cif (*(unsigned int *)SCpnt->host_scribble != i) 
SCpnt892drivers/scsi/u14-34f.c" irq %d.\n", BN(j), i, SCpnt->pid, 
SCpnt893drivers/scsi/u14-34f.c*(unsigned int *)SCpnt->host_scribble, irq);
SCpnt901drivers/scsi/u14-34f.cif (tstatus == BUSY && SCpnt->device->type != TYPE_TAPE) 
SCpnt906drivers/scsi/u14-34f.c&& SCpnt->device->type == TYPE_DISK
SCpnt907drivers/scsi/u14-34f.c&& HD(j)->target_reset[SCpnt->target])
SCpnt912drivers/scsi/u14-34f.c&& SCpnt->device->type == TYPE_DISK
SCpnt913drivers/scsi/u14-34f.c&& (SCpnt->sense_buffer[2] & 0xf) == RECOVERED_ERROR)
SCpnt920drivers/scsi/u14-34f.cHD(j)->target_reset[SCpnt->target] = FALSE;
SCpnt922drivers/scsi/u14-34f.cif (spp->target_status && SCpnt->device->type == TYPE_DISK)
SCpnt925drivers/scsi/u14-34f.cSCpnt->target, SCpnt->lun, SCpnt->pid,
SCpnt926drivers/scsi/u14-34f.cspp->target_status, SCpnt->sense_buffer[2]);
SCpnt928drivers/scsi/u14-34f.cHD(j)->target_time_out[SCpnt->target] = 0;
SCpnt933drivers/scsi/u14-34f.cif (HD(j)->target_time_out[SCpnt->target] > 1)
SCpnt937drivers/scsi/u14-34f.cHD(j)->target_time_out[SCpnt->target]++;
SCpnt947drivers/scsi/u14-34f.cif (SCpnt->device->type != TYPE_TAPE)
SCpnt968drivers/scsi/u14-34f.cSCpnt->result = status | spp->target_status;
SCpnt974drivers/scsi/u14-34f.cif (SCpnt->result || do_trace) 
SCpnt984drivers/scsi/u14-34f.cSCpnt->target, SCpnt->lun, SCpnt->pid, HD(j)->iocount);
SCpnt987drivers/scsi/u14-34f.cSCpnt->host_scribble = NULL;
SCpnt990drivers/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)