taglinefilesource code
SCpnt778drivers/scsi/aha152x.cint aha152x_queue( Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt794drivers/scsi/aha152x.cprintk( "SCpnt (target = %d lun = %d cmnd = ", SCpnt->target, SCpnt->lun);
SCpnt795drivers/scsi/aha152x.cprint_command(SCpnt->cmnd);
SCpnt797drivers/scsi/aha152x.cSCpnt->cmd_len, SCpnt->use_sg, SCpnt->request_bufflen );
SCpnt802drivers/scsi/aha152x.cSCpnt->scsi_done =       done;
SCpnt810drivers/scsi/aha152x.cSCpnt->SCp.phase = not_issued;
SCpnt811drivers/scsi/aha152x.cif (SCpnt->use_sg)
SCpnt813drivers/scsi/aha152x.cSCpnt->SCp.buffer           = (struct scatterlist *)SCpnt->request_buffer;
SCpnt814drivers/scsi/aha152x.cSCpnt->SCp.ptr              = SCpnt->SCp.buffer->address;
SCpnt815drivers/scsi/aha152x.cSCpnt->SCp.this_residual    = SCpnt->SCp.buffer->length;
SCpnt816drivers/scsi/aha152x.cSCpnt->SCp.buffers_residual = SCpnt->use_sg - 1;
SCpnt820drivers/scsi/aha152x.cSCpnt->SCp.ptr              = (char *)SCpnt->request_buffer;
SCpnt821drivers/scsi/aha152x.cSCpnt->SCp.this_residual    = SCpnt->request_bufflen;
SCpnt822drivers/scsi/aha152x.cSCpnt->SCp.buffer           = NULL;
SCpnt823drivers/scsi/aha152x.cSCpnt->SCp.buffers_residual = 0;
SCpnt826drivers/scsi/aha152x.cSCpnt->SCp.Status              = CHECK_CONDITION;
SCpnt827drivers/scsi/aha152x.cSCpnt->SCp.Message             = 0;
SCpnt828drivers/scsi/aha152x.cSCpnt->SCp.have_data_in        = 0;
SCpnt829drivers/scsi/aha152x.cSCpnt->SCp.sent_command        = 0;
SCpnt842drivers/scsi/aha152x.cappend_SC( &issue_SC, SCpnt);
SCpnt862drivers/scsi/aha152x.cint aha152x_command( Scsi_Cmnd *SCpnt )
SCpnt872drivers/scsi/aha152x.cint aha152x_abort( Scsi_Cmnd *SCpnt)
SCpnt883drivers/scsi/aha152x.cprintk("aha152x: abort(), SCpnt=0x%08x, ", (unsigned int) SCpnt );
SCpnt891drivers/scsi/aha152x.cptr && ptr!=SCpnt;
SCpnt912drivers/scsi/aha152x.cif ( TESTLO(SSTAT1, BUSFREE) || (current_SC && current_SC!=SCpnt))
SCpnt937drivers/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)
SCpnt686drivers/scsi/aha1542.creturn SCpnt->result;
SCpnt1098drivers/scsi/aha1542.cint aha1542_abort(Scsi_Cmnd * SCpnt)
SCpnt1107drivers/scsi/aha1542.cinb(STATUS(SCpnt->host->io_port)),
SCpnt1108drivers/scsi/aha1542.cinb(INTRFLAGS(SCpnt->host->io_port)));
SCpnt1112drivers/scsi/aha1542.cmb = HOSTDATA(SCpnt->host)->mb;
SCpnt1113drivers/scsi/aha1542.cmbi = HOSTDATA(SCpnt->host)->aha1542_last_mbi_used + 1;
SCpnt1120drivers/scsi/aha1542.c} while (mbi != HOSTDATA(SCpnt->host)->aha1542_last_mbi_used);
SCpnt1125drivers/scsi/aha1542.cSCpnt->host->irq);
SCpnt1126drivers/scsi/aha1542.caha1542_intr_handle(SCpnt->host->irq, NULL);
SCpnt1134drivers/scsi/aha1542.cif(HOSTDATA(SCpnt->host)->SCint[i])
SCpnt1136drivers/scsi/aha1542.cif(HOSTDATA(SCpnt->host)->SCint[i] == SCpnt) {
SCpnt1137drivers/scsi/aha1542.cprintk("Timed out command pending for %4.4x\n", SCpnt->request.dev);
SCpnt1138drivers/scsi/aha1542.cif (HOSTDATA(SCpnt->host)->mb[i].status) {
SCpnt1140drivers/scsi/aha1542.caha1542_out(SCpnt->host->io_port, &ahacmd, 1);
SCpnt1143drivers/scsi/aha1542.cprintk("Other pending command %4.4x\n", SCpnt->request.dev);
SCpnt1153drivers/scsi/aha1542.cif (SCpnt == HOSTDATA(SCpnt->host)->SCint[mbo]){
SCpnt1155drivers/scsi/aha1542.caha1542_out(SCpnt->host->io_port, &ahacmd, 1); /* start scsi command */
SCpnt1169drivers/scsi/aha1542.cint aha1542_reset(Scsi_Cmnd * SCpnt)
SCpnt1177drivers/scsi/aha1542.coutb(SCRST, CONTROL(SCpnt->host->io_port));
SCpnt1182drivers/scsi/aha1542.cif(HOSTDATA(SCpnt->host)->SCint[i] == SCpnt)
SCpnt1184drivers/scsi/aha1542.cHOSTDATA(SCpnt->host)->ccb[i].op = 0x81;  /* BUS DEVICE RESET */
SCpnt1186drivers/scsi/aha1542.caha1542_out(SCpnt->host->io_port, &ahacmd, 1);
SCpnt1192drivers/scsi/aha1542.cprintk("Sent BUS DEVICE RESET to target %d\n", SCpnt->target);
SCpnt1199drivers/scsi/aha1542.cif(HOSTDATA(SCpnt->host)->SCint[i] &&
SCpnt1200drivers/scsi/aha1542.cHOSTDATA(SCpnt->host)->SCint[i]->target == SCpnt->target)
SCpnt1203drivers/scsi/aha1542.cSCtmp = HOSTDATA(SCpnt->host)->SCint[i];
SCpnt1206drivers/scsi/aha1542.cprintk("Sending DID_RESET for target %d\n", SCpnt->target);
SCpnt1207drivers/scsi/aha1542.cSCtmp->scsi_done(SCpnt);
SCpnt1209drivers/scsi/aha1542.cHOSTDATA(SCpnt->host)->SCint[i] = NULL;
SCpnt1210drivers/scsi/aha1542.cHOSTDATA(SCpnt->host)->mb[i].status = 0;
SCpnt200drivers/scsi/aha1740.cSCtmp = ecbptr->SCpnt;
SCpnt246drivers/scsi/aha1740.cint aha1740_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt249drivers/scsi/aha1740.cunchar *cmd = (unchar *) SCpnt->cmnd;
SCpnt250drivers/scsi/aha1740.cunchar target = SCpnt->target;
SCpnt252drivers/scsi/aha1740.cvoid *buff = SCpnt->request_buffer;
SCpnt253drivers/scsi/aha1740.cint bufflen = SCpnt->request_bufflen;
SCpnt260drivers/scsi/aha1740.cif (bufflen != sizeof(SCpnt->sense_buffer))
SCpnt264drivers/scsi/aha1740.cSCpnt->result = 0;
SCpnt265drivers/scsi/aha1740.cdone(SCpnt); 
SCpnt278drivers/scsi/aha1740.cfor (i = 0; i < SCpnt->cmd_len; i++) printk("%02x ", cmd[i]);
SCpnt308drivers/scsi/aha1740.cecb[ecbno].cdblen = SCpnt->cmd_len;  /* SCSI Command Descriptor Block Length */
SCpnt318drivers/scsi/aha1740.cif (SCpnt->use_sg)
SCpnt327drivers/scsi/aha1740.cSCpnt->host_scribble = (unsigned char *) scsi_malloc(512);
SCpnt328drivers/scsi/aha1740.csgpnt = (struct scatterlist *) SCpnt->request_buffer;
SCpnt329drivers/scsi/aha1740.ccptr = (struct aha1740_chain *) SCpnt->host_scribble; 
SCpnt331drivers/scsi/aha1740.cfor(i=0; i<SCpnt->use_sg; i++)
SCpnt336drivers/scsi/aha1740.cecb[ecbno].datalen = SCpnt->use_sg * sizeof(struct aha1740_chain);
SCpnt346drivers/scsi/aha1740.cSCpnt->host_scribble = NULL;
SCpnt350drivers/scsi/aha1740.cecb[ecbno].lun = SCpnt->lun;
SCpnt358drivers/scsi/aha1740.cecb[ecbno].SCpnt = SCpnt;
SCpnt409drivers/scsi/aha1740.cstatic void internal_done(Scsi_Cmnd * SCpnt)
SCpnt411drivers/scsi/aha1740.cinternal_done_errcode = SCpnt->result;
SCpnt415drivers/scsi/aha1740.cint aha1740_command(Scsi_Cmnd * SCpnt)
SCpnt417drivers/scsi/aha1740.caha1740_queuecommand(SCpnt, internal_done);
SCpnt484drivers/scsi/aha1740.cint aha1740_abort(Scsi_Cmnd * SCpnt)
SCpnt494drivers/scsi/aha1740.cint aha1740_reset(Scsi_Cmnd * SCpnt)
SCpnt142drivers/scsi/aha1740.hScsi_Cmnd *SCpnt;    /* Link to the SCSI Command Block */
SCpnt379drivers/scsi/constants.cvoid print_sense(char * devclass, Scsi_Cmnd * SCpnt)
SCpnt383drivers/scsi/constants.cunsigned char * sense_buffer = SCpnt->sense_buffer;
SCpnt385drivers/scsi/constants.cint dev = SCpnt->request.dev;
SCpnt393drivers/scsi/constants.cif(s > sizeof(SCpnt->sense_buffer)) s = sizeof(SCpnt->sense_buffer);
SCpnt255drivers/scsi/eata.cScsi_Cmnd *SCpnt;           /* Address set in cp */
SCpnt282drivers/scsi/eata.cScsi_Cmnd *SCpnt;     /* Address to be returned is sp */
SCpnt582drivers/scsi/eata.cstatic inline void build_sg_list(struct mscp *cpp, Scsi_Cmnd *SCpnt) {
SCpnt586drivers/scsi/eata.csgpnt = (struct scatterlist *) SCpnt->request_buffer;
SCpnt588drivers/scsi/eata.cfor (k = 0; k < SCpnt->use_sg; k++) {
SCpnt594drivers/scsi/eata.ccpp->data_len = htonl((SCpnt->use_sg * sizeof(struct sg_list)));
SCpnt597drivers/scsi/eata.cint eata2x_queuecommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) {
SCpnt611drivers/scsi/eata.cj = ((struct hostdata *) SCpnt->host->hostdata)->board_number;
SCpnt613drivers/scsi/eata.cif (!done) panic("%s: qcomm, pid %ld, null done.\n", BN(j), SCpnt->pid);
SCpnt634drivers/scsi/eata.celse if (eata2x_reset(SCpnt) == SCSI_RESET_SUCCESS) 
SCpnt637drivers/scsi/eata.cSCpnt->result = DID_BUS_BUSY << 16; 
SCpnt638drivers/scsi/eata.cSCpnt->host_scribble = NULL;
SCpnt639drivers/scsi/eata.cprintk("%s: qcomm, pid %ld, DID_BUS_BUSY, done.\n", BN(j), SCpnt->pid);
SCpnt641drivers/scsi/eata.cdone(SCpnt);    
SCpnt658drivers/scsi/eata.cSCpnt->scsi_done = done;
SCpnt660drivers/scsi/eata.cSCpnt->host_scribble = (unsigned char *) &cpp->index;
SCpnt663drivers/scsi/eata.cBN(j), i, SCpnt->target, SCpnt->pid);
SCpnt666drivers/scsi/eata.cif (SCpnt->cmnd[0] == data_out_cmds[k]) {
SCpnt675drivers/scsi/eata.ccpp->target = SCpnt->target;
SCpnt676drivers/scsi/eata.ccpp->lun = SCpnt->lun;  
SCpnt677drivers/scsi/eata.ccpp->SCpnt = SCpnt;
SCpnt678drivers/scsi/eata.ccpp->sense_addr = htonl((unsigned int) SCpnt->sense_buffer); 
SCpnt679drivers/scsi/eata.ccpp->sense_len = sizeof SCpnt->sense_buffer;
SCpnt681drivers/scsi/eata.cif (SCpnt->use_sg) {
SCpnt683drivers/scsi/eata.cbuild_sg_list(cpp, SCpnt);
SCpnt686drivers/scsi/eata.ccpp->data_address = htonl((unsigned int) SCpnt->request_buffer);
SCpnt687drivers/scsi/eata.ccpp->data_len = htonl(SCpnt->request_bufflen);
SCpnt690drivers/scsi/eata.cmemcpy(cpp->cdb, SCpnt->cmnd, SCpnt->cmd_len);
SCpnt694drivers/scsi/eata.cSCpnt->result = DID_ERROR << 16; 
SCpnt695drivers/scsi/eata.cSCpnt->host_scribble = NULL;
SCpnt697drivers/scsi/eata.cBN(j), SCpnt->target, SCpnt->pid);
SCpnt699drivers/scsi/eata.cdone(SCpnt);    
SCpnt743drivers/scsi/eata.cif (SCarg != HD(j)->cp[i].SCpnt)
SCpnt745drivers/scsi/eata.cBN(j), i, SCarg, HD(j)->cp[i].SCpnt);
SCpnt769drivers/scsi/eata.cScsi_Cmnd *SCpnt;
SCpnt806drivers/scsi/eata.cSCpnt = HD(j)->cp[i].SCpnt;
SCpnt809drivers/scsi/eata.cBN(j), i, SCpnt->pid);
SCpnt811drivers/scsi/eata.cif (SCpnt == NULL)
SCpnt814drivers/scsi/eata.cif (SCpnt->host_scribble == NULL)
SCpnt817drivers/scsi/eata.cif (*(unsigned int *)SCpnt->host_scribble != i) 
SCpnt820drivers/scsi/eata.cif (SCpnt->scsi_done == NULL) 
SCpnt823drivers/scsi/eata.cif (SCpnt == SCarg) arg_done = TRUE;
SCpnt850drivers/scsi/eata.cSCpnt = HD(j)->cp[i].SCpnt;
SCpnt851drivers/scsi/eata.cSCpnt->result = DID_RESET << 16;
SCpnt852drivers/scsi/eata.cSCpnt->host_scribble = NULL;
SCpnt858drivers/scsi/eata.cBN(j), i, SCpnt->pid);
SCpnt860drivers/scsi/eata.cSCpnt->scsi_done(SCpnt);
SCpnt879drivers/scsi/eata.cScsi_Cmnd *SCpnt;
SCpnt945drivers/scsi/eata.cSCpnt = spp->SCpnt;
SCpnt947drivers/scsi/eata.cif (SCpnt == NULL)
SCpnt950drivers/scsi/eata.cif (SCpnt != cpp->SCpnt)
SCpnt952drivers/scsi/eata.cBN(j), i, SCpnt, cpp->SCpnt);
SCpnt954drivers/scsi/eata.cif (SCpnt->host_scribble == NULL)
SCpnt956drivers/scsi/eata.cBN(j), i, SCpnt->pid, SCpnt);
SCpnt958drivers/scsi/eata.cif (*(unsigned int *)SCpnt->host_scribble != i) 
SCpnt960drivers/scsi/eata.c" irq %d.\n", BN(j), i, SCpnt->pid, 
SCpnt961drivers/scsi/eata.c*(unsigned int *)SCpnt->host_scribble, irq);
SCpnt969drivers/scsi/eata.cif (tstatus == BUSY && SCpnt->device->type != TYPE_TAPE) 
SCpnt974drivers/scsi/eata.c&& SCpnt->device->type == TYPE_DISK
SCpnt975drivers/scsi/eata.c&& HD(j)->target_reset[SCpnt->target])
SCpnt980drivers/scsi/eata.c&& SCpnt->device->type == TYPE_DISK
SCpnt981drivers/scsi/eata.c&& (SCpnt->sense_buffer[2] & 0xf) == RECOVERED_ERROR)
SCpnt988drivers/scsi/eata.cHD(j)->target_reset[SCpnt->target] = FALSE;
SCpnt990drivers/scsi/eata.cif (spp->target_status && SCpnt->device->type == TYPE_DISK)
SCpnt993drivers/scsi/eata.cSCpnt->target, SCpnt->lun, SCpnt->pid,
SCpnt994drivers/scsi/eata.cspp->target_status, SCpnt->sense_buffer[2]);
SCpnt996drivers/scsi/eata.cHD(j)->target_time_out[SCpnt->target] = 0;
SCpnt1002drivers/scsi/eata.cif (HD(j)->target_time_out[SCpnt->target] > 1)
SCpnt1006drivers/scsi/eata.cHD(j)->target_time_out[SCpnt->target]++;
SCpnt1013drivers/scsi/eata.cif (SCpnt->device->type != TYPE_TAPE)
SCpnt1035drivers/scsi/eata.cSCpnt->result = status | spp->target_status;
SCpnt1041drivers/scsi/eata.cif (SCpnt->result || do_trace)
SCpnt1051drivers/scsi/eata.cSCpnt->target, SCpnt->lun, SCpnt->pid, HD(j)->iocount);
SCpnt1054drivers/scsi/eata.cSCpnt->host_scribble = NULL;
SCpnt1057drivers/scsi/eata.cSCpnt->scsi_done(SCpnt);
SCpnt105drivers/scsi/eata_dma.cvoid eata_scsi_done (Scsi_Cmnd * SCpnt)
SCpnt93drivers/scsi/eata_pio.cvoid eata_pio_scsi_done (Scsi_Cmnd * SCpnt)
SCpnt1540drivers/scsi/fdomain.cint fdomain_16x0_queue( Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt1547drivers/scsi/fdomain.cSCpnt->target,
SCpnt1548drivers/scsi/fdomain.c*(unsigned char *)SCpnt->cmnd,
SCpnt1549drivers/scsi/fdomain.cSCpnt->use_sg,
SCpnt1550drivers/scsi/fdomain.cSCpnt->request_bufflen );
SCpnt1555drivers/scsi/fdomain.ccurrent_SC            = SCpnt; /* Save this for the done function */
SCpnt1598drivers/scsi/fdomain.cstatic void internal_done( Scsi_Cmnd *SCpnt )
SCpnt1600drivers/scsi/fdomain.cinternal_done_errcode = SCpnt->result;
SCpnt1604drivers/scsi/fdomain.cint fdomain_16x0_command( Scsi_Cmnd *SCpnt )
SCpnt1606drivers/scsi/fdomain.cfdomain_16x0_queue( SCpnt, internal_done );
SCpnt1616drivers/scsi/fdomain.cvoid print_info( Scsi_Cmnd *SCpnt )
SCpnt1622drivers/scsi/fdomain.cif (!SCpnt || !SCpnt->host) {
SCpnt1626drivers/scsi/fdomain.cprintk( "%s\n", fdomain_16x0_info( SCpnt->host ) );
SCpnt1627drivers/scsi/fdomain.cprint_banner( SCpnt->host );
SCpnt1628drivers/scsi/fdomain.cswitch (SCpnt->SCp.phase) {
SCpnt1636drivers/scsi/fdomain.cSCpnt->SCp.phase,
SCpnt1637drivers/scsi/fdomain.cSCpnt->target,
SCpnt1638drivers/scsi/fdomain.c*(unsigned char *)SCpnt->cmnd,
SCpnt1639drivers/scsi/fdomain.cSCpnt->use_sg,
SCpnt1640drivers/scsi/fdomain.cSCpnt->request_bufflen );
SCpnt1642drivers/scsi/fdomain.cSCpnt->SCp.sent_command,
SCpnt1643drivers/scsi/fdomain.cSCpnt->SCp.have_data_in,
SCpnt1644drivers/scsi/fdomain.cSCpnt->timeout );
SCpnt1685drivers/scsi/fdomain.cint fdomain_16x0_abort( Scsi_Cmnd *SCpnt)
SCpnt1703drivers/scsi/fdomain.cprint_info( SCpnt );
SCpnt1720drivers/scsi/fdomain.cint fdomain_16x0_reset( Scsi_Cmnd *SCpnt )
SCpnt1727drivers/scsi/fdomain.cif (SCpnt) printk( "fdomain: SCSI Bus Reset\n" );
SCpnt412drivers/scsi/in2000.cint in2000_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt415drivers/scsi/in2000.cunchar *cmd = (unchar *) SCpnt->cmnd;
SCpnt416drivers/scsi/in2000.cunchar target = SCpnt->target;
SCpnt417drivers/scsi/in2000.cvoid *buff = SCpnt->request_buffer;
SCpnt419drivers/scsi/in2000.cint bufflen = SCpnt->request_bufflen;
SCpnt446drivers/scsi/in2000.cfor (i = 0; i < SCpnt->cmd_len; i++) printk("%02x ", cmd[i]);
SCpnt452drivers/scsi/in2000.csize = SCpnt->cmd_len;  /* CDB length */ 
SCpnt491drivers/scsi/in2000.cSCpnt->result = DID_TIME_OUT << 16;
SCpnt492drivers/scsi/in2000.c(*done)(SCpnt);
SCpnt496drivers/scsi/in2000.cin2000_nsegment = SCpnt->use_sg;
SCpnt498drivers/scsi/in2000.cif(SCpnt->use_sg){
SCpnt508drivers/scsi/in2000.cin2000_SCptr = SCpnt;
SCpnt516drivers/scsi/in2000.coutb(SCpnt->lun & 7,INDATA);
SCpnt517drivers/scsi/in2000.cSCpnt->host_scribble = NULL;
SCpnt561drivers/scsi/in2000.cstatic void internal_done(Scsi_Cmnd * SCpnt)
SCpnt563drivers/scsi/in2000.cinternal_done_errcode = SCpnt->result;
SCpnt567drivers/scsi/in2000.cint in2000_command(Scsi_Cmnd * SCpnt)
SCpnt569drivers/scsi/in2000.cin2000_queuecommand(SCpnt, internal_done);
SCpnt648drivers/scsi/in2000.cint in2000_abort(Scsi_Cmnd * SCpnt)
SCpnt665drivers/scsi/in2000.cint in2000_reset(Scsi_Cmnd * SCpnt)
SCpnt682drivers/scsi/in2000.cif(SCpnt) SCpnt->flags |= NEEDS_JUMPSTART;
SCpnt63drivers/scsi/scsi.cstatic void scsi_done (Scsi_Cmnd *SCpnt);
SCpnt66drivers/scsi/scsi.cstatic void scsi_times_out (Scsi_Cmnd * SCpnt, int pid);
SCpnt327drivers/scsi/scsi.cstatic void scan_scsis_done (Scsi_Cmnd * SCpnt)
SCpnt331drivers/scsi/scsi.cprintk ("scan_scsis_done(%p, %06x)\n", SCpnt->host, SCpnt->result);
SCpnt333drivers/scsi/scsi.cSCpnt->request.dev = 0xfffe;
SCpnt335drivers/scsi/scsi.cif (SCpnt->request.sem != NULL)
SCpnt336drivers/scsi/scsi.cup(SCpnt->request.sem);
SCpnt371drivers/scsi/scsi.cScsi_Cmnd  *SCpnt;
SCpnt376drivers/scsi/scsi.cSCpnt = (Scsi_Cmnd *) scsi_init_malloc(sizeof(Scsi_Cmnd), GFP_ATOMIC|GFP_DMA);
SCpnt391drivers/scsi/scsi.cshpnt->host_queue = SCpnt; /* We need this so that commands can time out */
SCpnt435drivers/scsi/scsi.cmemset(SCpnt, 0,  sizeof(Scsi_Cmnd));
SCpnt436drivers/scsi/scsi.cSCpnt->host = SDpnt->host;
SCpnt437drivers/scsi/scsi.cSCpnt->device = SDpnt;
SCpnt438drivers/scsi/scsi.cSCpnt->target = SDpnt->id;
SCpnt439drivers/scsi/scsi.cSCpnt->lun = SDpnt->lun;
SCpnt440drivers/scsi/scsi.cSCpnt->channel = SDpnt->channel;
SCpnt443drivers/scsi/scsi.cSCpnt->request.sem = NULL;
SCpnt445drivers/scsi/scsi.cSCpnt->request.dev = 0xffff; /* Mark not busy */
SCpnt447drivers/scsi/scsi.cscsi_do_cmd (SCpnt, (void *)  scsi_cmd, 
SCpnt457drivers/scsi/scsi.cwhile (SCpnt->request.dev != 0xfffe) 
SCpnt459drivers/scsi/scsi.celse if (SCpnt->request.dev != 0xfffe) {
SCpnt462drivers/scsi/scsi.cSCpnt->request.sem = &sem;
SCpnt466drivers/scsi/scsi.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt471drivers/scsi/scsi.cprintk("scsi: return code %08x\n", SCpnt->result);
SCpnt474drivers/scsi/scsi.cif(SCpnt->result) {
SCpnt475drivers/scsi/scsi.cif (((driver_byte(SCpnt->result) & DRIVER_SENSE) ||
SCpnt476drivers/scsi/scsi.c(status_byte(SCpnt->result) & CHECK_CONDITION)) &&
SCpnt477drivers/scsi/scsi.c((SCpnt->sense_buffer[0] & 0x70) >> 4) == 7) {
SCpnt478drivers/scsi/scsi.cif (SCpnt->sense_buffer[2] &0xe0)
SCpnt480drivers/scsi/scsi.cif(((SCpnt->sense_buffer[2] & 0xf) != NOT_READY) &&
SCpnt481drivers/scsi/scsi.c((SCpnt->sense_buffer[2] & 0xf) != UNIT_ATTENTION))
SCpnt502drivers/scsi/scsi.cSCpnt->request.dev = 0xffff; /* Mark not busy */
SCpnt503drivers/scsi/scsi.cSCpnt->cmd_len = 0;
SCpnt505drivers/scsi/scsi.cscsi_do_cmd (SCpnt, (void *)  scsi_cmd, 
SCpnt510drivers/scsi/scsi.cwhile (SCpnt->request.dev != 0xfffe) 
SCpnt512drivers/scsi/scsi.celse if (SCpnt->request.dev != 0xfffe) {
SCpnt515drivers/scsi/scsi.cSCpnt->request.sem = &sem;
SCpnt519drivers/scsi/scsi.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt522drivers/scsi/scsi.cthe_result = SCpnt->result;
SCpnt673drivers/scsi/scsi.cSCpnt->request.dev = 0xffff; /* Mark not busy */
SCpnt674drivers/scsi/scsi.cSCpnt->cmd_len = 0;
SCpnt676drivers/scsi/scsi.cscsi_do_cmd (SCpnt, (void *)  scsi_cmd,
SCpnt681drivers/scsi/scsi.cwhile (SCpnt->request.dev != 0xfffe);
SCpnt682drivers/scsi/scsi.celse if (SCpnt->request.dev != 0xfffe) {
SCpnt685drivers/scsi/scsi.cSCpnt->request.sem = &sem;
SCpnt689drivers/scsi/scsi.cwhile (SCpnt->request.dev != 0xfffe) 
SCpnt760drivers/scsi/scsi.cif(SCpnt != NULL)
SCpnt761drivers/scsi/scsi.cscsi_init_free((char *) SCpnt, sizeof(Scsi_Cmnd));
SCpnt784drivers/scsi/scsi.cstatic void scsi_times_out (Scsi_Cmnd * SCpnt, int pid)
SCpnt787drivers/scsi/scsi.cswitch (SCpnt->internal_timeout & (IN_ABORT | IN_RESET))
SCpnt796drivers/scsi/scsi.cif (!scsi_abort (SCpnt, DID_TIME_OUT, pid))
SCpnt800drivers/scsi/scsi.cSCpnt->host->host_no);
SCpnt801drivers/scsi/scsi.cif (!scsi_reset (SCpnt))
SCpnt809drivers/scsi/scsi.cprintk("Unable to reset scsi host %d - ", SCpnt->host->host_no);
SCpnt829drivers/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt840drivers/scsi/scsi.cSCpnt =  device->host->host_queue;
SCpnt848drivers/scsi/scsi.cSCpnt = device->host->host_queue;
SCpnt850drivers/scsi/scsi.cwhile(SCpnt){
SCpnt851drivers/scsi/scsi.cif(SCpnt->target == device->id &&
SCpnt852drivers/scsi/scsi.cSCpnt->lun == device->lun) {
SCpnt853drivers/scsi/scsi.cif(SCpnt->request.dev < 0) break;
SCpnt855drivers/scsi/scsi.cSCpnt = SCpnt->next;
SCpnt858drivers/scsi/scsi.cwhile(SCpnt){
SCpnt859drivers/scsi/scsi.cif(SCpnt->target == device->id) {
SCpnt860drivers/scsi/scsi.cif (SCpnt->lun == device->lun) {
SCpnt862drivers/scsi/scsi.c&& SCpnt->request.dev < 0) 
SCpnt864drivers/scsi/scsi.cfound=SCpnt;
SCpnt867drivers/scsi/scsi.cif(SCpnt->request.dev >= 0) {
SCpnt876drivers/scsi/scsi.cSCpnt = SCpnt->next;
SCpnt878drivers/scsi/scsi.cSCpnt = found;
SCpnt881drivers/scsi/scsi.cif (!SCpnt) return NULL;
SCpnt886drivers/scsi/scsi.cmemcpy(&SCpnt->request, req, sizeof(struct request));
SCpnt903drivers/scsi/scsi.cSCpnt->request.bhtail = bh;
SCpnt909drivers/scsi/scsi.cSCpnt->request.nr_sectors -= req->nr_sectors;
SCpnt912drivers/scsi/scsi.cSCpnt->request.sem = NULL; /* Wait until whole thing done */
SCpnt918drivers/scsi/scsi.cSCpnt->request.dev = 0xffff; /* Busy, but no request */
SCpnt919drivers/scsi/scsi.cSCpnt->request.sem = NULL;   /* And no one is waiting for the device 
SCpnt923drivers/scsi/scsi.cSCpnt->use_sg = 0;               /* Reset the scatter-gather flag */
SCpnt924drivers/scsi/scsi.cSCpnt->old_use_sg  = 0;
SCpnt925drivers/scsi/scsi.cSCpnt->transfersize = 0;
SCpnt926drivers/scsi/scsi.cSCpnt->underflow = 0;
SCpnt927drivers/scsi/scsi.cSCpnt->cmd_len = 0;
SCpnt932drivers/scsi/scsi.cSCpnt->channel = device->channel;
SCpnt933drivers/scsi/scsi.cSCpnt->lun = device->lun;
SCpnt934drivers/scsi/scsi.cSCpnt->target = device->id;
SCpnt936drivers/scsi/scsi.creturn SCpnt;
SCpnt958drivers/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt975drivers/scsi/scsi.cSCpnt = device->host->host_queue;
SCpnt977drivers/scsi/scsi.cwhile(SCpnt){
SCpnt978drivers/scsi/scsi.cif(SCpnt->target == device->id &&
SCpnt979drivers/scsi/scsi.cSCpnt->lun == device->lun) {
SCpnt980drivers/scsi/scsi.cif(SCpnt->request.dev < 0) break;
SCpnt982drivers/scsi/scsi.cSCpnt = SCpnt->next;
SCpnt985drivers/scsi/scsi.cwhile(SCpnt){
SCpnt986drivers/scsi/scsi.cif(SCpnt->target == device->id) {
SCpnt987drivers/scsi/scsi.cif (SCpnt->lun == device->lun) {
SCpnt989drivers/scsi/scsi.c&& SCpnt->request.dev < 0) 
SCpnt991drivers/scsi/scsi.cfound=SCpnt;
SCpnt994drivers/scsi/scsi.cif(SCpnt->request.dev >= 0) {
SCpnt1004drivers/scsi/scsi.cSCpnt = SCpnt->next;
SCpnt1006drivers/scsi/scsi.cSCpnt = found;
SCpnt1017drivers/scsi/scsi.cif (!SCpnt || SCpnt->request.dev >= 0)  /* Might have changed */
SCpnt1030drivers/scsi/scsi.cmemcpy(&SCpnt->request, req, sizeof(struct request));
SCpnt1047drivers/scsi/scsi.cSCpnt->request.bhtail = bh;
SCpnt1052drivers/scsi/scsi.cSCpnt->request.nr_sectors -= req->nr_sectors;
SCpnt1055drivers/scsi/scsi.cSCpnt->request.sem = NULL; /* Wait until whole thing done*/
SCpnt1064drivers/scsi/scsi.cSCpnt->request.dev = 0xffff; /* Busy */
SCpnt1065drivers/scsi/scsi.cSCpnt->request.sem = NULL;   /* And no one is waiting for this 
SCpnt1073drivers/scsi/scsi.cSCpnt->use_sg = 0;            /* Reset the scatter-gather flag */
SCpnt1074drivers/scsi/scsi.cSCpnt->old_use_sg  = 0;
SCpnt1075drivers/scsi/scsi.cSCpnt->transfersize = 0;      /* No default transfer size */
SCpnt1076drivers/scsi/scsi.cSCpnt->cmd_len = 0;
SCpnt1078drivers/scsi/scsi.cSCpnt->underflow = 0;         /* Do not flag underflow conditions */
SCpnt1083drivers/scsi/scsi.cSCpnt->channel = device->channel;
SCpnt1084drivers/scsi/scsi.cSCpnt->lun = device->lun;
SCpnt1085drivers/scsi/scsi.cSCpnt->target = device->id;
SCpnt1087drivers/scsi/scsi.creturn SCpnt;
SCpnt1094drivers/scsi/scsi.cinline void internal_cmnd (Scsi_Cmnd * SCpnt)
SCpnt1103drivers/scsi/scsi.chost = SCpnt->host;
SCpnt1115drivers/scsi/scsi.cupdate_timeout(SCpnt, SCpnt->timeout_per_command);
SCpnt1124drivers/scsi/scsi.cSCpnt->host->host_no, SCpnt->channel, SCpnt->target, SCpnt->cmnd, 
SCpnt1125drivers/scsi/scsi.cSCpnt->buffer, SCpnt->bufflen, SCpnt->done);
SCpnt1143drivers/scsi/scsi.cif(!intr_count && SCpnt->host->irq)
SCpnt1144drivers/scsi/scsi.cdisable_irq(SCpnt->host->irq);
SCpnt1146drivers/scsi/scsi.chost->hostt->queuecommand (SCpnt, scsi_done);
SCpnt1148drivers/scsi/scsi.cif(!intr_count && SCpnt->host->irq)
SCpnt1149drivers/scsi/scsi.cenable_irq(SCpnt->host->irq);
SCpnt1157drivers/scsi/scsi.ctemp=host->hostt->command (SCpnt);
SCpnt1158drivers/scsi/scsi.cSCpnt->result = temp;
SCpnt1165drivers/scsi/scsi.cscsi_done(SCpnt);
SCpnt1172drivers/scsi/scsi.cstatic void scsi_request_sense (Scsi_Cmnd * SCpnt)
SCpnt1178drivers/scsi/scsi.cSCpnt->flags |= WAS_SENSE | ASKED_FOR_SENSE;
SCpnt1179drivers/scsi/scsi.cupdate_timeout(SCpnt, SENSE_TIMEOUT);
SCpnt1183drivers/scsi/scsi.cmemcpy ((void *) SCpnt->cmnd , (void *) generic_sense, 
SCpnt1186drivers/scsi/scsi.cSCpnt->cmnd[1] = SCpnt->lun << 5;
SCpnt1187drivers/scsi/scsi.cSCpnt->cmnd[4] = sizeof(SCpnt->sense_buffer);
SCpnt1189drivers/scsi/scsi.cSCpnt->request_buffer = &SCpnt->sense_buffer;
SCpnt1190drivers/scsi/scsi.cSCpnt->request_bufflen = sizeof(SCpnt->sense_buffer);
SCpnt1191drivers/scsi/scsi.cSCpnt->use_sg = 0;
SCpnt1192drivers/scsi/scsi.cSCpnt->cmd_len = COMMAND_SIZE(SCpnt->cmnd[0]);
SCpnt1193drivers/scsi/scsi.cinternal_cmnd (SCpnt);
SCpnt1205drivers/scsi/scsi.cvoid scsi_do_cmd (Scsi_Cmnd * SCpnt, const void *cmnd ,
SCpnt1210drivers/scsi/scsi.cstruct Scsi_Host * host = SCpnt->host;
SCpnt1215drivers/scsi/scsi.cint target = SCpnt->target;
SCpnt1219drivers/scsi/scsi.c"command : " , host->host_no, SCpnt->channel, target, buffer, 
SCpnt1243drivers/scsi/scsi.cSCpnt->pid = scsi_pid++;
SCpnt1263drivers/scsi/scsi.cmemcpy ((void *) SCpnt->data_cmnd , (void *) cmnd, 12);
SCpnt1265drivers/scsi/scsi.cSCpnt->host = host;
SCpnt1266drivers/scsi/scsi.cSCpnt->channel = channel;
SCpnt1267drivers/scsi/scsi.cSCpnt->target = target;
SCpnt1268drivers/scsi/scsi.cSCpnt->lun = (SCpnt->data_cmnd[1] >> 5);
SCpnt1270drivers/scsi/scsi.cSCpnt->bufflen = bufflen;
SCpnt1271drivers/scsi/scsi.cSCpnt->buffer = buffer;
SCpnt1272drivers/scsi/scsi.cSCpnt->flags=0;
SCpnt1273drivers/scsi/scsi.cSCpnt->retries=0;
SCpnt1274drivers/scsi/scsi.cSCpnt->allowed=retries;
SCpnt1275drivers/scsi/scsi.cSCpnt->done = done;
SCpnt1276drivers/scsi/scsi.cSCpnt->timeout_per_command = timeout;
SCpnt1278drivers/scsi/scsi.cmemcpy ((void *) SCpnt->cmnd , (void *) cmnd, 12);
SCpnt1282drivers/scsi/scsi.cmemset ((void *) SCpnt->sense_buffer, 0, sizeof SCpnt->sense_buffer);
SCpnt1283drivers/scsi/scsi.cSCpnt->request_buffer = buffer;
SCpnt1284drivers/scsi/scsi.cSCpnt->request_bufflen = bufflen;
SCpnt1285drivers/scsi/scsi.cSCpnt->old_use_sg = SCpnt->use_sg;
SCpnt1286drivers/scsi/scsi.cif (SCpnt->cmd_len == 0)
SCpnt1287drivers/scsi/scsi.cSCpnt->cmd_len = COMMAND_SIZE(SCpnt->cmnd[0]);
SCpnt1288drivers/scsi/scsi.cSCpnt->old_cmd_len = SCpnt->cmd_len;
SCpnt1292drivers/scsi/scsi.cSCpnt->internal_timeout = 0;
SCpnt1293drivers/scsi/scsi.cSCpnt->abort_reason = 0;
SCpnt1294drivers/scsi/scsi.cinternal_cmnd (SCpnt);
SCpnt1309drivers/scsi/scsi.cstatic void reset (Scsi_Cmnd * SCpnt)
SCpnt1312drivers/scsi/scsi.cprintk("scsi: reset(%d, channel %d)\n", SCpnt->host->host_no, 
SCpnt1313drivers/scsi/scsi.cSCpnt->channel);
SCpnt1316drivers/scsi/scsi.cSCpnt->flags |= (WAS_RESET | IS_RESETTING);
SCpnt1317drivers/scsi/scsi.cscsi_reset(SCpnt);
SCpnt1324drivers/scsi/scsi.cif(SCpnt->flags & NEEDS_JUMPSTART) {
SCpnt1325drivers/scsi/scsi.cSCpnt->flags &= ~NEEDS_JUMPSTART;
SCpnt1326drivers/scsi/scsi.cscsi_request_sense (SCpnt);
SCpnt1333drivers/scsi/scsi.cstatic int check_sense (Scsi_Cmnd * SCpnt)
SCpnt1339drivers/scsi/scsi.cif (((SCpnt->sense_buffer[0] & 0x70) >> 4) != 7) {
SCpnt1340drivers/scsi/scsi.cif(!(SCpnt->flags & ASKED_FOR_SENSE))
SCpnt1346drivers/scsi/scsi.cSCpnt->flags &= ~ASKED_FOR_SENSE;
SCpnt1349drivers/scsi/scsi.cprintk("scsi%d, channel%d : ", SCpnt->host->host_no, SCpnt->channel);
SCpnt1350drivers/scsi/scsi.cprint_sense("", SCpnt);
SCpnt1353drivers/scsi/scsi.cif (SCpnt->sense_buffer[2] & 0xe0)
SCpnt1356drivers/scsi/scsi.cswitch (SCpnt->sense_buffer[2] & 0xf)
SCpnt1406drivers/scsi/scsi.cstatic void scsi_done (Scsi_Cmnd * SCpnt)
SCpnt1412drivers/scsi/scsi.cstruct Scsi_Host * host = SCpnt->host;
SCpnt1413drivers/scsi/scsi.cint result = SCpnt->result;
SCpnt1414drivers/scsi/scsi.coldto = update_timeout(SCpnt, 0);
SCpnt1418drivers/scsi/scsi.cresult, SCpnt->target, SCpnt->lun);
SCpnt1424drivers/scsi/scsi.cif(host_byte(result) == DID_ABORT && SCpnt->abort_reason)
SCpnt1425drivers/scsi/scsi.cSCpnt->result = result = (result & 0xff00ffff) |
SCpnt1426drivers/scsi/scsi.c(SCpnt->abort_reason << 16);
SCpnt1438drivers/scsi/scsi.cif(SCpnt->flags & WAS_SENSE)
SCpnt1440drivers/scsi/scsi.cSCpnt->use_sg = SCpnt->old_use_sg;
SCpnt1441drivers/scsi/scsi.cSCpnt->cmd_len = SCpnt->old_cmd_len;
SCpnt1447drivers/scsi/scsi.cif (status_byte(result) && (SCpnt->flags & WAS_SENSE))
SCpnt1450drivers/scsi/scsi.cSCpnt->flags &= ~WAS_SENSE;
SCpnt1451drivers/scsi/scsi.cSCpnt->internal_timeout &= ~SENSE_TIMEOUT;
SCpnt1453drivers/scsi/scsi.cif (!(SCpnt->flags & WAS_RESET))
SCpnt1457drivers/scsi/scsi.cSCpnt->host->host_no, SCpnt->channel, SCpnt->target, 
SCpnt1458drivers/scsi/scsi.cSCpnt->lun);
SCpnt1459drivers/scsi/scsi.creset(SCpnt);
SCpnt1474drivers/scsi/scsi.cif (SCpnt->flags & WAS_SENSE)
SCpnt1479drivers/scsi/scsi.cSCpnt->flags &= ~WAS_SENSE;
SCpnt1480drivers/scsi/scsi.cSCpnt->internal_timeout &= ~SENSE_TIMEOUT;
SCpnt1482drivers/scsi/scsi.cswitch (checked = check_sense(SCpnt))
SCpnt1489drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1525drivers/scsi/scsi.cswitch (check_sense(SCpnt))
SCpnt1528drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1541drivers/scsi/scsi.cscsi_request_sense (SCpnt);
SCpnt1553drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1559drivers/scsi/scsi.c" reset.\n", SCpnt->host->host_no, SCpnt->channel);
SCpnt1560drivers/scsi/scsi.creset(SCpnt);
SCpnt1584drivers/scsi/scsi.cif (SCpnt->flags & WAS_TIMEDOUT)
SCpnt1596drivers/scsi/scsi.cSCpnt->flags  |= WAS_TIMEDOUT;
SCpnt1597drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_ABORT;
SCpnt1620drivers/scsi/scsi.cif (SCpnt->flags & IS_RESETTING)
SCpnt1622drivers/scsi/scsi.cSCpnt->flags &= ~IS_RESETTING;
SCpnt1629drivers/scsi/scsi.cswitch (check_sense(SCpnt)) {
SCpnt1631drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1644drivers/scsi/scsi.cscsi_request_sense (SCpnt);
SCpnt1665drivers/scsi/scsi.cSCpnt->allowed, SCpnt->retries);
SCpnt1667drivers/scsi/scsi.cif ((++SCpnt->retries) < SCpnt->allowed)
SCpnt1669drivers/scsi/scsi.cif ((SCpnt->retries >= (SCpnt->allowed >> 1))
SCpnt1670drivers/scsi/scsi.c&& !(jiffies < SCpnt->host->last_reset + MIN_RESET_PERIOD)
SCpnt1671drivers/scsi/scsi.c&& !(SCpnt->flags & WAS_RESET))
SCpnt1674drivers/scsi/scsi.cSCpnt->host->host_no, SCpnt->channel);
SCpnt1675drivers/scsi/scsi.creset(SCpnt);
SCpnt1689drivers/scsi/scsi.cif (SCpnt->flags & WAS_SENSE)
SCpnt1690drivers/scsi/scsi.cscsi_request_sense(SCpnt);
SCpnt1693drivers/scsi/scsi.cmemcpy ((void *) SCpnt->cmnd,
SCpnt1694drivers/scsi/scsi.c(void*) SCpnt->data_cmnd,
SCpnt1695drivers/scsi/scsi.csizeof(SCpnt->data_cmnd));
SCpnt1696drivers/scsi/scsi.cSCpnt->request_buffer = SCpnt->buffer;
SCpnt1697drivers/scsi/scsi.cSCpnt->request_bufflen = SCpnt->bufflen;
SCpnt1698drivers/scsi/scsi.cSCpnt->use_sg = SCpnt->old_use_sg;
SCpnt1699drivers/scsi/scsi.cSCpnt->cmd_len = SCpnt->old_cmd_len;
SCpnt1700drivers/scsi/scsi.cinternal_cmnd (SCpnt);
SCpnt1709drivers/scsi/scsi.cprintk("Calling done function - at address %p\n", SCpnt->done);
SCpnt1717drivers/scsi/scsi.cif (MAJOR(SCpnt->request.dev) != SCSI_DISK_MAJOR &&
SCpnt1718drivers/scsi/scsi.cMAJOR(SCpnt->request.dev) != SCSI_CDROM_MAJOR) {
SCpnt1728drivers/scsi/scsi.cSCpnt->result = result | ((exit & 0xff) << 24);
SCpnt1729drivers/scsi/scsi.cSCpnt->use_sg = SCpnt->old_use_sg;
SCpnt1730drivers/scsi/scsi.cSCpnt->cmd_len = SCpnt->old_cmd_len;
SCpnt1731drivers/scsi/scsi.cSCpnt->done (SCpnt);
SCpnt1756drivers/scsi/scsi.cint scsi_abort (Scsi_Cmnd * SCpnt, int why, int pid)
SCpnt1760drivers/scsi/scsi.cstruct Scsi_Host * host = SCpnt->host;
SCpnt1771drivers/scsi/scsi.cif (SCpnt->request.dev == -1 || pid != SCpnt->pid) {
SCpnt1776drivers/scsi/scsi.cif (SCpnt->internal_timeout & IN_ABORT)
SCpnt1779drivers/scsi/scsi.cwhile (SCpnt->internal_timeout & IN_ABORT)
SCpnt1784drivers/scsi/scsi.cSCpnt->internal_timeout |= IN_ABORT;
SCpnt1785drivers/scsi/scsi.coldto = update_timeout(SCpnt, ABORT_TIMEOUT);
SCpnt1787drivers/scsi/scsi.cif ((SCpnt->flags & IS_RESETTING) &&
SCpnt1788drivers/scsi/scsi.cSCpnt->device->soft_reset) {
SCpnt1794drivers/scsi/scsi.cSCpnt->channel, SCpnt->target, SCpnt->lun);
SCpnt1799drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_ABORT;
SCpnt1800drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1805drivers/scsi/scsi.cSCpnt->pid, SCpnt->host->host_no, (int) SCpnt->channel, 
SCpnt1806drivers/scsi/scsi.c(int) SCpnt->target, (int) SCpnt->lun);
SCpnt1807drivers/scsi/scsi.cprint_command (SCpnt->cmnd);
SCpnt1808drivers/scsi/scsi.cif (SCpnt->request.dev == -1 || pid != SCpnt->pid)
SCpnt1810drivers/scsi/scsi.cSCpnt->abort_reason = why;
SCpnt1811drivers/scsi/scsi.cswitch(host->hostt->abort(SCpnt)) {
SCpnt1823drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_ABORT;
SCpnt1824drivers/scsi/scsi.cif(SCpnt->flags & WAS_TIMEDOUT) {
SCpnt1831drivers/scsi/scsi.cSCpnt->flags |= WAS_TIMEDOUT;
SCpnt1832drivers/scsi/scsi.coldto = SCpnt->timeout_per_command;
SCpnt1833drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1842drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1851drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_ABORT;
SCpnt1852drivers/scsi/scsi.cupdate_timeout(SCpnt, 0);
SCpnt1856drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_ABORT;
SCpnt1863drivers/scsi/scsi.cint scsi_reset (Scsi_Cmnd * SCpnt)
SCpnt1868drivers/scsi/scsi.cstruct Scsi_Host * host = SCpnt->host;
SCpnt1877drivers/scsi/scsi.cif (SCpnt->internal_timeout & IN_RESET)
SCpnt1880drivers/scsi/scsi.cwhile (SCpnt->internal_timeout & IN_RESET)
SCpnt1885drivers/scsi/scsi.cSCpnt->internal_timeout |= IN_RESET;
SCpnt1886drivers/scsi/scsi.coldto = update_timeout(SCpnt, RESET_TIMEOUT);
SCpnt1897drivers/scsi/scsi.cscsi_abort(SCpnt1, DID_RESET, SCpnt->pid);
SCpnt1905drivers/scsi/scsi.ctemp = host->hostt->reset(SCpnt);
SCpnt1913drivers/scsi/scsi.ctemp = host->hostt->reset(SCpnt);
SCpnt1925drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_RESET;
SCpnt1926drivers/scsi/scsi.cupdate_timeout(SCpnt, oldto);
SCpnt1933drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_RESET;
SCpnt1934drivers/scsi/scsi.cscsi_request_sense (SCpnt);
SCpnt1944drivers/scsi/scsi.cSCpnt->internal_timeout &= ~IN_RESET;
SCpnt1945drivers/scsi/scsi.cupdate_timeout(SCpnt, 0);
SCpnt1968drivers/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt1982drivers/scsi/scsi.cfor(SCpnt = host->host_queue; SCpnt; SCpnt = SCpnt->next)
SCpnt1983drivers/scsi/scsi.cif (SCpnt->timeout == -1)
SCpnt1985drivers/scsi/scsi.cSCpnt->timeout = 0;
SCpnt1986drivers/scsi/scsi.cpid = SCpnt->pid;
SCpnt1988drivers/scsi/scsi.cscsi_times_out(SCpnt, pid);
SCpnt2012drivers/scsi/scsi.cScsi_Cmnd * SCpnt = NULL;
SCpnt2039drivers/scsi/scsi.cfor(SCpnt = host->host_queue; SCpnt; SCpnt = SCpnt->next)
SCpnt2040drivers/scsi/scsi.cif (SCpnt->timeout > 0) {
SCpnt2041drivers/scsi/scsi.cSCpnt->timeout -= used;
SCpnt2042drivers/scsi/scsi.cif(SCpnt->timeout <= 0) SCpnt->timeout = -1;
SCpnt2043drivers/scsi/scsi.cif(SCpnt->timeout > 0 && SCpnt->timeout < least)
SCpnt2044drivers/scsi/scsi.cleast = SCpnt->timeout;
SCpnt2228drivers/scsi/scsi.cScsi_Cmnd * SCpnt;
SCpnt2232drivers/scsi/scsi.cSCpnt = (Scsi_Cmnd *) scsi_init_malloc(sizeof(Scsi_Cmnd), GFP_ATOMIC);
SCpnt2233drivers/scsi/scsi.cSCpnt->host = SDpnt->host;
SCpnt2234drivers/scsi/scsi.cSCpnt->device = SDpnt;
SCpnt2235drivers/scsi/scsi.cSCpnt->target = SDpnt->id;
SCpnt2236drivers/scsi/scsi.cSCpnt->lun = SDpnt->lun;
SCpnt2237drivers/scsi/scsi.cSCpnt->channel = SDpnt->channel;
SCpnt2238drivers/scsi/scsi.cSCpnt->request.dev = -1; /* Mark not busy */
SCpnt2239drivers/scsi/scsi.cSCpnt->use_sg = 0;
SCpnt2240drivers/scsi/scsi.cSCpnt->old_use_sg = 0;
SCpnt2241drivers/scsi/scsi.cSCpnt->old_cmd_len = 0;
SCpnt2242drivers/scsi/scsi.cSCpnt->timeout = 0;
SCpnt2243drivers/scsi/scsi.cSCpnt->underflow = 0;
SCpnt2244drivers/scsi/scsi.cSCpnt->transfersize = 0;
SCpnt2245drivers/scsi/scsi.cSCpnt->host_scribble = NULL;
SCpnt2248drivers/scsi/scsi.chost->host_queue->prev = SCpnt;
SCpnt2249drivers/scsi/scsi.cSCpnt->next = host->host_queue;
SCpnt2250drivers/scsi/scsi.cSCpnt->prev = NULL;
SCpnt2251drivers/scsi/scsi.chost->host_queue = SCpnt;
SCpnt2646drivers/scsi/scsi.cScsi_Cmnd * SCpnt;
SCpnt2662drivers/scsi/scsi.cfor(SCpnt = shpnt->host_queue; SCpnt; SCpnt = SCpnt->next)
SCpnt2666drivers/scsi/scsi.cif(SCpnt->request.dev != -1) {
SCpnt2668drivers/scsi/scsi.cfor(SCpnt = shpnt->host_queue; SCpnt; SCpnt = SCpnt->next)
SCpnt2669drivers/scsi/scsi.cif(SCpnt->request.dev == 0xffe0) SCpnt->request.dev = -1;
SCpnt2673drivers/scsi/scsi.cSCpnt->request.dev = 0xffe0;  /* Mark as busy */
SCpnt2696drivers/scsi/scsi.cSCpnt = sdpnt->host->host_queue->next;
SCpnt2698drivers/scsi/scsi.csdpnt->host->host_queue = SCpnt;
SCpnt2699drivers/scsi/scsi.cif (SCpnt) SCpnt->prev = NULL;
SCpnt2831drivers/scsi/scsi.cScsi_Cmnd * SCpnt;
SCpnt2852drivers/scsi/scsi.cfor(SCpnt = SDpnt->host->host_queue; SCpnt; SCpnt = SCpnt->next)
SCpnt2854drivers/scsi/scsi.cif(SCpnt->device == SDpnt)
SCpnt2856drivers/scsi/scsi.cif(SCpnt->prev != NULL)
SCpnt2857drivers/scsi/scsi.cSCpnt->prev->next = SCpnt->next;
SCpnt2858drivers/scsi/scsi.cif(SCpnt->next != NULL)
SCpnt2859drivers/scsi/scsi.cSCpnt->next->prev = SCpnt->prev;
SCpnt2860drivers/scsi/scsi.cif(SCpnt == SDpnt->host->host_queue)
SCpnt2861drivers/scsi/scsi.cSDpnt->host->host_queue = SCpnt->next;
SCpnt2862drivers/scsi/scsi.cscsi_init_free((char *) SCpnt, sizeof(*SCpnt));
SCpnt2939drivers/scsi/scsi.cScsi_Cmnd * SCpnt;
SCpnt2943drivers/scsi/scsi.cfor(SCpnt=shpnt->host_queue; SCpnt; SCpnt = SCpnt->next)
SCpnt2947drivers/scsi/scsi.ci++, SCpnt->host->host_no,
SCpnt2948drivers/scsi/scsi.cSCpnt->channel,
SCpnt2949drivers/scsi/scsi.cSCpnt->target,
SCpnt2950drivers/scsi/scsi.cSCpnt->lun,
SCpnt2951drivers/scsi/scsi.cSCpnt->request.dev,
SCpnt2952drivers/scsi/scsi.cSCpnt->request.sector,
SCpnt2953drivers/scsi/scsi.cSCpnt->request.nr_sectors,
SCpnt2954drivers/scsi/scsi.cSCpnt->request.current_nr_sectors,
SCpnt2955drivers/scsi/scsi.cSCpnt->use_sg,
SCpnt2956drivers/scsi/scsi.cSCpnt->retries,
SCpnt2957drivers/scsi/scsi.cSCpnt->allowed,
SCpnt2958drivers/scsi/scsi.cSCpnt->flags,
SCpnt2959drivers/scsi/scsi.cSCpnt->timeout_per_command,
SCpnt2960drivers/scsi/scsi.cSCpnt->timeout,
SCpnt2961drivers/scsi/scsi.cSCpnt->internal_timeout,
SCpnt2962drivers/scsi/scsi.cSCpnt->cmnd[0],
SCpnt2963drivers/scsi/scsi.cSCpnt->sense_buffer[2],
SCpnt2964drivers/scsi/scsi.cSCpnt->result);
SCpnt565drivers/scsi/scsi.hstatic Scsi_Cmnd * end_scsi_request(Scsi_Cmnd * SCpnt, int uptodate, int sectors)
SCpnt570drivers/scsi/scsi.hreq = &SCpnt->request;
SCpnt597drivers/scsi/scsi.hreturn SCpnt;
SCpnt604drivers/scsi/scsi.hif (SCpnt->host->block) {
SCpnt607drivers/scsi/scsi.hfor (next = SCpnt->host->block; next != SCpnt->host;
SCpnt614drivers/scsi/scsi.hwake_up(&SCpnt->device->device_wait);
SCpnt79drivers/scsi/scsi_debug.cif ((SCpnt->request.dev & 0xf) != 0) start = starts[(SCpnt->request.dev & 0xf) - 1];        \
SCpnt86drivers/scsi/scsi_debug.cif (bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\
SCpnt92drivers/scsi/scsi_debug.cif ((SCpnt->request.dev & 0xfff0) != ((target + NR_REAL) << 4) +(MAJOR_NR << 8)){   \
SCpnt93drivers/scsi/scsi_debug.cprintk("Dev #s %x %x ",SCpnt->request.dev, target);         \
SCpnt100drivers/scsi/scsi_debug.cif (bufflen != 1024 && (!SCpnt->use_sg)) {printk("%x %d\n ",bufflen, SCpnt->use_sg); panic("Bad bufflen");};    \
SCpnt102drivers/scsi/scsi_debug.cif ((SCpnt->request.dev & 0xf) > npart) panic ("Bad partition");    \
SCpnt103drivers/scsi/scsi_debug.cif ((SCpnt->request.dev & 0xf) != 0) start = starts[(SCpnt->request.dev & 0xf) - 1];        \
SCpnt104drivers/scsi/scsi_debug.cif (SCpnt->request.cmd != RW) panic ("Wrong  operation");       \
SCpnt105drivers/scsi/scsi_debug.cif (SCpnt->request.sector + start != block) panic("Wrong block.");  \
SCpnt106drivers/scsi/scsi_debug.cif (SCpnt->request.current_nr_sectors != 2 && (!SCpnt->use_sg)) panic ("Wrong # blocks");   \
SCpnt107drivers/scsi/scsi_debug.cif (SCpnt->request.bh){                         \
SCpnt108drivers/scsi/scsi_debug.cif (SCpnt->request.bh->b_size != 1024) panic ("Wrong bh size"); \
SCpnt109drivers/scsi/scsi_debug.cif ((SCpnt->request.bh->b_blocknr << 1) + start != block)           \
SCpnt110drivers/scsi/scsi_debug.c{   printk("Wrong bh block# %d %d ",SCpnt->request.bh->b_blocknr, block);  \
SCpnt113drivers/scsi/scsi_debug.cif (SCpnt->request.bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\
SCpnt130drivers/scsi/scsi_debug.cstatic void scsi_dump(Scsi_Cmnd * SCpnt, int flag){
SCpnt137drivers/scsi/scsi_debug.cprintk("use_sg: %d",SCpnt->use_sg);
SCpnt138drivers/scsi/scsi_debug.cif (SCpnt->use_sg){
SCpnt139drivers/scsi/scsi_debug.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt140drivers/scsi/scsi_debug.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt146drivers/scsi/scsi_debug.cprintk("nosg: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer,
SCpnt147drivers/scsi/scsi_debug.cSCpnt->bufflen);
SCpnt148drivers/scsi/scsi_debug.clpnt = (int *) SCpnt->request.buffer;
SCpnt151drivers/scsi/scsi_debug.clpnt = (unsigned int *) SCpnt;
SCpnt175drivers/scsi/scsi_debug.cint scsi_debug_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt177drivers/scsi/scsi_debug.cunchar *cmd = (unchar *) SCpnt->cmnd;
SCpnt185drivers/scsi/scsi_debug.cint target = SCpnt->target;
SCpnt186drivers/scsi/scsi_debug.cint bufflen = SCpnt->request_bufflen;
SCpnt192drivers/scsi/scsi_debug.cDEB(if (target > 1) { SCpnt->result = DID_TIME_OUT << 16;done(SCpnt);return 0;});
SCpnt194drivers/scsi/scsi_debug.cbuff = (unsigned char *) SCpnt->request_buffer;
SCpnt196drivers/scsi/scsi_debug.cif(target>=1 || SCpnt->lun != 0) {
SCpnt197drivers/scsi/scsi_debug.cSCpnt->result =  DID_NO_CONNECT << 16;
SCpnt198drivers/scsi/scsi_debug.cdone(SCpnt);
SCpnt208drivers/scsi/scsi_debug.cprintk("scsi_debug: Requesting sense buffer (%x %x %x %d):", SCpnt, buff, done, bufflen);
SCpnt216drivers/scsi/scsi_debug.cSCpnt->result = 0;
SCpnt217drivers/scsi/scsi_debug.cdone(SCpnt); 
SCpnt244drivers/scsi/scsi_debug.cif(NR_REAL < 0) NR_REAL = (SCpnt->request.dev >> 4) & 0x0f;
SCpnt269drivers/scsi/scsi_debug.cusec = (SCpnt->request.nr_sectors << 9) * 1.0e6 / SCSI_DATARATE;
SCpnt276drivers/scsi/scsi_debug.cprintk("(r%d)",SCpnt->request.nr_sectors);
SCpnt279drivers/scsi/scsi_debug.cif(SCpnt->use_sg){
SCpnt284drivers/scsi/scsi_debug.cbh = SCpnt->request.bh;
SCpnt311drivers/scsi/scsi_debug.cif (SCpnt->use_sg) printk("Block %x (%d %d)\n",block, SCpnt->request.nr_sectors,
SCpnt312drivers/scsi/scsi_debug.cSCpnt->request.current_nr_sectors);
SCpnt341drivers/scsi/scsi_debug.cmemcpy(buff+64, SCpnt, sizeof(Scsi_Cmnd));
SCpnt344drivers/scsi/scsi_debug.cif(SCpnt->use_sg){
SCpnt359drivers/scsi/scsi_debug.cSCpnt->result = 0;
SCpnt360drivers/scsi/scsi_debug.c(done)(SCpnt);
SCpnt363drivers/scsi/scsi_debug.cif (SCpnt->use_sg && !scsi_debug_errsts)
SCpnt364drivers/scsi/scsi_debug.cif(bh) scsi_dump(SCpnt, 0);
SCpnt377drivers/scsi/scsi_debug.cif (SCpnt->use_sg){
SCpnt378drivers/scsi/scsi_debug.cif ((bufflen >> 9) != SCpnt->request.nr_sectors)
SCpnt386drivers/scsi/scsi_debug.cscsi_dump(SCpnt,1);
SCpnt394drivers/scsi/scsi_debug.cSCpnt->result =  DID_NO_CONNECT << 16;
SCpnt395drivers/scsi/scsi_debug.cdone(SCpnt);
SCpnt408drivers/scsi/scsi_debug.cSCint[i] = SCpnt;
SCpnt423drivers/scsi/scsi_debug.cSCpnt->result = scsi_debug_errsts;
SCpnt436drivers/scsi/scsi_debug.cSCpnt->result = scsi_debug_errsts;
SCpnt449drivers/scsi/scsi_debug.cstatic void internal_done(Scsi_Cmnd * SCpnt)
SCpnt451drivers/scsi/scsi_debug.cinternal_done_errcode = SCpnt->result;
SCpnt455drivers/scsi/scsi_debug.cint scsi_debug_command(Scsi_Cmnd * SCpnt)
SCpnt458drivers/scsi/scsi_debug.cscsi_debug_queuecommand(SCpnt, internal_done);
SCpnt555drivers/scsi/scsi_debug.cint scsi_debug_abort(Scsi_Cmnd * SCpnt)
SCpnt562drivers/scsi/scsi_debug.cSCpnt->result = SCpnt->abort_reason << 16;
SCpnt564drivers/scsi/scsi_debug.cif(SCpnt == SCint[j]) {
SCpnt566drivers/scsi/scsi_debug.cmy_done(SCpnt);
SCpnt587drivers/scsi/scsi_debug.cint scsi_debug_reset(Scsi_Cmnd * SCpnt)
SCpnt98drivers/scsi/scsi_ioctl.cstatic void scsi_ioctl_done (Scsi_Cmnd * SCpnt)
SCpnt102drivers/scsi/scsi_ioctl.creq = &SCpnt->request;
SCpnt113drivers/scsi/scsi_ioctl.cScsi_Cmnd * SCpnt;
SCpnt115drivers/scsi/scsi_ioctl.cSCpnt = allocate_device(NULL, dev, 1);
SCpnt116drivers/scsi/scsi_ioctl.cscsi_do_cmd(SCpnt,  cmd, NULL,  0,
SCpnt120drivers/scsi/scsi_ioctl.cif (SCpnt->request.dev != 0xfffe){
SCpnt122drivers/scsi/scsi_ioctl.cSCpnt->request.sem = &sem;
SCpnt125drivers/scsi/scsi_ioctl.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt128drivers/scsi/scsi_ioctl.cif(driver_byte(SCpnt->result) != 0)
SCpnt129drivers/scsi/scsi_ioctl.cswitch(SCpnt->sense_buffer[2] & 0xf) {
SCpnt142drivers/scsi/scsi_ioctl.cSCpnt->result = 0; /* This is no longer considered an error */
SCpnt151drivers/scsi/scsi_ioctl.cSCpnt->result);
SCpnt153drivers/scsi/scsi_ioctl.csense_class(SCpnt->sense_buffer[0]),
SCpnt154drivers/scsi/scsi_ioctl.csense_error(SCpnt->sense_buffer[0]),
SCpnt155drivers/scsi/scsi_ioctl.cSCpnt->sense_buffer[2] & 0xf);
SCpnt159drivers/scsi/scsi_ioctl.cresult = SCpnt->result;
SCpnt160drivers/scsi/scsi_ioctl.cSCpnt->request.dev = -1;
SCpnt161drivers/scsi/scsi_ioctl.cwake_up(&SCpnt->device->device_wait);
SCpnt175drivers/scsi/scsi_ioctl.cScsi_Cmnd * SCpnt;
SCpnt249drivers/scsi/scsi_ioctl.cSCpnt = allocate_device(NULL, dev, 1);
SCpnt251drivers/scsi/scsi_ioctl.cscsi_do_cmd(SCpnt,  cmd,  buf, needed,  scsi_ioctl_done,  MAX_TIMEOUT, 
SCpnt254drivers/scsi/scsi_ioctl.cif (SCpnt->request.dev != 0xfffe){
SCpnt256drivers/scsi/scsi_ioctl.cSCpnt->request.sem = &sem;
SCpnt259drivers/scsi/scsi_ioctl.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt266drivers/scsi/scsi_ioctl.cif(SCpnt->result) {
SCpnt269drivers/scsi/scsi_ioctl.csizeof(SCpnt->sense_buffer));
SCpnt272drivers/scsi/scsi_ioctl.cSCpnt->sense_buffer, 
SCpnt273drivers/scsi/scsi_ioctl.csizeof(SCpnt->sense_buffer));
SCpnt279drivers/scsi/scsi_ioctl.cresult = SCpnt->result;
SCpnt280drivers/scsi/scsi_ioctl.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt283drivers/scsi/scsi_ioctl.cif(SCpnt->device->scsi_request_fn)
SCpnt284drivers/scsi/scsi_ioctl.c(*SCpnt->device->scsi_request_fn)();
SCpnt286drivers/scsi/scsi_ioctl.cwake_up(&SCpnt->device->device_wait);
SCpnt44drivers/scsi/scsi_syms.cextern void print_sense(char * devclass, Scsi_Cmnd * SCpnt);
SCpnt82drivers/scsi/sd.cstatic void requeue_sd_request (Scsi_Cmnd * SCpnt);
SCpnt203drivers/scsi/sd.cstatic void rw_intr (Scsi_Cmnd *SCpnt)
SCpnt205drivers/scsi/sd.cint result = SCpnt->result;
SCpnt206drivers/scsi/sd.cint this_count = SCpnt->bufflen >> 9;
SCpnt209drivers/scsi/sd.cprintk("sd%c : rw_intr(%d, %d)\n", 'a' + MINOR(SCpnt->request.dev), 
SCpnt210drivers/scsi/sd.cSCpnt->host->host_no, result);
SCpnt222drivers/scsi/sd.cprintk("sd%c : %d sectors remain.\n", 'a' + MINOR(SCpnt->request.dev),
SCpnt223drivers/scsi/sd.cSCpnt->request.nr_sectors);
SCpnt224drivers/scsi/sd.cprintk("use_sg is %d\n ",SCpnt->use_sg);
SCpnt226drivers/scsi/sd.cif (SCpnt->use_sg) {
SCpnt229drivers/scsi/sd.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt230drivers/scsi/sd.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt236drivers/scsi/sd.cif (SCpnt->request.cmd == READ)
SCpnt244drivers/scsi/sd.cscsi_free(SCpnt->buffer, SCpnt->sglist_len);  
SCpnt246drivers/scsi/sd.cif (SCpnt->buffer != SCpnt->request.buffer) {
SCpnt248drivers/scsi/sd.cprintk("nosg: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer,
SCpnt249drivers/scsi/sd.cSCpnt->bufflen);
SCpnt251drivers/scsi/sd.cif (SCpnt->request.cmd == READ)
SCpnt252drivers/scsi/sd.cmemcpy(SCpnt->request.buffer, SCpnt->buffer,
SCpnt253drivers/scsi/sd.cSCpnt->bufflen);
SCpnt254drivers/scsi/sd.cscsi_free(SCpnt->buffer, SCpnt->bufflen);
SCpnt262drivers/scsi/sd.cif (SCpnt->request.nr_sectors > this_count)
SCpnt264drivers/scsi/sd.cSCpnt->request.errors = 0;
SCpnt266drivers/scsi/sd.cif (!SCpnt->request.bh)
SCpnt270drivers/scsi/sd.c'a' + MINOR(SCpnt->request.dev));
SCpnt277drivers/scsi/sd.cSCpnt->request.sector, this_count);
SCpnt280drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 1, this_count);
SCpnt281drivers/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt286drivers/scsi/sd.cif (SCpnt->use_sg) {
SCpnt289drivers/scsi/sd.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt290drivers/scsi/sd.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt292drivers/scsi/sd.cprintk("err: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer,
SCpnt293drivers/scsi/sd.cSCpnt->bufflen);
SCpnt299drivers/scsi/sd.cscsi_free(SCpnt->buffer, SCpnt->sglist_len);  /* Free list of scatter-gather pointers */
SCpnt302drivers/scsi/sd.cprintk("nosgerr: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer,
SCpnt303drivers/scsi/sd.cSCpnt->bufflen);
SCpnt305drivers/scsi/sd.cif (SCpnt->buffer != SCpnt->request.buffer)
SCpnt306drivers/scsi/sd.cscsi_free(SCpnt->buffer, SCpnt->bufflen);
SCpnt322drivers/scsi/sd.cif rscsi_disks[DEVICE_NR(SCpnt->request.dev)].remap
SCpnt330drivers/scsi/sd.cif ((SCpnt->sense_buffer[0] & 0x7f) == 0x70) {
SCpnt331drivers/scsi/sd.cif ((SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) {
SCpnt332drivers/scsi/sd.cif(rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->removable) {
SCpnt336drivers/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->changed = 1;
SCpnt337drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 0, this_count);
SCpnt338drivers/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt352drivers/scsi/sd.cif (SCpnt->sense_buffer[2] == ILLEGAL_REQUEST) {
SCpnt353drivers/scsi/sd.cif (rscsi_disks[DEVICE_NR(SCpnt->request.dev)].ten) {
SCpnt354drivers/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.dev)].ten = 0;
SCpnt355drivers/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt364drivers/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->host->host_no,
SCpnt365drivers/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->channel,
SCpnt366drivers/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->id,
SCpnt367drivers/scsi/sd.crscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->lun, result);
SCpnt370drivers/scsi/sd.cprint_sense("sd", SCpnt);
SCpnt371drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.current_nr_sectors);
SCpnt372drivers/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt385drivers/scsi/sd.cScsi_Cmnd * SCpnt = NULL;
SCpnt414drivers/scsi/sd.cSCpnt = allocate_device(&CURRENT,
SCpnt416drivers/scsi/sd.celse SCpnt = NULL;
SCpnt434drivers/scsi/sd.cif (!SCpnt && sd_template.nr_dev > 1){
SCpnt440drivers/scsi/sd.cSCpnt = request_queueable(req, rscsi_disks[DEVICE_NR(MINOR(req->dev))].device);
SCpnt441drivers/scsi/sd.cif(SCpnt) break;
SCpnt445drivers/scsi/sd.cif (SCpnt && req->dev == -1) {
SCpnt454drivers/scsi/sd.cif (!SCpnt) return; /* Could not find anything to do */
SCpnt457drivers/scsi/sd.crequeue_sd_request(SCpnt);
SCpnt461drivers/scsi/sd.cstatic void requeue_sd_request (Scsi_Cmnd * SCpnt)
SCpnt472drivers/scsi/sd.cif(!SCpnt || SCpnt->request.dev <= 0) {
SCpnt477drivers/scsi/sd.cdev =  MINOR(SCpnt->request.dev);
SCpnt478drivers/scsi/sd.cblock = SCpnt->request.sector;
SCpnt487drivers/scsi/sd.cblock + SCpnt->request.nr_sectors > sd[dev].nr_sects)
SCpnt489drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt503drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt509drivers/scsi/sd.c'a' + MINOR(SCpnt->request.dev), dev, block);
SCpnt524drivers/scsi/sd.cif((block & 1) || (SCpnt->request.nr_sectors & 1)) {
SCpnt526drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt530drivers/scsi/sd.cswitch (SCpnt->request.cmd)
SCpnt535drivers/scsi/sd.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt544drivers/scsi/sd.cpanic ("Unknown sd command %d\n", SCpnt->request.cmd);
SCpnt547drivers/scsi/sd.cSCpnt->this_count = 0;
SCpnt552drivers/scsi/sd.ccontiguous = (!CLUSTERABLE_DEVICE(SCpnt) ? 0 :1);
SCpnt554drivers/scsi/sd.cbounce_size = (SCpnt->request.nr_sectors << 9);
SCpnt560drivers/scsi/sd.cif (contiguous && SCpnt->request.bh &&
SCpnt561drivers/scsi/sd.c((long) SCpnt->request.bh->b_data) 
SCpnt562drivers/scsi/sd.c+ (SCpnt->request.nr_sectors << 9) - 1 > ISA_DMA_THRESHOLD 
SCpnt563drivers/scsi/sd.c&& SCpnt->host->unchecked_isa_dma) {
SCpnt564drivers/scsi/sd.cif(((long) SCpnt->request.bh->b_data) > ISA_DMA_THRESHOLD)
SCpnt569drivers/scsi/sd.cif(contiguous && SCpnt->request.bh && SCpnt->request.bh->b_reqnext)
SCpnt570drivers/scsi/sd.cfor(bh = SCpnt->request.bh, bhp = bh->b_reqnext; bhp; bh = bhp, 
SCpnt578drivers/scsi/sd.cif (!SCpnt->request.bh || contiguous) {
SCpnt581drivers/scsi/sd.cthis_count = SCpnt->request.nr_sectors;
SCpnt582drivers/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt583drivers/scsi/sd.cSCpnt->use_sg = 0;
SCpnt585drivers/scsi/sd.c} else if (SCpnt->host->sg_tablesize == 0 ||
SCpnt595drivers/scsi/sd.cif (SCpnt->host->sg_tablesize != 0 &&
SCpnt600drivers/scsi/sd.cthis_count = SCpnt->request.current_nr_sectors;
SCpnt601drivers/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt602drivers/scsi/sd.cSCpnt->use_sg = 0;
SCpnt611drivers/scsi/sd.cbh = SCpnt->request.bh;
SCpnt619drivers/scsi/sd.c!CLUSTERABLE_DEVICE(SCpnt) ||
SCpnt620drivers/scsi/sd.c(SCpnt->host->unchecked_isa_dma &&
SCpnt622drivers/scsi/sd.cif (count < SCpnt->host->sg_tablesize) count++;
SCpnt630drivers/scsi/sd.cif(SCpnt->host->unchecked_isa_dma &&
SCpnt631drivers/scsi/sd.c((unsigned int) SCpnt->request.bh->b_data-1) == ISA_DMA_THRESHOLD) count--;
SCpnt633drivers/scsi/sd.cSCpnt->use_sg = count;  /* Number of chains */
SCpnt635drivers/scsi/sd.cwhile( count < (SCpnt->use_sg * sizeof(struct scatterlist))) 
SCpnt637drivers/scsi/sd.cSCpnt->sglist_len = count;
SCpnt639drivers/scsi/sd.cif(SCpnt->host->sg_tablesize < max_sg) 
SCpnt640drivers/scsi/sd.cmax_sg = SCpnt->host->sg_tablesize;
SCpnt644drivers/scsi/sd.cSCpnt->use_sg = 0;    /* No memory left - bail out */
SCpnt645drivers/scsi/sd.cthis_count = SCpnt->request.current_nr_sectors;
SCpnt646drivers/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt653drivers/scsi/sd.cfor(count = 0, bh = SCpnt->request.bh, bhp = bh->b_reqnext;
SCpnt654drivers/scsi/sd.ccount < SCpnt->use_sg && bh; 
SCpnt664drivers/scsi/sd.cISA_DMA_THRESHOLD && (SCpnt->host->unchecked_isa_dma) &&
SCpnt691drivers/scsi/sd.cthis_count = SCpnt->request.current_nr_sectors;
SCpnt692drivers/scsi/sd.cbuff = SCpnt->request.buffer;
SCpnt693drivers/scsi/sd.cSCpnt->use_sg = 0;
SCpnt694drivers/scsi/sd.cscsi_free(sgpnt, SCpnt->sglist_len);
SCpnt696drivers/scsi/sd.cSCpnt->use_sg = count;
SCpnt708drivers/scsi/sd.c&& CLUSTERABLE_DEVICE(SCpnt)) {
SCpnt713drivers/scsi/sd.c(SCpnt->host->unchecked_isa_dma) &&
SCpnt722drivers/scsi/sd.cmax_sg = SCpnt->use_sg;
SCpnt735drivers/scsi/sd.cif (SCpnt->use_sg < max_sg) SCpnt->use_sg++;
SCpnt742drivers/scsi/sd.cif(count < SCpnt->use_sg || SCpnt->use_sg 
SCpnt743drivers/scsi/sd.c> SCpnt->host->sg_tablesize){
SCpnt744drivers/scsi/sd.cbh = SCpnt->request.bh;
SCpnt746drivers/scsi/sd.cSCpnt->use_sg, count, dma_free_sectors);
SCpnt753drivers/scsi/sd.cif(SCpnt->use_sg < 16)
SCpnt754drivers/scsi/sd.cfor(count=0; count<SCpnt->use_sg; count++)
SCpnt762drivers/scsi/sd.cif (SCpnt->request.cmd == WRITE)
SCpnt763drivers/scsi/sd.cfor(count=0; count<SCpnt->use_sg; count++)
SCpnt772drivers/scsi/sd.cif(SCpnt->use_sg == 0){
SCpnt774drivers/scsi/sd.c(SCpnt->host->unchecked_isa_dma)) {
SCpnt780drivers/scsi/sd.cthis_count = SCpnt->request.current_nr_sectors;
SCpnt784drivers/scsi/sd.cif (SCpnt->request.cmd == WRITE)
SCpnt785drivers/scsi/sd.cmemcpy(buff, (char *)SCpnt->request.buffer, this_count << 9);
SCpnt790drivers/scsi/sd.c'a' + MINOR(SCpnt->request.dev),
SCpnt791drivers/scsi/sd.c(SCpnt->request.cmd == WRITE) ? "writing" : "reading",
SCpnt792drivers/scsi/sd.cthis_count, SCpnt->request.nr_sectors);
SCpnt795drivers/scsi/sd.ccmd[1] = (SCpnt->lun << 5) & 0xe0;
SCpnt841drivers/scsi/sd.cSCpnt->transfersize = rscsi_disks[dev].sector_size;
SCpnt842drivers/scsi/sd.cSCpnt->underflow = this_count << 9; 
SCpnt843drivers/scsi/sd.cscsi_do_cmd (SCpnt, (void *) cmd, buff, 
SCpnt846drivers/scsi/sd.c(SCpnt->device->type == TYPE_DISK ? 
SCpnt885drivers/scsi/sd.cstatic void sd_init_done (Scsi_Cmnd * SCpnt)
SCpnt889drivers/scsi/sd.creq = &SCpnt->request;
SCpnt903drivers/scsi/sd.cScsi_Cmnd * SCpnt;
SCpnt910drivers/scsi/sd.cSCpnt = allocate_device(NULL, rscsi_disks[i].device, 1);
SCpnt924drivers/scsi/sd.cSCpnt->request.dev = 0xffff;  /* Mark as really busy again */
SCpnt925drivers/scsi/sd.cSCpnt->cmd_len = 0;
SCpnt926drivers/scsi/sd.cSCpnt->sense_buffer[0] = 0;
SCpnt927drivers/scsi/sd.cSCpnt->sense_buffer[2] = 0;
SCpnt929drivers/scsi/sd.cscsi_do_cmd (SCpnt,
SCpnt934drivers/scsi/sd.cwhile(SCpnt->request.dev != 0xfffe) barrier();
SCpnt936drivers/scsi/sd.cthe_result = SCpnt->result;
SCpnt939drivers/scsi/sd.c|| SCpnt->sense_buffer[2] != UNIT_ATTENTION)
SCpnt946drivers/scsi/sd.cSCpnt->sense_buffer[2] == NOT_READY) {
SCpnt956drivers/scsi/sd.cSCpnt->request.dev = 0xffff; 
SCpnt957drivers/scsi/sd.cSCpnt->cmd_len = 0;
SCpnt958drivers/scsi/sd.cSCpnt->sense_buffer[0] = 0;
SCpnt959drivers/scsi/sd.cSCpnt->sense_buffer[2] = 0;
SCpnt961drivers/scsi/sd.cscsi_do_cmd (SCpnt,
SCpnt966drivers/scsi/sd.cwhile(SCpnt->request.dev != 0xfffe)
SCpnt992drivers/scsi/sd.cSCpnt->request.dev = 0xffff;  /* Mark as really busy again */
SCpnt993drivers/scsi/sd.cSCpnt->cmd_len = 0;
SCpnt994drivers/scsi/sd.cSCpnt->sense_buffer[0] = 0;
SCpnt995drivers/scsi/sd.cSCpnt->sense_buffer[2] = 0;
SCpnt997drivers/scsi/sd.cscsi_do_cmd (SCpnt,
SCpnt1003drivers/scsi/sd.cwhile(SCpnt->request.dev != 0xfffe)
SCpnt1006drivers/scsi/sd.cif (SCpnt->request.dev != 0xfffe){
SCpnt1008drivers/scsi/sd.cSCpnt->request.sem = &sem;
SCpnt1011drivers/scsi/sd.cwhile (SCpnt->request.dev != 0xfffe) 
SCpnt1015drivers/scsi/sd.cthe_result = SCpnt->result;
SCpnt1020drivers/scsi/sd.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt1022drivers/scsi/sd.cwake_up(&SCpnt->device->device_wait); 
SCpnt1052drivers/scsi/sd.c'a' + i, SCpnt->sense_buffer[2] & 0xf);
SCpnt1064drivers/scsi/sd.cSCpnt->sense_buffer[2] == NOT_READY)
SCpnt518drivers/scsi/seagate.cint seagate_st0x_queue_command (Scsi_Cmnd * SCpnt,  void (*done)(Scsi_Cmnd *))
SCpnt524drivers/scsi/seagate.ccurrent_target = SCpnt->target;
SCpnt525drivers/scsi/seagate.ccurrent_lun = SCpnt->lun;
SCpnt526drivers/scsi/seagate.c(const void *) current_cmnd = SCpnt->cmnd;
SCpnt527drivers/scsi/seagate.ccurrent_data = (unsigned char *) SCpnt->request_buffer;
SCpnt528drivers/scsi/seagate.ccurrent_bufflen = SCpnt->request_bufflen;
SCpnt529drivers/scsi/seagate.cSCint = SCpnt;
SCpnt540drivers/scsi/seagate.ccurrent_cmnd[SCpnt->cmd_len] |= 0x01;
SCpnt579drivers/scsi/seagate.cint seagate_st0x_command (Scsi_Cmnd * SCpnt) {
SCpnt580drivers/scsi/seagate.creturn internal_command (SCpnt->target, SCpnt->lun, SCpnt->cmnd, SCpnt->request_buffer,
SCpnt581drivers/scsi/seagate.cSCpnt->request_bufflen, 
SCpnt1555drivers/scsi/seagate.cint seagate_st0x_abort (Scsi_Cmnd * SCpnt)
SCpnt1566drivers/scsi/seagate.cint seagate_st0x_reset (Scsi_Cmnd * SCpnt)
SCpnt257drivers/scsi/sg.cstatic void sg_command_done(Scsi_Cmnd * SCpnt)
SCpnt259drivers/scsi/sg.cint dev=SCpnt->request.dev;
SCpnt264drivers/scsi/sg.cSCpnt->request.dev=-1;
SCpnt272drivers/scsi/sg.cmemcpy(device->header.sense_buffer, SCpnt->sense_buffer, sizeof(SCpnt->sense_buffer));
SCpnt273drivers/scsi/sg.cif (SCpnt->sense_buffer[0])
SCpnt278drivers/scsi/sg.cdevice->header.result=SCpnt->result;
SCpnt285drivers/scsi/sg.cSCpnt->request.dev=-1;
SCpnt300drivers/scsi/sg.cScsi_Cmnd    * SCpnt;
SCpnt383drivers/scsi/sg.cif (!(SCpnt=allocate_device(NULL,device->device, !(filp->f_flags & O_NONBLOCK))))
SCpnt398drivers/scsi/sg.cSCpnt->request.dev=dev;
SCpnt399drivers/scsi/sg.cSCpnt->sense_buffer[0]=0;
SCpnt403drivers/scsi/sg.cSCpnt->cmd_len = size;
SCpnt452drivers/scsi/sg.cscsi_do_cmd (SCpnt,(void *) cmnd,
SCpnt69drivers/scsi/sr.cvoid requeue_sr_request (Scsi_Cmnd * SCpnt);
SCpnt153drivers/scsi/sr.cstatic void rw_intr (Scsi_Cmnd * SCpnt)
SCpnt155drivers/scsi/sr.cint result = SCpnt->result;
SCpnt156drivers/scsi/sr.cint this_count = SCpnt->this_count;
SCpnt159drivers/scsi/sr.cprintk("sr.c done: %x %x\n",result, SCpnt->request.bh->b_data);
SCpnt163drivers/scsi/sr.cif (SCpnt->use_sg == 0) {
SCpnt164drivers/scsi/sr.cif (SCpnt->buffer != SCpnt->request.buffer)
SCpnt167drivers/scsi/sr.coffset = (SCpnt->request.sector % 4) << 9;
SCpnt168drivers/scsi/sr.cmemcpy((char *)SCpnt->request.buffer, 
SCpnt169drivers/scsi/sr.c(char *)SCpnt->buffer + offset, 
SCpnt176drivers/scsi/sr.cSCpnt->request.nr_sectors > this_count && 
SCpnt177drivers/scsi/sr.cSCpnt->request.bh &&
SCpnt178drivers/scsi/sr.cSCpnt->request.bh->b_reqnext &&
SCpnt179drivers/scsi/sr.cSCpnt->request.bh->b_reqnext->b_size == 1024) {
SCpnt180drivers/scsi/sr.cmemcpy((char *)SCpnt->request.bh->b_reqnext->b_data, 
SCpnt181drivers/scsi/sr.c(char *)SCpnt->buffer + 1024, 
SCpnt186drivers/scsi/sr.cscsi_free(SCpnt->buffer, 2048);
SCpnt191drivers/scsi/sr.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt192drivers/scsi/sr.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt200drivers/scsi/sr.cscsi_free(SCpnt->buffer, SCpnt->sglist_len);  /* Free list of scatter-gather pointers */
SCpnt201drivers/scsi/sr.cif(SCpnt->request.sector % 4) this_count -= 2;
SCpnt203drivers/scsi/sr.cif(this_count > SCpnt->request.nr_sectors)
SCpnt208drivers/scsi/sr.cprintk("(%x %x %x) ",SCpnt->request.bh, SCpnt->request.nr_sectors, 
SCpnt211drivers/scsi/sr.cif (SCpnt->request.nr_sectors > this_count)
SCpnt213drivers/scsi/sr.cSCpnt->request.errors = 0;
SCpnt214drivers/scsi/sr.cif (!SCpnt->request.bh)
SCpnt216drivers/scsi/sr.cSCpnt->request.sector, this_count);
SCpnt219drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 1, this_count);  /* All done */
SCpnt220drivers/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt227drivers/scsi/sr.cif (SCpnt->use_sg) {
SCpnt230drivers/scsi/sr.csgpnt = (struct scatterlist *) SCpnt->buffer;
SCpnt231drivers/scsi/sr.cfor(i=0; i<SCpnt->use_sg; i++) {
SCpnt236drivers/scsi/sr.cscsi_free(SCpnt->buffer, SCpnt->sglist_len);  /* Free list of scatter-gather pointers */
SCpnt238drivers/scsi/sr.cif (SCpnt->buffer != SCpnt->request.buffer)
SCpnt239drivers/scsi/sr.cscsi_free(SCpnt->buffer, SCpnt->bufflen);
SCpnt243drivers/scsi/sr.cif ((SCpnt->sense_buffer[0] & 0x7f) == 0x70) {
SCpnt244drivers/scsi/sr.cif ((SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) {
SCpnt248drivers/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->changed = 1;
SCpnt249drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, this_count);
SCpnt250drivers/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt255drivers/scsi/sr.cif (SCpnt->sense_buffer[2] == ILLEGAL_REQUEST) {
SCpnt257drivers/scsi/sr.cprint_sense("sr", SCpnt);
SCpnt259drivers/scsi/sr.cprint_command(SCpnt->cmnd);
SCpnt260drivers/scsi/sr.cif (scsi_CDs[DEVICE_NR(SCpnt->request.dev)].ten) {
SCpnt261drivers/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.dev)].ten = 0;
SCpnt262drivers/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt266drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, this_count);
SCpnt267drivers/scsi/sr.crequeue_sr_request(SCpnt); /* Do next request */
SCpnt273drivers/scsi/sr.cif (SCpnt->sense_buffer[2] == NOT_READY) {
SCpnt275drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, this_count);
SCpnt276drivers/scsi/sr.crequeue_sr_request(SCpnt); /* Do next request */
SCpnt284drivers/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->host->host_no, 
SCpnt285drivers/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->id,
SCpnt286drivers/scsi/sr.cscsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->lun,
SCpnt290drivers/scsi/sr.cprint_sense("sr", SCpnt);
SCpnt292drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.current_nr_sectors);
SCpnt293drivers/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt552drivers/scsi/sr.cScsi_Cmnd * SCpnt = NULL;
SCpnt568drivers/scsi/sr.cSCpnt = allocate_device(&CURRENT,
SCpnt570drivers/scsi/sr.celse SCpnt = NULL;
SCpnt580drivers/scsi/sr.cif (!SCpnt && sr_template.nr_dev > 1){
SCpnt587drivers/scsi/sr.cSCpnt = request_queueable(req,
SCpnt589drivers/scsi/sr.cif(SCpnt) break;
SCpnt593drivers/scsi/sr.cif (SCpnt && req->dev == -1) {
SCpnt602drivers/scsi/sr.cif (!SCpnt)
SCpnt608drivers/scsi/sr.crequeue_sr_request(SCpnt);
SCpnt612drivers/scsi/sr.cvoid requeue_sr_request (Scsi_Cmnd * SCpnt)
SCpnt621drivers/scsi/sr.cif(!SCpnt || SCpnt->request.dev <= 0) {
SCpnt626drivers/scsi/sr.cdev =  MINOR(SCpnt->request.dev);
SCpnt627drivers/scsi/sr.cblock = SCpnt->request.sector;  
SCpnt634drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt642drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt654drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt659drivers/scsi/sr.cswitch (SCpnt->request.cmd)
SCpnt662drivers/scsi/sr.cSCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
SCpnt669drivers/scsi/sr.cpanic ("Unknown sr command %d\n", SCpnt->request.cmd);
SCpnt672drivers/scsi/sr.ccmd[1] = (SCpnt->lun << 5) & 0xe0;
SCpnt690drivers/scsi/sr.cSCpnt->use_sg = 0;
SCpnt692drivers/scsi/sr.cif (SCpnt->host->sg_tablesize > 0 &&
SCpnt698drivers/scsi/sr.cbh = SCpnt->request.bh;
SCpnt704drivers/scsi/sr.cthis_count = SCpnt->request.sector % 4;
SCpnt706drivers/scsi/sr.cwhile(bh && count < SCpnt->host->sg_tablesize) {
SCpnt715drivers/scsi/sr.cif (count < SCpnt->host->sg_tablesize) {
SCpnt724drivers/scsi/sr.cSCpnt->use_sg = count;  /* Number of chains */
SCpnt726drivers/scsi/sr.cwhile( count < (SCpnt->use_sg * sizeof(struct scatterlist))) 
SCpnt728drivers/scsi/sr.cSCpnt->sglist_len = count;
SCpnt732drivers/scsi/sr.cSCpnt->use_sg = 0;  /* No memory left - bail out */
SCpnt736drivers/scsi/sr.cbh = SCpnt->request.bh;
SCpnt737drivers/scsi/sr.cif(SCpnt->request.sector % 4) {
SCpnt738drivers/scsi/sr.csgpnt[count].length = (SCpnt->request.sector % 4) << 9;
SCpnt745drivers/scsi/sr.cfor(bh = SCpnt->request.bh; count < SCpnt->use_sg; 
SCpnt756drivers/scsi/sr.cif (count+1 != SCpnt->use_sg) panic("Bad sr request list");
SCpnt760drivers/scsi/sr.cSCpnt->host->unchecked_isa_dma) {
SCpnt781drivers/scsi/sr.cSCpnt->use_sg = 0;
SCpnt782drivers/scsi/sr.cscsi_free(buffer, SCpnt->sglist_len);
SCpnt788drivers/scsi/sr.cprintk("SR: %d %d %d %d %d *** ",SCpnt->use_sg, SCpnt->request.sector,
SCpnt790drivers/scsi/sr.cSCpnt->request.current_nr_sectors,
SCpnt791drivers/scsi/sr.cSCpnt->request.nr_sectors);
SCpnt792drivers/scsi/sr.cfor(count=0; count<SCpnt->use_sg; count++)
SCpnt801drivers/scsi/sr.cif (SCpnt->use_sg == 0){
SCpnt803drivers/scsi/sr.cif (!SCpnt->request.bh)    
SCpnt804drivers/scsi/sr.cthis_count = SCpnt->request.nr_sectors;
SCpnt806drivers/scsi/sr.cthis_count = (SCpnt->request.bh->b_size >> 9);
SCpnt822drivers/scsi/sr.cbuffer = (unsigned char *) SCpnt->request.buffer;
SCpnt824drivers/scsi/sr.cSCpnt->host->unchecked_isa_dma)
SCpnt874drivers/scsi/sr.cprintk("Use sg: %d\n", SCpnt->use_sg);
SCpnt891drivers/scsi/sr.cSCpnt->transfersize = (scsi_CDs[dev].sector_size > 1024) ?
SCpnt894drivers/scsi/sr.cSCpnt->this_count = this_count;
SCpnt895drivers/scsi/sr.cscsi_do_cmd (SCpnt, (void *) cmd, buffer, 
SCpnt937drivers/scsi/sr.cstatic void sr_init_done (Scsi_Cmnd * SCpnt)
SCpnt941drivers/scsi/sr.creq = &SCpnt->request;
SCpnt953drivers/scsi/sr.cScsi_Cmnd * SCpnt;
SCpnt956drivers/scsi/sr.cSCpnt = allocate_device(NULL, scsi_CDs[i].device, 1);
SCpnt963drivers/scsi/sr.cSCpnt->request.dev = 0xffff;  /* Mark as really busy */
SCpnt964drivers/scsi/sr.cSCpnt->cmd_len = 0;
SCpnt968drivers/scsi/sr.cscsi_do_cmd (SCpnt,
SCpnt974drivers/scsi/sr.cwhile(SCpnt->request.dev != 0xfffe)
SCpnt977drivers/scsi/sr.cif (SCpnt->request.dev != 0xfffe){
SCpnt979drivers/scsi/sr.cSCpnt->request.sem = &sem;
SCpnt982drivers/scsi/sr.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt985drivers/scsi/sr.cthe_result = SCpnt->result;
SCpnt990drivers/scsi/sr.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt992drivers/scsi/sr.cwake_up(&SCpnt->device->device_wait); 
SCpnt29drivers/scsi/sr_ioctl.cstatic void sr_ioctl_done(Scsi_Cmnd * SCpnt)
SCpnt33drivers/scsi/sr_ioctl.creq = &SCpnt->request;
SCpnt47drivers/scsi/sr_ioctl.cScsi_Cmnd * SCpnt;
SCpnt50drivers/scsi/sr_ioctl.cSCpnt = allocate_device(NULL, scsi_CDs[target].device, 1);
SCpnt51drivers/scsi/sr_ioctl.cscsi_do_cmd(SCpnt,
SCpnt56drivers/scsi/sr_ioctl.cif (SCpnt->request.dev != 0xfffe){
SCpnt58drivers/scsi/sr_ioctl.cSCpnt->request.sem = &sem;
SCpnt61drivers/scsi/sr_ioctl.cwhile (SCpnt->request.dev != 0xfffe) schedule();
SCpnt64drivers/scsi/sr_ioctl.cresult = SCpnt->result;
SCpnt68drivers/scsi/sr_ioctl.cswitch(SCpnt->sense_buffer[2] & 0xf) {
SCpnt86drivers/scsi/sr_ioctl.csense_class(SCpnt->sense_buffer[0]), 
SCpnt87drivers/scsi/sr_ioctl.csense_error(SCpnt->sense_buffer[0]),
SCpnt88drivers/scsi/sr_ioctl.cSCpnt->sense_buffer[2] & 0xf);
SCpnt92drivers/scsi/sr_ioctl.cresult = SCpnt->result;
SCpnt93drivers/scsi/sr_ioctl.cSCpnt->request.dev = -1; /* Deallocate */
SCpnt94drivers/scsi/sr_ioctl.cwake_up(&SCpnt->device->device_wait);
SCpnt115drivers/scsi/st.cst_chk_result(Scsi_Cmnd * SCpnt)
SCpnt117drivers/scsi/st.cint dev = SCpnt->request.dev;
SCpnt118drivers/scsi/st.cint result = SCpnt->result;
SCpnt119drivers/scsi/st.cunsigned char * sense = SCpnt->sense_buffer, scode;
SCpnt127drivers/scsi/st.cSCpnt->data_cmnd[0], SCpnt->data_cmnd[1], SCpnt->data_cmnd[2],
SCpnt128drivers/scsi/st.cSCpnt->data_cmnd[3], SCpnt->data_cmnd[4], SCpnt->data_cmnd[5],
SCpnt129drivers/scsi/st.cSCpnt->request_bufflen);
SCpnt131drivers/scsi/st.cprint_sense("st", SCpnt);
SCpnt144drivers/scsi/st.cprint_sense("st", SCpnt);
SCpnt152drivers/scsi/st.c&& SCpnt->data_cmnd[0] != WRITE_6
SCpnt153drivers/scsi/st.c&& SCpnt->data_cmnd[0] != WRITE_FILEMARKS
SCpnt158drivers/scsi/st.cif (SCpnt->data_cmnd[0] == READ_6)
SCpnt160drivers/scsi/st.celse if (SCpnt->data_cmnd[0] == WRITE_6)
SCpnt174drivers/scsi/st.cst_sleep_done (Scsi_Cmnd * SCpnt)
SCpnt179drivers/scsi/st.cif ((st_nbr = SCpnt->request.dev) < st_template.nr_dev && st_nbr >= 0) {
SCpnt182drivers/scsi/st.c(SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt183drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x40)) {
SCpnt185drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x80) != 0)
SCpnt186drivers/scsi/st.cremainder = (SCpnt->sense_buffer[3] << 24) |
SCpnt187drivers/scsi/st.c(SCpnt->sense_buffer[4] << 16) |
SCpnt188drivers/scsi/st.c(SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6];
SCpnt191drivers/scsi/st.cif ((SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW ||
SCpnt193drivers/scsi/st.c(STp->buffer)->last_result = SCpnt->result; /* Error */
SCpnt198drivers/scsi/st.c(STp->buffer)->last_result = SCpnt->result;
SCpnt199drivers/scsi/st.c(STp->buffer)->last_result_fatal = st_chk_result(SCpnt);
SCpnt201drivers/scsi/st.cSCpnt->request.dev = -1;
SCpnt203drivers/scsi/st.cSCpnt->request.dev = 0xffff;
SCpnt256drivers/scsi/st.cScsi_Cmnd *SCpnt;
SCpnt266drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt267drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt268drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt269drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt276drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt279drivers/scsi/st.cSCpnt->request.dev = -1;
SCpnt299drivers/scsi/st.cScsi_Cmnd *SCpnt;
SCpnt318drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt329drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt337drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt338drivers/scsi/st.cscsi_do_cmd (SCpnt,
SCpnt345drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt350drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt351drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x40) &&
SCpnt352drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) != VOLUME_OVERFLOW) {
SCpnt367drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt428drivers/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt464drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt465drivers/scsi/st.cif (!SCpnt) {
SCpnt470drivers/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt473drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt474drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt483drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt486drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt487drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == UNIT_ATTENTION) { /* New media? */
SCpnt489drivers/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt492drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt493drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt502drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt510drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt511drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == NO_TAPE) {
SCpnt519drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt532drivers/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt535drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt536drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt544drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt547drivers/scsi/st.cif (!SCpnt->result && !SCpnt->sense_buffer[0]) {
SCpnt566drivers/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt570drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt571drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt579drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt590drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt672drivers/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt691drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt693drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt697drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt698drivers/scsi/st.cscsi_do_cmd( SCpnt,
SCpnt706drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt711drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt715drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt764drivers/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt828drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt864drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt865drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt866drivers/scsi/st.cscsi_do_cmd (SCpnt,
SCpnt874drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt882drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
SCpnt883drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x40)) {
SCpnt884drivers/scsi/st.cif (STp->block_size != 0 && (SCpnt->sense_buffer[0] & 0x80) != 0)
SCpnt885drivers/scsi/st.ctransfer = (SCpnt->sense_buffer[3] << 24) |
SCpnt886drivers/scsi/st.c(SCpnt->sense_buffer[4] << 16) |
SCpnt887drivers/scsi/st.c(SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6];
SCpnt889drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW)
SCpnt927drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt957drivers/scsi/st.cSCpnt->request.dev = -1;
SCpnt980drivers/scsi/st.cSCpnt->result = (STp->buffer)->last_result = -1;
SCpnt981drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt982drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt983drivers/scsi/st.cscsi_do_cmd (SCpnt,
SCpnt989drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt1004drivers/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt1046drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt1075drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt1076drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt1077drivers/scsi/st.cscsi_do_cmd (SCpnt,
SCpnt1085drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt1096drivers/scsi/st.cSCpnt->sense_buffer[0], SCpnt->sense_buffer[1],
SCpnt1097drivers/scsi/st.cSCpnt->sense_buffer[2], SCpnt->sense_buffer[3],
SCpnt1098drivers/scsi/st.cSCpnt->sense_buffer[4], SCpnt->sense_buffer[5],
SCpnt1099drivers/scsi/st.cSCpnt->sense_buffer[6], SCpnt->sense_buffer[7]);
SCpnt1101drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x70) == 0x70) { /* extended sense */
SCpnt1103drivers/scsi/st.cif ((SCpnt->sense_buffer[2] & 0xe0) != 0) { /* EOF, EOM, or ILI */
SCpnt1105drivers/scsi/st.cif ((SCpnt->sense_buffer[0] & 0x80) != 0)
SCpnt1106drivers/scsi/st.ctransfer = (SCpnt->sense_buffer[3] << 24) |
SCpnt1107drivers/scsi/st.c(SCpnt->sense_buffer[4] << 16) |
SCpnt1108drivers/scsi/st.c(SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6];
SCpnt1112drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == MEDIUM_ERROR)
SCpnt1115drivers/scsi/st.cif (SCpnt->sense_buffer[2] & 0x20) {
SCpnt1123drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt1127drivers/scsi/st.celse if (SCpnt->sense_buffer[2] & 0x40) {
SCpnt1140drivers/scsi/st.celse if (SCpnt->sense_buffer[2] & 0x80) {
SCpnt1160drivers/scsi/st.cSCpnt->request.dev = -1;
SCpnt1165drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == BLANK_CHECK) {
SCpnt1180drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt1215drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt1234drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt1296drivers/scsi/st.cScsi_Cmnd * SCpnt;
SCpnt1612drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt1613drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt1614drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt1615drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt1623drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt1629drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt1677drivers/scsi/st.cif (SCpnt->sense_buffer[2] & 0x40) {
SCpnt1685drivers/scsi/st.c(SCpnt->sense_buffer[3] << 24) +
SCpnt1686drivers/scsi/st.c(SCpnt->sense_buffer[4] << 16) +
SCpnt1687drivers/scsi/st.c(SCpnt->sense_buffer[5] << 8) +
SCpnt1688drivers/scsi/st.cSCpnt->sense_buffer[6] );
SCpnt1701drivers/scsi/st.cif (SCpnt->sense_buffer[2] & 0x80) { /* Hit filemark */
SCpnt1713drivers/scsi/st.cif (SCpnt->sense_buffer[2] & 0x80) { /* Hit filemark */
SCpnt1729drivers/scsi/st.c(SCpnt->sense_buffer[2] & 0x0f) == BLANK_CHECK)
SCpnt1748drivers/scsi/st.cScsi_Cmnd *SCpnt;
SCpnt1860drivers/scsi/st.cSCpnt = allocate_device(NULL, STp->device, 1);
SCpnt1862drivers/scsi/st.cSCpnt->sense_buffer[0]=0;
SCpnt1872drivers/scsi/st.cSCpnt->request.dev = dev;
SCpnt1873drivers/scsi/st.cSCpnt->sense_buffer[0] = 0;
SCpnt1874drivers/scsi/st.cscsi_do_cmd(SCpnt,
SCpnt1882drivers/scsi/st.cif (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) );
SCpnt1908drivers/scsi/st.cSCpnt->request.dev = -1;  /* Mark as not busy */
SCpnt53drivers/scsi/st.hScsi_Cmnd SCpnt;
SCpnt247drivers/scsi/u14-34f.cScsi_Cmnd *SCpnt;
SCpnt541drivers/scsi/u14-34f.cstatic inline void build_sg_list(struct mscp *cpp, Scsi_Cmnd *SCpnt) {
SCpnt545drivers/scsi/u14-34f.csgpnt = (struct scatterlist *) SCpnt->request_buffer;
SCpnt547drivers/scsi/u14-34f.cfor (k = 0; k < SCpnt->use_sg; k++) {
SCpnt553drivers/scsi/u14-34f.ccpp->use_sg = SCpnt->use_sg;
SCpnt558drivers/scsi/u14-34f.cint u14_34f_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) {
SCpnt565drivers/scsi/u14-34f.cj = ((struct hostdata *) SCpnt->host->hostdata)->board_number;
SCpnt567drivers/scsi/u14-34f.cif (!done) panic("%s: qcomm, pid %ld, null done.\n", BN(j), SCpnt->pid);
SCpnt588drivers/scsi/u14-34f.celse if (u14_34f_reset(SCpnt) == SCSI_RESET_SUCCESS) 
SCpnt591drivers/scsi/u14-34f.cSCpnt->result = DID_BUS_BUSY << 16; 
SCpnt592drivers/scsi/u14-34f.cSCpnt->host_scribble = NULL;
SCpnt593drivers/scsi/u14-34f.cprintk("%s: qcomm, pid %ld, DID_BUS_BUSY, done.\n", BN(j), SCpnt->pid);
SCpnt595drivers/scsi/u14-34f.cdone(SCpnt);    
SCpnt603drivers/scsi/u14-34f.cSCpnt->scsi_done = done;
SCpnt605drivers/scsi/u14-34f.cSCpnt->host_scribble = (unsigned char *) &cpp->index;
SCpnt608drivers/scsi/u14-34f.cBN(j), i, SCpnt->target, SCpnt->pid);
SCpnt612drivers/scsi/u14-34f.ccpp->target = SCpnt->target;
SCpnt613drivers/scsi/u14-34f.ccpp->lun = SCpnt->lun;
SCpnt614drivers/scsi/u14-34f.ccpp->SCpnt = SCpnt;
SCpnt615drivers/scsi/u14-34f.ccpp->sense_addr = (unsigned int) SCpnt->sense_buffer;
SCpnt616drivers/scsi/u14-34f.ccpp->sense_len = sizeof SCpnt->sense_buffer;
SCpnt618drivers/scsi/u14-34f.cif (SCpnt->use_sg) {
SCpnt620drivers/scsi/u14-34f.cbuild_sg_list(cpp, SCpnt);
SCpnt623drivers/scsi/u14-34f.ccpp->data_address = (unsigned int)SCpnt->request_buffer;
SCpnt624drivers/scsi/u14-34f.ccpp->data_len = SCpnt->request_bufflen;
SCpnt627drivers/scsi/u14-34f.ccpp->scsi_cdbs_len = SCpnt->cmd_len;
SCpnt628drivers/scsi/u14-34f.cmemcpy(cpp->scsi_cdbs, SCpnt->cmnd, cpp->scsi_cdbs_len);
SCpnt631drivers/scsi/u14-34f.cSCpnt->result = DID_ERROR << 16;
SCpnt632drivers/scsi/u14-34f.cSCpnt->host_scribble = NULL;
SCpnt634drivers/scsi/u14-34f.cBN(j), SCpnt->target, SCpnt->pid);
SCpnt636drivers/scsi/u14-34f.cdone(SCpnt);
SCpnt686drivers/scsi/u14-34f.cif (SCarg != HD(j)->cp[i].SCpnt)
SCpnt688drivers/scsi/u14-34f.cBN(j), i, SCarg, HD(j)->cp[i].SCpnt);
SCpnt712drivers/scsi/u14-34f.cScsi_Cmnd *SCpnt;
SCpnt749drivers/scsi/u14-34f.cSCpnt = HD(j)->cp[i].SCpnt;
SCpnt752drivers/scsi/u14-34f.cBN(j), i, SCpnt->pid);
SCpnt754drivers/scsi/u14-34f.cif (SCpnt == NULL)
SCpnt757drivers/scsi/u14-34f.cif (SCpnt->host_scribble == NULL)
SCpnt760drivers/scsi/u14-34f.cif (*(unsigned int *)SCpnt->host_scribble != i) 
SCpnt763drivers/scsi/u14-34f.cif (SCpnt->scsi_done == NULL) 
SCpnt766drivers/scsi/u14-34f.cif (SCpnt == SCarg) arg_done = TRUE;
SCpnt794drivers/scsi/u14-34f.cSCpnt = HD(j)->cp[i].SCpnt;
SCpnt795drivers/scsi/u14-34f.cSCpnt->result = DID_RESET << 16;
SCpnt796drivers/scsi/u14-34f.cSCpnt->host_scribble = NULL;
SCpnt802drivers/scsi/u14-34f.cBN(j), i, SCpnt->pid);
SCpnt804drivers/scsi/u14-34f.cSCpnt->scsi_done(SCpnt);
SCpnt833drivers/scsi/u14-34f.cScsi_Cmnd *SCpnt;
SCpnt895drivers/scsi/u14-34f.cSCpnt = spp->SCpnt;
SCpnt897drivers/scsi/u14-34f.cif (SCpnt == NULL) 
SCpnt900drivers/scsi/u14-34f.cif (SCpnt->host_scribble == NULL) 
SCpnt902drivers/scsi/u14-34f.cBN(j), i, SCpnt->pid, SCpnt);
SCpnt904drivers/scsi/u14-34f.cif (*(unsigned int *)SCpnt->host_scribble != i) 
SCpnt906drivers/scsi/u14-34f.c" irq %d.\n", BN(j), i, SCpnt->pid, 
SCpnt907drivers/scsi/u14-34f.c*(unsigned int *)SCpnt->host_scribble, irq);
SCpnt915drivers/scsi/u14-34f.cif (tstatus == BUSY && SCpnt->device->type != TYPE_TAPE) 
SCpnt920drivers/scsi/u14-34f.c&& SCpnt->device->type == TYPE_DISK
SCpnt921drivers/scsi/u14-34f.c&& HD(j)->target_reset[SCpnt->target])
SCpnt926drivers/scsi/u14-34f.c&& SCpnt->device->type == TYPE_DISK
SCpnt927drivers/scsi/u14-34f.c&& (SCpnt->sense_buffer[2] & 0xf) == RECOVERED_ERROR)
SCpnt934drivers/scsi/u14-34f.cHD(j)->target_reset[SCpnt->target] = FALSE;
SCpnt936drivers/scsi/u14-34f.cif (spp->target_status && SCpnt->device->type == TYPE_DISK)
SCpnt939drivers/scsi/u14-34f.cSCpnt->target, SCpnt->lun, SCpnt->pid,
SCpnt940drivers/scsi/u14-34f.cspp->target_status, SCpnt->sense_buffer[2]);
SCpnt942drivers/scsi/u14-34f.cHD(j)->target_time_out[SCpnt->target] = 0;
SCpnt947drivers/scsi/u14-34f.cif (HD(j)->target_time_out[SCpnt->target] > 1)
SCpnt951drivers/scsi/u14-34f.cHD(j)->target_time_out[SCpnt->target]++;
SCpnt961drivers/scsi/u14-34f.cif (SCpnt->device->type != TYPE_TAPE)
SCpnt982drivers/scsi/u14-34f.cSCpnt->result = status | spp->target_status;
SCpnt988drivers/scsi/u14-34f.cif (SCpnt->result || do_trace) 
SCpnt998drivers/scsi/u14-34f.cSCpnt->target, SCpnt->lun, SCpnt->pid, HD(j)->iocount);
SCpnt1001drivers/scsi/u14-34f.cSCpnt->host_scribble = NULL;
SCpnt1004drivers/scsi/u14-34f.cSCpnt->scsi_done(SCpnt);
SCpnt291drivers/scsi/ultrastor.cstatic inline void build_sg_list(struct mscp *, Scsi_Cmnd *SCpnt);
SCpnt649drivers/scsi/ultrastor.cstatic inline void build_sg_list(register struct mscp *mscp, Scsi_Cmnd *SCpnt)
SCpnt655drivers/scsi/ultrastor.csl = (struct scatterlist *) SCpnt->request_buffer;
SCpnt656drivers/scsi/ultrastor.cmax = SCpnt->use_sg;
SCpnt670drivers/scsi/ultrastor.cint ultrastor_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt708drivers/scsi/ultrastor.cmy_mscp->ca = SCpnt->device->type != TYPE_TAPE;
SCpnt709drivers/scsi/ultrastor.cmy_mscp->target_id = SCpnt->target;
SCpnt711drivers/scsi/ultrastor.cmy_mscp->lun = SCpnt->lun;
SCpnt712drivers/scsi/ultrastor.cif (SCpnt->use_sg) {
SCpnt715drivers/scsi/ultrastor.cbuild_sg_list(my_mscp, SCpnt);
SCpnt719drivers/scsi/ultrastor.cmy_mscp->transfer_data = (unsigned int)SCpnt->request_buffer;
SCpnt720drivers/scsi/ultrastor.cmy_mscp->transfer_data_length = SCpnt->request_bufflen;
SCpnt724drivers/scsi/ultrastor.cmy_mscp->length_of_sense_byte = sizeof SCpnt->sense_buffer;
SCpnt725drivers/scsi/ultrastor.cmy_mscp->length_of_scsi_cdbs = SCpnt->cmd_len;
SCpnt726drivers/scsi/ultrastor.cmemcpy(my_mscp->scsi_cdbs, SCpnt->cmnd, my_mscp->length_of_scsi_cdbs);
SCpnt729drivers/scsi/ultrastor.cmy_mscp->sense_data = (unsigned int)&SCpnt->sense_buffer;
SCpnt731drivers/scsi/ultrastor.cmy_mscp->SCint = SCpnt;
SCpnt732drivers/scsi/ultrastor.cSCpnt->host_scribble = (unsigned char *)my_mscp;
SCpnt778drivers/scsi/ultrastor.cSCpnt->result = status;
SCpnt779drivers/scsi/ultrastor.cdone(SCpnt);
SCpnt822drivers/scsi/ultrastor.cint ultrastor_abort(Scsi_Cmnd *SCpnt)
SCpnt837drivers/scsi/ultrastor.cif(!SCpnt->host_scribble)
SCpnt840drivers/scsi/ultrastor.cmscp_index = ((struct mscp *)SCpnt->host_scribble) - config.mscp;
SCpnt928drivers/scsi/ultrastor.cif (config.mscp[mscp_index].SCint != SCpnt)
SCpnt930drivers/scsi/ultrastor.cconfig.mscp[mscp_index].SCint, SCpnt);
SCpnt935drivers/scsi/ultrastor.cif (config.mscp[mscp_index].SCint != SCpnt) panic("Bad abort");
SCpnt939drivers/scsi/ultrastor.cSCpnt->result = DID_ABORT << 16;
SCpnt941drivers/scsi/ultrastor.cdone(SCpnt);
SCpnt947drivers/scsi/ultrastor.cint ultrastor_reset(Scsi_Cmnd * SCpnt)
SCpnt344drivers/scsi/wd7000.cScsi_Cmnd *SCpnt;             /* Scsi_Cmnd using this SCB */
SCpnt675drivers/scsi/wd7000.cscbs[i].next = &(scbs[i+1]);  scbs[i].SCpnt = NULL;
SCpnt678drivers/scsi/wd7000.cscbs[MAX_SCBS-1].SCpnt = NULL;
SCpnt793drivers/scsi/wd7000.cstatic void wd7000_scsi_done(Scsi_Cmnd * SCpnt)
SCpnt796drivers/scsi/wd7000.cprintk("wd7000_scsi_done: %06x\n",(unsigned int) SCpnt);
SCpnt798drivers/scsi/wd7000.cSCpnt->SCp.phase = 0;
SCpnt810drivers/scsi/wd7000.cregister Scsi_Cmnd *SCpnt;
SCpnt867drivers/scsi/wd7000.cSCpnt = scb->SCpnt;
SCpnt868drivers/scsi/wd7000.cif (--(SCpnt->SCp.phase) <= 0)  {  /* all scbs are done */
SCpnt872drivers/scsi/wd7000.cSCpnt->result = errstatus;
SCpnt876drivers/scsi/wd7000.cSCpnt->scsi_done(SCpnt);
SCpnt891drivers/scsi/wd7000.cint wd7000_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
SCpnt895drivers/scsi/wd7000.cregister unchar *cdb = (unchar *) SCpnt->cmnd;
SCpnt898drivers/scsi/wd7000.cAdapter *host = (Adapter *) SCpnt->host->hostdata;
SCpnt900drivers/scsi/wd7000.ccdblen = SCpnt->cmd_len;
SCpnt901drivers/scsi/wd7000.cidlun = ((SCpnt->target << 5) & 0xe0) | (SCpnt->lun & 7);
SCpnt902drivers/scsi/wd7000.cSCpnt->scsi_done = done;
SCpnt903drivers/scsi/wd7000.cSCpnt->SCp.phase = 1;
SCpnt909drivers/scsi/wd7000.cscb->SCpnt = SCpnt;         /* so we can find stuff later */
SCpnt910drivers/scsi/wd7000.cSCpnt->host_scribble = (unchar *) scb;
SCpnt913drivers/scsi/wd7000.cif (SCpnt->use_sg)  {
SCpnt914drivers/scsi/wd7000.cstruct scatterlist *sg = (struct scatterlist *) SCpnt->request_buffer;
SCpnt917drivers/scsi/wd7000.cif (SCpnt->host->sg_tablesize == SG_NONE)  {
SCpnt921drivers/scsi/wd7000.cprintk("Using scatter/gather with %d elements.\n",SCpnt->use_sg);
SCpnt927drivers/scsi/wd7000.cany2scsi(scb->maxlen, SCpnt->use_sg * sizeof (Sgb) );
SCpnt929drivers/scsi/wd7000.cfor (i = 0;  i < SCpnt->use_sg;  i++)  {
SCpnt935drivers/scsi/wd7000.cany2scsi(scb->dataptr, (int) SCpnt->request_buffer);
SCpnt936drivers/scsi/wd7000.cany2scsi(scb->maxlen, SCpnt->request_bufflen);
SCpnt944drivers/scsi/wd7000.cint wd7000_command(Scsi_Cmnd *SCpnt)
SCpnt946drivers/scsi/wd7000.cwd7000_queuecommand(SCpnt, wd7000_scsi_done);
SCpnt948drivers/scsi/wd7000.cwhile (SCpnt->SCp.phase > 0) barrier();  /* phase counts scbs down to 0 */
SCpnt950drivers/scsi/wd7000.creturn SCpnt->result;
SCpnt1185drivers/scsi/wd7000.cint wd7000_abort(Scsi_Cmnd * SCpnt)
SCpnt1187drivers/scsi/wd7000.cAdapter *host = (Adapter *) SCpnt->host->hostdata;
SCpnt1202drivers/scsi/wd7000.cint wd7000_reset(Scsi_Cmnd * SCpnt)