tag | line | file | source code |
SCpnt | 637 | drivers/scsi/NCR53c406a.c | static void internal_done(Scsi_Cmnd *SCpnt) { |
SCpnt | 638 | drivers/scsi/NCR53c406a.c | internal_done_errcode = SCpnt->result; |
SCpnt | 660 | drivers/scsi/NCR53c406a.c | int NCR53c406a_command(Scsi_Cmnd *SCpnt){ |
SCpnt | 662 | drivers/scsi/NCR53c406a.c | NCR53c406a_queue(SCpnt, internal_done); |
SCpnt | 675 | drivers/scsi/NCR53c406a.c | NCR53c406a_queue(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)){ |
SCpnt | 681 | drivers/scsi/NCR53c406a.c | SCpnt->cmnd[0], |
SCpnt | 682 | drivers/scsi/NCR53c406a.c | SCpnt->cmd_len, |
SCpnt | 683 | drivers/scsi/NCR53c406a.c | SCpnt->target, |
SCpnt | 684 | drivers/scsi/NCR53c406a.c | SCpnt->lun, |
SCpnt | 685 | drivers/scsi/NCR53c406a.c | SCpnt->request_bufflen)); |
SCpnt | 688 | drivers/scsi/NCR53c406a.c | VDEB(for(i=0; i<SCpnt->cmd_len; i++) |
SCpnt | 689 | drivers/scsi/NCR53c406a.c | printk("cmd[%d]=%02x ", i, SCpnt->cmnd[i])); |
SCpnt | 693 | drivers/scsi/NCR53c406a.c | current_SC = SCpnt; |
SCpnt | 702 | drivers/scsi/NCR53c406a.c | outb(SCpnt->target, DEST_ID); /* set destination */ |
SCpnt | 705 | drivers/scsi/NCR53c406a.c | for(i=0; i<SCpnt->cmd_len; i++){ |
SCpnt | 706 | drivers/scsi/NCR53c406a.c | outb(SCpnt->cmnd[i], SCSI_FIFO); |
SCpnt | 716 | drivers/scsi/NCR53c406a.c | NCR53c406a_abort(Scsi_Cmnd *SCpnt){ |
SCpnt | 722 | drivers/scsi/NCR53c406a.c | NCR53c406a_reset(Scsi_Cmnd *SCpnt){ |
SCpnt | 793 | drivers/scsi/aha152x.c | int aha152x_queue( Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 809 | drivers/scsi/aha152x.c | printk( "SCpnt (target = %d lun = %d cmnd = ", SCpnt->target, SCpnt->lun); |
SCpnt | 810 | drivers/scsi/aha152x.c | print_command(SCpnt->cmnd); |
SCpnt | 812 | drivers/scsi/aha152x.c | SCpnt->cmd_len, SCpnt->use_sg, SCpnt->request_bufflen ); |
SCpnt | 817 | drivers/scsi/aha152x.c | SCpnt->scsi_done = done; |
SCpnt | 825 | drivers/scsi/aha152x.c | SCpnt->SCp.phase = not_issued; |
SCpnt | 826 | drivers/scsi/aha152x.c | if (SCpnt->use_sg) |
SCpnt | 828 | drivers/scsi/aha152x.c | SCpnt->SCp.buffer = (struct scatterlist *)SCpnt->request_buffer; |
SCpnt | 829 | drivers/scsi/aha152x.c | SCpnt->SCp.ptr = SCpnt->SCp.buffer->address; |
SCpnt | 830 | drivers/scsi/aha152x.c | SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length; |
SCpnt | 831 | drivers/scsi/aha152x.c | SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1; |
SCpnt | 835 | drivers/scsi/aha152x.c | SCpnt->SCp.ptr = (char *)SCpnt->request_buffer; |
SCpnt | 836 | drivers/scsi/aha152x.c | SCpnt->SCp.this_residual = SCpnt->request_bufflen; |
SCpnt | 837 | drivers/scsi/aha152x.c | SCpnt->SCp.buffer = NULL; |
SCpnt | 838 | drivers/scsi/aha152x.c | SCpnt->SCp.buffers_residual = 0; |
SCpnt | 841 | drivers/scsi/aha152x.c | SCpnt->SCp.Status = CHECK_CONDITION; |
SCpnt | 842 | drivers/scsi/aha152x.c | SCpnt->SCp.Message = 0; |
SCpnt | 843 | drivers/scsi/aha152x.c | SCpnt->SCp.have_data_in = 0; |
SCpnt | 844 | drivers/scsi/aha152x.c | SCpnt->SCp.sent_command = 0; |
SCpnt | 857 | drivers/scsi/aha152x.c | append_SC( &issue_SC, SCpnt); |
SCpnt | 877 | drivers/scsi/aha152x.c | int aha152x_command( Scsi_Cmnd *SCpnt ) |
SCpnt | 887 | drivers/scsi/aha152x.c | int aha152x_abort( Scsi_Cmnd *SCpnt) |
SCpnt | 898 | drivers/scsi/aha152x.c | printk("aha152x: abort(), SCpnt=0x%08x, ", (unsigned int) SCpnt ); |
SCpnt | 906 | drivers/scsi/aha152x.c | ptr && ptr!=SCpnt; |
SCpnt | 927 | drivers/scsi/aha152x.c | if ( TESTLO(SSTAT1, BUSFREE) || (current_SC && current_SC!=SCpnt)) |
SCpnt | 952 | drivers/scsi/aha152x.c | ptr && ptr!=SCpnt; |
SCpnt | 513 | drivers/scsi/aha1542.c | int aha1542_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 517 | drivers/scsi/aha1542.c | unchar *cmd = (unchar *) SCpnt->cmnd; |
SCpnt | 518 | drivers/scsi/aha1542.c | unchar target = SCpnt->target; |
SCpnt | 519 | drivers/scsi/aha1542.c | unchar lun = SCpnt->lun; |
SCpnt | 521 | drivers/scsi/aha1542.c | void *buff = SCpnt->request_buffer; |
SCpnt | 522 | drivers/scsi/aha1542.c | int bufflen = SCpnt->request_bufflen; |
SCpnt | 529 | drivers/scsi/aha1542.c | mb = HOSTDATA(SCpnt->host)->mb; |
SCpnt | 530 | drivers/scsi/aha1542.c | ccb = HOSTDATA(SCpnt->host)->ccb; |
SCpnt | 533 | drivers/scsi/aha1542.c | SCpnt->result = DID_TIME_OUT << 16; |
SCpnt | 534 | drivers/scsi/aha1542.c | done(SCpnt); return 0;}); |
SCpnt | 538 | drivers/scsi/aha1542.c | if (bufflen != sizeof(SCpnt->sense_buffer)) { |
SCpnt | 542 | drivers/scsi/aha1542.c | SCpnt->result = 0; |
SCpnt | 543 | drivers/scsi/aha1542.c | done(SCpnt); |
SCpnt | 560 | drivers/scsi/aha1542.c | for (i = 0; i < SCpnt->cmd_len; i++) printk("%02x ", cmd[i]); |
SCpnt | 570 | drivers/scsi/aha1542.c | mbo = HOSTDATA(SCpnt->host)->aha1542_last_mbo_used + 1; |
SCpnt | 574 | drivers/scsi/aha1542.c | if(mb[mbo].status == 0 && HOSTDATA(SCpnt->host)->SCint[mbo] == NULL) |
SCpnt | 578 | drivers/scsi/aha1542.c | } while (mbo != HOSTDATA(SCpnt->host)->aha1542_last_mbo_used); |
SCpnt | 580 | drivers/scsi/aha1542.c | if(mb[mbo].status || HOSTDATA(SCpnt->host)->SCint[mbo]) |
SCpnt | 583 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->SCint[mbo] = SCpnt; /* This will effectively prevent someone else from |
SCpnt | 586 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->aha1542_last_mbo_used = mbo; |
SCpnt | 597 | drivers/scsi/aha1542.c | ccb[mbo].cdblen = SCpnt->cmd_len; |
SCpnt | 607 | drivers/scsi/aha1542.c | if (SCpnt->use_sg) { |
SCpnt | 615 | drivers/scsi/aha1542.c | SCpnt->host_scribble = (unsigned char *) scsi_malloc(512); |
SCpnt | 616 | drivers/scsi/aha1542.c | sgpnt = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 617 | drivers/scsi/aha1542.c | cptr = (struct chain *) SCpnt->host_scribble; |
SCpnt | 619 | drivers/scsi/aha1542.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 620 | drivers/scsi/aha1542.c | if(sgpnt[i].length == 0 || SCpnt->use_sg > 16 || |
SCpnt | 623 | drivers/scsi/aha1542.c | printk("Bad segment list supplied to aha1542.c (%d, %d)\n",SCpnt->use_sg,i); |
SCpnt | 624 | drivers/scsi/aha1542.c | for(i=0;i<SCpnt->use_sg;i++){ |
SCpnt | 637 | drivers/scsi/aha1542.c | any2scsi(ccb[mbo].datalen, SCpnt->use_sg * sizeof(struct chain)); |
SCpnt | 646 | drivers/scsi/aha1542.c | SCpnt->host_scribble = NULL; |
SCpnt | 666 | drivers/scsi/aha1542.c | SCpnt->scsi_done = done; |
SCpnt | 668 | drivers/scsi/aha1542.c | aha1542_out(SCpnt->host->io_port, &ahacmd, 1); /* start scsi command */ |
SCpnt | 679 | drivers/scsi/aha1542.c | static void internal_done(Scsi_Cmnd * SCpnt) |
SCpnt | 681 | drivers/scsi/aha1542.c | SCpnt->SCp.Status++; |
SCpnt | 684 | drivers/scsi/aha1542.c | int aha1542_command(Scsi_Cmnd * SCpnt) |
SCpnt | 688 | drivers/scsi/aha1542.c | aha1542_queuecommand(SCpnt, internal_done); |
SCpnt | 690 | drivers/scsi/aha1542.c | SCpnt->SCp.Status = 0; |
SCpnt | 691 | drivers/scsi/aha1542.c | while (!SCpnt->SCp.Status) |
SCpnt | 693 | drivers/scsi/aha1542.c | return SCpnt->result; |
SCpnt | 1112 | drivers/scsi/aha1542.c | int aha1542_abort(Scsi_Cmnd * SCpnt) |
SCpnt | 1121 | drivers/scsi/aha1542.c | inb(STATUS(SCpnt->host->io_port)), |
SCpnt | 1122 | drivers/scsi/aha1542.c | inb(INTRFLAGS(SCpnt->host->io_port))); |
SCpnt | 1126 | drivers/scsi/aha1542.c | mb = HOSTDATA(SCpnt->host)->mb; |
SCpnt | 1127 | drivers/scsi/aha1542.c | mbi = HOSTDATA(SCpnt->host)->aha1542_last_mbi_used + 1; |
SCpnt | 1134 | drivers/scsi/aha1542.c | } while (mbi != HOSTDATA(SCpnt->host)->aha1542_last_mbi_used); |
SCpnt | 1139 | drivers/scsi/aha1542.c | SCpnt->host->irq); |
SCpnt | 1140 | drivers/scsi/aha1542.c | aha1542_intr_handle(SCpnt->host->irq, NULL); |
SCpnt | 1148 | drivers/scsi/aha1542.c | if(HOSTDATA(SCpnt->host)->SCint[i]) |
SCpnt | 1150 | drivers/scsi/aha1542.c | if(HOSTDATA(SCpnt->host)->SCint[i] == SCpnt) { |
SCpnt | 1152 | drivers/scsi/aha1542.c | kdevname(SCpnt->request.rq_dev)); |
SCpnt | 1153 | drivers/scsi/aha1542.c | if (HOSTDATA(SCpnt->host)->mb[i].status) { |
SCpnt | 1155 | drivers/scsi/aha1542.c | aha1542_out(SCpnt->host->io_port, &ahacmd, 1); |
SCpnt | 1159 | drivers/scsi/aha1542.c | kdevname(SCpnt->request.rq_dev)); |
SCpnt | 1169 | drivers/scsi/aha1542.c | if (SCpnt == HOSTDATA(SCpnt->host)->SCint[mbo]){ |
SCpnt | 1171 | drivers/scsi/aha1542.c | aha1542_out(SCpnt->host->io_port, &ahacmd, 1); /* start scsi command */ |
SCpnt | 1185 | drivers/scsi/aha1542.c | int aha1542_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 1193 | drivers/scsi/aha1542.c | if( SCpnt->host->suggest_bus_reset ) |
SCpnt | 1201 | drivers/scsi/aha1542.c | outb(HRST | SCRST, CONTROL(SCpnt->host->io_port)); |
SCpnt | 1210 | drivers/scsi/aha1542.c | WAIT(STATUS(SCpnt->host->io_port), |
SCpnt | 1217 | drivers/scsi/aha1542.c | setup_mailboxes(SCpnt->host->io_port, SCpnt->host); |
SCpnt | 1225 | drivers/scsi/aha1542.c | printk("Sent BUS RESET to scsi host %d\n", SCpnt->host->host_no); |
SCpnt | 1228 | drivers/scsi/aha1542.c | if(HOSTDATA(SCpnt->host)->SCint[i] != NULL) |
SCpnt | 1231 | drivers/scsi/aha1542.c | SCtmp = HOSTDATA(SCpnt->host)->SCint[i]; |
SCpnt | 1234 | drivers/scsi/aha1542.c | printk("Sending DID_RESET for target %d\n", SCpnt->target); |
SCpnt | 1235 | drivers/scsi/aha1542.c | SCtmp->scsi_done(SCpnt); |
SCpnt | 1237 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->SCint[i] = NULL; |
SCpnt | 1238 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->mb[i].status = 0; |
SCpnt | 1258 | drivers/scsi/aha1542.c | if(HOSTDATA(SCpnt->host)->SCint[i] == SCpnt) |
SCpnt | 1260 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->ccb[i].op = 0x81; /* BUS DEVICE RESET */ |
SCpnt | 1262 | drivers/scsi/aha1542.c | aha1542_out(SCpnt->host->io_port, &ahacmd, 1); |
SCpnt | 1268 | drivers/scsi/aha1542.c | printk("Sent BUS DEVICE RESET to target %d\n", SCpnt->target); |
SCpnt | 1274 | drivers/scsi/aha1542.c | if(HOSTDATA(SCpnt->host)->SCint[i] && |
SCpnt | 1275 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->SCint[i]->target == SCpnt->target) |
SCpnt | 1278 | drivers/scsi/aha1542.c | SCtmp = HOSTDATA(SCpnt->host)->SCint[i]; |
SCpnt | 1281 | drivers/scsi/aha1542.c | printk("Sending DID_RESET for target %d\n", SCpnt->target); |
SCpnt | 1282 | drivers/scsi/aha1542.c | SCtmp->scsi_done(SCpnt); |
SCpnt | 1284 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->SCint[i] = NULL; |
SCpnt | 1285 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->mb[i].status = 0; |
SCpnt | 206 | drivers/scsi/aha1740.c | SCtmp = ecbptr->SCpnt; |
SCpnt | 252 | drivers/scsi/aha1740.c | int aha1740_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 255 | drivers/scsi/aha1740.c | unchar *cmd = (unchar *) SCpnt->cmnd; |
SCpnt | 256 | drivers/scsi/aha1740.c | unchar target = SCpnt->target; |
SCpnt | 258 | drivers/scsi/aha1740.c | void *buff = SCpnt->request_buffer; |
SCpnt | 259 | drivers/scsi/aha1740.c | int bufflen = SCpnt->request_bufflen; |
SCpnt | 266 | drivers/scsi/aha1740.c | if (bufflen != sizeof(SCpnt->sense_buffer)) |
SCpnt | 270 | drivers/scsi/aha1740.c | SCpnt->result = 0; |
SCpnt | 271 | drivers/scsi/aha1740.c | done(SCpnt); |
SCpnt | 284 | drivers/scsi/aha1740.c | for (i = 0; i < SCpnt->cmd_len; i++) printk("%02x ", cmd[i]); |
SCpnt | 314 | drivers/scsi/aha1740.c | ecb[ecbno].cdblen = SCpnt->cmd_len; /* SCSI Command Descriptor Block Length */ |
SCpnt | 324 | drivers/scsi/aha1740.c | if (SCpnt->use_sg) |
SCpnt | 333 | drivers/scsi/aha1740.c | SCpnt->host_scribble = (unsigned char *) scsi_malloc(512); |
SCpnt | 334 | drivers/scsi/aha1740.c | sgpnt = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 335 | drivers/scsi/aha1740.c | cptr = (struct aha1740_chain *) SCpnt->host_scribble; |
SCpnt | 337 | drivers/scsi/aha1740.c | for(i=0; i<SCpnt->use_sg; i++) |
SCpnt | 342 | drivers/scsi/aha1740.c | ecb[ecbno].datalen = SCpnt->use_sg * sizeof(struct aha1740_chain); |
SCpnt | 352 | drivers/scsi/aha1740.c | SCpnt->host_scribble = NULL; |
SCpnt | 356 | drivers/scsi/aha1740.c | ecb[ecbno].lun = SCpnt->lun; |
SCpnt | 364 | drivers/scsi/aha1740.c | ecb[ecbno].SCpnt = SCpnt; |
SCpnt | 415 | drivers/scsi/aha1740.c | static void internal_done(Scsi_Cmnd * SCpnt) |
SCpnt | 417 | drivers/scsi/aha1740.c | internal_done_errcode = SCpnt->result; |
SCpnt | 421 | drivers/scsi/aha1740.c | int aha1740_command(Scsi_Cmnd * SCpnt) |
SCpnt | 423 | drivers/scsi/aha1740.c | aha1740_queuecommand(SCpnt, internal_done); |
SCpnt | 492 | drivers/scsi/aha1740.c | int aha1740_abort(Scsi_Cmnd * SCpnt) |
SCpnt | 502 | drivers/scsi/aha1740.c | int aha1740_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 143 | drivers/scsi/aha1740.h | Scsi_Cmnd *SCpnt; /* Link to the SCSI Command Block */ |
SCpnt | 373 | drivers/scsi/constants.c | void print_sense(const char * devclass, Scsi_Cmnd * SCpnt) |
SCpnt | 377 | drivers/scsi/constants.c | unsigned char * sense_buffer = SCpnt->sense_buffer; |
SCpnt | 386 | drivers/scsi/constants.c | if(s > sizeof(SCpnt->sense_buffer)) s = sizeof(SCpnt->sense_buffer); |
SCpnt | 410 | drivers/scsi/constants.c | kdevname(SCpnt->request.rq_dev), snstext[sense_buffer[2] & 0x0f]); |
SCpnt | 413 | drivers/scsi/constants.c | kdevname(SCpnt->request.rq_dev), sense_buffer[0], sense_buffer[2]); |
SCpnt | 442 | drivers/scsi/constants.c | kdevname(SCpnt->request.rq_dev), snstext[sense_buffer[0] & 0x0f]); |
SCpnt | 446 | drivers/scsi/constants.c | kdevname(SCpnt->request.rq_dev), sense_buffer[0], sense_buffer[2]); |
SCpnt | 261 | drivers/scsi/eata.c | Scsi_Cmnd *SCpnt; /* Address set in cp */ |
SCpnt | 288 | drivers/scsi/eata.c | Scsi_Cmnd *SCpnt; /* Address to be returned is sp */ |
SCpnt | 590 | drivers/scsi/eata.c | static inline void build_sg_list(struct mscp *cpp, Scsi_Cmnd *SCpnt) { |
SCpnt | 594 | drivers/scsi/eata.c | sgpnt = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 596 | drivers/scsi/eata.c | for (k = 0; k < SCpnt->use_sg; k++) { |
SCpnt | 602 | drivers/scsi/eata.c | cpp->data_len = htonl((SCpnt->use_sg * sizeof(struct sg_list))); |
SCpnt | 605 | drivers/scsi/eata.c | int eata2x_queuecommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) { |
SCpnt | 619 | drivers/scsi/eata.c | j = ((struct hostdata *) SCpnt->host->hostdata)->board_number; |
SCpnt | 621 | drivers/scsi/eata.c | if (!done) panic("%s: qcomm, pid %ld, null done.\n", BN(j), SCpnt->pid); |
SCpnt | 642 | drivers/scsi/eata.c | else if (eata2x_reset(SCpnt) == SCSI_RESET_SUCCESS) |
SCpnt | 645 | drivers/scsi/eata.c | SCpnt->result = DID_BUS_BUSY << 16; |
SCpnt | 646 | drivers/scsi/eata.c | SCpnt->host_scribble = NULL; |
SCpnt | 647 | drivers/scsi/eata.c | printk("%s: qcomm, pid %ld, DID_BUS_BUSY, done.\n", BN(j), SCpnt->pid); |
SCpnt | 649 | drivers/scsi/eata.c | done(SCpnt); |
SCpnt | 666 | drivers/scsi/eata.c | SCpnt->scsi_done = done; |
SCpnt | 668 | drivers/scsi/eata.c | SCpnt->host_scribble = (unsigned char *) &cpp->index; |
SCpnt | 671 | drivers/scsi/eata.c | BN(j), i, SCpnt->target, SCpnt->pid); |
SCpnt | 674 | drivers/scsi/eata.c | if (SCpnt->cmnd[0] == data_out_cmds[k]) { |
SCpnt | 683 | drivers/scsi/eata.c | cpp->target = SCpnt->target; |
SCpnt | 684 | drivers/scsi/eata.c | cpp->lun = SCpnt->lun; |
SCpnt | 685 | drivers/scsi/eata.c | cpp->SCpnt = SCpnt; |
SCpnt | 686 | drivers/scsi/eata.c | cpp->sense_addr = htonl((unsigned int) SCpnt->sense_buffer); |
SCpnt | 687 | drivers/scsi/eata.c | cpp->sense_len = sizeof SCpnt->sense_buffer; |
SCpnt | 689 | drivers/scsi/eata.c | if (SCpnt->use_sg) { |
SCpnt | 691 | drivers/scsi/eata.c | build_sg_list(cpp, SCpnt); |
SCpnt | 694 | drivers/scsi/eata.c | cpp->data_address = htonl((unsigned int) SCpnt->request_buffer); |
SCpnt | 695 | drivers/scsi/eata.c | cpp->data_len = htonl(SCpnt->request_bufflen); |
SCpnt | 698 | drivers/scsi/eata.c | memcpy(cpp->cdb, SCpnt->cmnd, SCpnt->cmd_len); |
SCpnt | 702 | drivers/scsi/eata.c | SCpnt->result = DID_ERROR << 16; |
SCpnt | 703 | drivers/scsi/eata.c | SCpnt->host_scribble = NULL; |
SCpnt | 705 | drivers/scsi/eata.c | BN(j), SCpnt->target, SCpnt->pid); |
SCpnt | 707 | drivers/scsi/eata.c | done(SCpnt); |
SCpnt | 752 | drivers/scsi/eata.c | if (SCarg != HD(j)->cp[i].SCpnt) |
SCpnt | 754 | drivers/scsi/eata.c | BN(j), i, SCarg, HD(j)->cp[i].SCpnt); |
SCpnt | 778 | drivers/scsi/eata.c | Scsi_Cmnd *SCpnt; |
SCpnt | 815 | drivers/scsi/eata.c | SCpnt = HD(j)->cp[i].SCpnt; |
SCpnt | 818 | drivers/scsi/eata.c | BN(j), i, SCpnt->pid); |
SCpnt | 820 | drivers/scsi/eata.c | if (SCpnt == NULL) |
SCpnt | 823 | drivers/scsi/eata.c | if (SCpnt->host_scribble == NULL) |
SCpnt | 826 | drivers/scsi/eata.c | if (*(unsigned int *)SCpnt->host_scribble != i) |
SCpnt | 829 | drivers/scsi/eata.c | if (SCpnt->scsi_done == NULL) |
SCpnt | 832 | drivers/scsi/eata.c | if (SCpnt == SCarg) arg_done = TRUE; |
SCpnt | 859 | drivers/scsi/eata.c | SCpnt = HD(j)->cp[i].SCpnt; |
SCpnt | 860 | drivers/scsi/eata.c | SCpnt->result = DID_RESET << 16; |
SCpnt | 861 | drivers/scsi/eata.c | SCpnt->host_scribble = NULL; |
SCpnt | 867 | drivers/scsi/eata.c | BN(j), i, SCpnt->pid); |
SCpnt | 869 | drivers/scsi/eata.c | SCpnt->scsi_done(SCpnt); |
SCpnt | 888 | drivers/scsi/eata.c | Scsi_Cmnd *SCpnt; |
SCpnt | 954 | drivers/scsi/eata.c | SCpnt = spp->SCpnt; |
SCpnt | 956 | drivers/scsi/eata.c | if (SCpnt == NULL) |
SCpnt | 959 | drivers/scsi/eata.c | if (SCpnt != cpp->SCpnt) |
SCpnt | 961 | drivers/scsi/eata.c | BN(j), i, SCpnt, cpp->SCpnt); |
SCpnt | 963 | drivers/scsi/eata.c | if (SCpnt->host_scribble == NULL) |
SCpnt | 965 | drivers/scsi/eata.c | BN(j), i, SCpnt->pid, SCpnt); |
SCpnt | 967 | drivers/scsi/eata.c | if (*(unsigned int *)SCpnt->host_scribble != i) |
SCpnt | 969 | drivers/scsi/eata.c | " irq %d.\n", BN(j), i, SCpnt->pid, |
SCpnt | 970 | drivers/scsi/eata.c | *(unsigned int *)SCpnt->host_scribble, irq); |
SCpnt | 978 | drivers/scsi/eata.c | if (tstatus == BUSY && SCpnt->device->type != TYPE_TAPE) |
SCpnt | 983 | drivers/scsi/eata.c | && SCpnt->device->type == TYPE_DISK |
SCpnt | 984 | drivers/scsi/eata.c | && HD(j)->target_reset[SCpnt->target]) |
SCpnt | 989 | drivers/scsi/eata.c | && SCpnt->device->type == TYPE_DISK |
SCpnt | 990 | drivers/scsi/eata.c | && (SCpnt->sense_buffer[2] & 0xf) == RECOVERED_ERROR) |
SCpnt | 997 | drivers/scsi/eata.c | HD(j)->target_reset[SCpnt->target] = FALSE; |
SCpnt | 999 | drivers/scsi/eata.c | if (spp->target_status && SCpnt->device->type == TYPE_DISK) |
SCpnt | 1002 | drivers/scsi/eata.c | SCpnt->target, SCpnt->lun, SCpnt->pid, |
SCpnt | 1003 | drivers/scsi/eata.c | spp->target_status, SCpnt->sense_buffer[2]); |
SCpnt | 1005 | drivers/scsi/eata.c | HD(j)->target_time_out[SCpnt->target] = 0; |
SCpnt | 1011 | drivers/scsi/eata.c | if (HD(j)->target_time_out[SCpnt->target] > 1) |
SCpnt | 1015 | drivers/scsi/eata.c | HD(j)->target_time_out[SCpnt->target]++; |
SCpnt | 1022 | drivers/scsi/eata.c | if (SCpnt->device->type != TYPE_TAPE) |
SCpnt | 1044 | drivers/scsi/eata.c | SCpnt->result = status | spp->target_status; |
SCpnt | 1050 | drivers/scsi/eata.c | if (SCpnt->result || do_trace) |
SCpnt | 1060 | drivers/scsi/eata.c | SCpnt->target, SCpnt->lun, SCpnt->pid, HD(j)->iocount); |
SCpnt | 1063 | drivers/scsi/eata.c | SCpnt->host_scribble = NULL; |
SCpnt | 1066 | drivers/scsi/eata.c | SCpnt->scsi_done(SCpnt); |
SCpnt | 1644 | drivers/scsi/fdomain.c | int fdomain_16x0_queue( Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 1651 | drivers/scsi/fdomain.c | SCpnt->target, |
SCpnt | 1652 | drivers/scsi/fdomain.c | *(unsigned char *)SCpnt->cmnd, |
SCpnt | 1653 | drivers/scsi/fdomain.c | SCpnt->use_sg, |
SCpnt | 1654 | drivers/scsi/fdomain.c | SCpnt->request_bufflen ); |
SCpnt | 1659 | drivers/scsi/fdomain.c | current_SC = SCpnt; /* Save this for the done function */ |
SCpnt | 1702 | drivers/scsi/fdomain.c | static void internal_done( Scsi_Cmnd *SCpnt ) |
SCpnt | 1704 | drivers/scsi/fdomain.c | internal_done_errcode = SCpnt->result; |
SCpnt | 1708 | drivers/scsi/fdomain.c | int fdomain_16x0_command( Scsi_Cmnd *SCpnt ) |
SCpnt | 1710 | drivers/scsi/fdomain.c | fdomain_16x0_queue( SCpnt, internal_done ); |
SCpnt | 1720 | drivers/scsi/fdomain.c | void print_info( Scsi_Cmnd *SCpnt ) |
SCpnt | 1726 | drivers/scsi/fdomain.c | if (!SCpnt || !SCpnt->host) { |
SCpnt | 1730 | drivers/scsi/fdomain.c | printk( "%s\n", fdomain_16x0_info( SCpnt->host ) ); |
SCpnt | 1731 | drivers/scsi/fdomain.c | print_banner( SCpnt->host ); |
SCpnt | 1732 | drivers/scsi/fdomain.c | switch (SCpnt->SCp.phase) { |
SCpnt | 1740 | drivers/scsi/fdomain.c | SCpnt->SCp.phase, |
SCpnt | 1741 | drivers/scsi/fdomain.c | SCpnt->target, |
SCpnt | 1742 | drivers/scsi/fdomain.c | *(unsigned char *)SCpnt->cmnd, |
SCpnt | 1743 | drivers/scsi/fdomain.c | SCpnt->use_sg, |
SCpnt | 1744 | drivers/scsi/fdomain.c | SCpnt->request_bufflen ); |
SCpnt | 1746 | drivers/scsi/fdomain.c | SCpnt->SCp.sent_command, |
SCpnt | 1747 | drivers/scsi/fdomain.c | SCpnt->SCp.have_data_in, |
SCpnt | 1748 | drivers/scsi/fdomain.c | SCpnt->timeout ); |
SCpnt | 1789 | drivers/scsi/fdomain.c | int fdomain_16x0_abort( Scsi_Cmnd *SCpnt) |
SCpnt | 1807 | drivers/scsi/fdomain.c | print_info( SCpnt ); |
SCpnt | 1824 | drivers/scsi/fdomain.c | int fdomain_16x0_reset( Scsi_Cmnd *SCpnt ) |
SCpnt | 1831 | drivers/scsi/fdomain.c | if (SCpnt) printk( "fdomain: SCSI Bus Reset\n" ); |
SCpnt | 418 | drivers/scsi/in2000.c | int in2000_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 421 | drivers/scsi/in2000.c | unchar *cmd = (unchar *) SCpnt->cmnd; |
SCpnt | 422 | drivers/scsi/in2000.c | unchar target = SCpnt->target; |
SCpnt | 423 | drivers/scsi/in2000.c | void *buff = SCpnt->request_buffer; |
SCpnt | 425 | drivers/scsi/in2000.c | int bufflen = SCpnt->request_bufflen; |
SCpnt | 452 | drivers/scsi/in2000.c | for (i = 0; i < SCpnt->cmd_len; i++) printk("%02x ", cmd[i]); |
SCpnt | 458 | drivers/scsi/in2000.c | size = SCpnt->cmd_len; /* CDB length */ |
SCpnt | 497 | drivers/scsi/in2000.c | SCpnt->result = DID_TIME_OUT << 16; |
SCpnt | 498 | drivers/scsi/in2000.c | (*done)(SCpnt); |
SCpnt | 502 | drivers/scsi/in2000.c | in2000_nsegment = SCpnt->use_sg; |
SCpnt | 504 | drivers/scsi/in2000.c | if(SCpnt->use_sg){ |
SCpnt | 514 | drivers/scsi/in2000.c | in2000_SCptr = SCpnt; |
SCpnt | 522 | drivers/scsi/in2000.c | outb(SCpnt->lun & 7,INDATA); |
SCpnt | 523 | drivers/scsi/in2000.c | SCpnt->host_scribble = NULL; |
SCpnt | 567 | drivers/scsi/in2000.c | static void internal_done(Scsi_Cmnd * SCpnt) |
SCpnt | 569 | drivers/scsi/in2000.c | internal_done_errcode = SCpnt->result; |
SCpnt | 573 | drivers/scsi/in2000.c | int in2000_command(Scsi_Cmnd * SCpnt) |
SCpnt | 575 | drivers/scsi/in2000.c | in2000_queuecommand(SCpnt, internal_done); |
SCpnt | 656 | drivers/scsi/in2000.c | int in2000_abort(Scsi_Cmnd * SCpnt) |
SCpnt | 673 | drivers/scsi/in2000.c | int in2000_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 690 | drivers/scsi/in2000.c | if(SCpnt) SCpnt->flags |= NEEDS_JUMPSTART; |
SCpnt | 61 | drivers/scsi/scsi.c | static void scsi_done (Scsi_Cmnd *SCpnt); |
SCpnt | 64 | drivers/scsi/scsi.c | static void scsi_times_out (Scsi_Cmnd * SCpnt, int pid); |
SCpnt | 342 | drivers/scsi/scsi.c | static void scan_scsis_done (Scsi_Cmnd * SCpnt) |
SCpnt | 346 | drivers/scsi/scsi.c | printk ("scan_scsis_done(%p, %06x)\n", SCpnt->host, SCpnt->result); |
SCpnt | 348 | drivers/scsi/scsi.c | SCpnt->request.rq_status = RQ_SCSI_DONE; |
SCpnt | 350 | drivers/scsi/scsi.c | if (SCpnt->request.sem != NULL) |
SCpnt | 351 | drivers/scsi/scsi.c | up(SCpnt->request.sem); |
SCpnt | 386 | drivers/scsi/scsi.c | Scsi_Cmnd *SCpnt; |
SCpnt | 391 | drivers/scsi/scsi.c | SCpnt = (Scsi_Cmnd *) scsi_init_malloc(sizeof(Scsi_Cmnd), GFP_ATOMIC|GFP_DMA); |
SCpnt | 406 | drivers/scsi/scsi.c | shpnt->host_queue = SCpnt; /* We need this so that commands can time out */ |
SCpnt | 452 | drivers/scsi/scsi.c | memset(SCpnt, 0, sizeof(Scsi_Cmnd)); |
SCpnt | 453 | drivers/scsi/scsi.c | SCpnt->host = SDpnt->host; |
SCpnt | 454 | drivers/scsi/scsi.c | SCpnt->device = SDpnt; |
SCpnt | 455 | drivers/scsi/scsi.c | SCpnt->target = SDpnt->id; |
SCpnt | 456 | drivers/scsi/scsi.c | SCpnt->lun = SDpnt->lun; |
SCpnt | 457 | drivers/scsi/scsi.c | SCpnt->channel = SDpnt->channel; |
SCpnt | 464 | drivers/scsi/scsi.c | SCpnt->request.sem = &sem; |
SCpnt | 465 | drivers/scsi/scsi.c | SCpnt->request.rq_status = RQ_SCSI_BUSY; |
SCpnt | 466 | drivers/scsi/scsi.c | scsi_do_cmd (SCpnt, (void *) scsi_cmd, |
SCpnt | 474 | drivers/scsi/scsi.c | printk("scsi: return code %08x\n", SCpnt->result); |
SCpnt | 477 | drivers/scsi/scsi.c | if(SCpnt->result) { |
SCpnt | 478 | drivers/scsi/scsi.c | if (((driver_byte(SCpnt->result) & DRIVER_SENSE) || |
SCpnt | 479 | drivers/scsi/scsi.c | (status_byte(SCpnt->result) & CHECK_CONDITION)) && |
SCpnt | 480 | drivers/scsi/scsi.c | ((SCpnt->sense_buffer[0] & 0x70) >> 4) == 7) { |
SCpnt | 481 | drivers/scsi/scsi.c | if (SCpnt->sense_buffer[2] &0xe0) |
SCpnt | 483 | drivers/scsi/scsi.c | if(((SCpnt->sense_buffer[2] & 0xf) != NOT_READY) && |
SCpnt | 484 | drivers/scsi/scsi.c | ((SCpnt->sense_buffer[2] & 0xf) != UNIT_ATTENTION)) |
SCpnt | 505 | drivers/scsi/scsi.c | SCpnt->cmd_len = 0; |
SCpnt | 509 | drivers/scsi/scsi.c | SCpnt->request.sem = &sem; |
SCpnt | 510 | drivers/scsi/scsi.c | SCpnt->request.rq_status = RQ_SCSI_BUSY; |
SCpnt | 511 | drivers/scsi/scsi.c | scsi_do_cmd (SCpnt, (void *) scsi_cmd, |
SCpnt | 517 | drivers/scsi/scsi.c | the_result = SCpnt->result; |
SCpnt | 670 | drivers/scsi/scsi.c | SCpnt->cmd_len = 0; |
SCpnt | 673 | drivers/scsi/scsi.c | SCpnt->request.rq_status = RQ_SCSI_BUSY; |
SCpnt | 674 | drivers/scsi/scsi.c | SCpnt->request.sem = &sem; |
SCpnt | 675 | drivers/scsi/scsi.c | scsi_do_cmd (SCpnt, (void *) scsi_cmd, |
SCpnt | 748 | drivers/scsi/scsi.c | if(SCpnt != NULL) |
SCpnt | 749 | drivers/scsi/scsi.c | scsi_init_free((char *) SCpnt, sizeof(Scsi_Cmnd)); |
SCpnt | 772 | drivers/scsi/scsi.c | static void scsi_times_out (Scsi_Cmnd * SCpnt, int pid) |
SCpnt | 775 | drivers/scsi/scsi.c | switch (SCpnt->internal_timeout & (IN_ABORT | IN_RESET)) |
SCpnt | 784 | drivers/scsi/scsi.c | if (!scsi_abort (SCpnt, DID_TIME_OUT, pid)) |
SCpnt | 788 | drivers/scsi/scsi.c | SCpnt->host->host_no); |
SCpnt | 789 | drivers/scsi/scsi.c | if (!scsi_reset (SCpnt, FALSE)) |
SCpnt | 797 | drivers/scsi/scsi.c | printk("Unable to reset scsi host %d - ", SCpnt->host->host_no); |
SCpnt | 799 | drivers/scsi/scsi.c | scsi_reset (SCpnt, TRUE); |
SCpnt | 818 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 829 | drivers/scsi/scsi.c | SCpnt = device->host->host_queue; |
SCpnt | 837 | drivers/scsi/scsi.c | SCpnt = device->host->host_queue; |
SCpnt | 839 | drivers/scsi/scsi.c | while(SCpnt){ |
SCpnt | 840 | drivers/scsi/scsi.c | if(SCpnt->target == device->id && |
SCpnt | 841 | drivers/scsi/scsi.c | SCpnt->lun == device->lun) { |
SCpnt | 842 | drivers/scsi/scsi.c | if(SCpnt->request.rq_status == RQ_INACTIVE) break; |
SCpnt | 844 | drivers/scsi/scsi.c | SCpnt = SCpnt->next; |
SCpnt | 847 | drivers/scsi/scsi.c | while(SCpnt){ |
SCpnt | 848 | drivers/scsi/scsi.c | if(SCpnt->target == device->id) { |
SCpnt | 849 | drivers/scsi/scsi.c | if (SCpnt->lun == device->lun) { |
SCpnt | 851 | drivers/scsi/scsi.c | && SCpnt->request.rq_status == RQ_INACTIVE) |
SCpnt | 853 | drivers/scsi/scsi.c | found=SCpnt; |
SCpnt | 856 | drivers/scsi/scsi.c | if(SCpnt->request.rq_status != RQ_INACTIVE) { |
SCpnt | 865 | drivers/scsi/scsi.c | SCpnt = SCpnt->next; |
SCpnt | 867 | drivers/scsi/scsi.c | SCpnt = found; |
SCpnt | 870 | drivers/scsi/scsi.c | if (!SCpnt) return NULL; |
SCpnt | 875 | drivers/scsi/scsi.c | memcpy(&SCpnt->request, req, sizeof(struct request)); |
SCpnt | 892 | drivers/scsi/scsi.c | SCpnt->request.bhtail = bh; |
SCpnt | 898 | drivers/scsi/scsi.c | SCpnt->request.nr_sectors -= req->nr_sectors; |
SCpnt | 901 | drivers/scsi/scsi.c | SCpnt->request.sem = NULL; /* Wait until whole thing done */ |
SCpnt | 907 | drivers/scsi/scsi.c | SCpnt->request.rq_status = RQ_SCSI_BUSY; /* Busy, but no request */ |
SCpnt | 908 | drivers/scsi/scsi.c | SCpnt->request.sem = NULL; /* And no one is waiting for the device |
SCpnt | 912 | drivers/scsi/scsi.c | SCpnt->use_sg = 0; /* Reset the scatter-gather flag */ |
SCpnt | 913 | drivers/scsi/scsi.c | SCpnt->old_use_sg = 0; |
SCpnt | 914 | drivers/scsi/scsi.c | SCpnt->transfersize = 0; |
SCpnt | 915 | drivers/scsi/scsi.c | SCpnt->underflow = 0; |
SCpnt | 916 | drivers/scsi/scsi.c | SCpnt->cmd_len = 0; |
SCpnt | 921 | drivers/scsi/scsi.c | SCpnt->channel = device->channel; |
SCpnt | 922 | drivers/scsi/scsi.c | SCpnt->lun = device->lun; |
SCpnt | 923 | drivers/scsi/scsi.c | SCpnt->target = device->id; |
SCpnt | 925 | drivers/scsi/scsi.c | return SCpnt; |
SCpnt | 947 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 968 | drivers/scsi/scsi.c | SCpnt = device->host->host_queue; |
SCpnt | 970 | drivers/scsi/scsi.c | while(SCpnt){ |
SCpnt | 971 | drivers/scsi/scsi.c | if(SCpnt->target == device->id && |
SCpnt | 972 | drivers/scsi/scsi.c | SCpnt->lun == device->lun) { |
SCpnt | 973 | drivers/scsi/scsi.c | SCwait = SCpnt; |
SCpnt | 974 | drivers/scsi/scsi.c | if(SCpnt->request.rq_status == RQ_INACTIVE) break; |
SCpnt | 976 | drivers/scsi/scsi.c | SCpnt = SCpnt->next; |
SCpnt | 979 | drivers/scsi/scsi.c | while(SCpnt){ |
SCpnt | 980 | drivers/scsi/scsi.c | if(SCpnt->target == device->id) { |
SCpnt | 981 | drivers/scsi/scsi.c | if (SCpnt->lun == device->lun) { |
SCpnt | 982 | drivers/scsi/scsi.c | SCwait = SCpnt; |
SCpnt | 984 | drivers/scsi/scsi.c | && SCpnt->request.rq_status == RQ_INACTIVE) |
SCpnt | 986 | drivers/scsi/scsi.c | found=SCpnt; |
SCpnt | 989 | drivers/scsi/scsi.c | if(SCpnt->request.rq_status != RQ_INACTIVE) { |
SCpnt | 999 | drivers/scsi/scsi.c | SCpnt = SCpnt->next; |
SCpnt | 1001 | drivers/scsi/scsi.c | SCpnt = found; |
SCpnt | 1012 | drivers/scsi/scsi.c | if (!SCpnt || SCpnt->request.rq_status != RQ_INACTIVE) /* Might have changed */ |
SCpnt | 1025 | drivers/scsi/scsi.c | memcpy(&SCpnt->request, req, sizeof(struct request)); |
SCpnt | 1042 | drivers/scsi/scsi.c | SCpnt->request.bhtail = bh; |
SCpnt | 1047 | drivers/scsi/scsi.c | SCpnt->request.nr_sectors -= req->nr_sectors; |
SCpnt | 1050 | drivers/scsi/scsi.c | SCpnt->request.sem = NULL; /* Wait until whole thing done*/ |
SCpnt | 1059 | drivers/scsi/scsi.c | SCpnt->request.rq_status = RQ_SCSI_BUSY; |
SCpnt | 1060 | drivers/scsi/scsi.c | SCpnt->request.sem = NULL; /* And no one is waiting for this |
SCpnt | 1068 | drivers/scsi/scsi.c | SCpnt->use_sg = 0; /* Reset the scatter-gather flag */ |
SCpnt | 1069 | drivers/scsi/scsi.c | SCpnt->old_use_sg = 0; |
SCpnt | 1070 | drivers/scsi/scsi.c | SCpnt->transfersize = 0; /* No default transfer size */ |
SCpnt | 1071 | drivers/scsi/scsi.c | SCpnt->cmd_len = 0; |
SCpnt | 1073 | drivers/scsi/scsi.c | SCpnt->underflow = 0; /* Do not flag underflow conditions */ |
SCpnt | 1078 | drivers/scsi/scsi.c | SCpnt->channel = device->channel; |
SCpnt | 1079 | drivers/scsi/scsi.c | SCpnt->lun = device->lun; |
SCpnt | 1080 | drivers/scsi/scsi.c | SCpnt->target = device->id; |
SCpnt | 1082 | drivers/scsi/scsi.c | return SCpnt; |
SCpnt | 1089 | drivers/scsi/scsi.c | inline void internal_cmnd (Scsi_Cmnd * SCpnt) |
SCpnt | 1098 | drivers/scsi/scsi.c | host = SCpnt->host; |
SCpnt | 1110 | drivers/scsi/scsi.c | update_timeout(SCpnt, SCpnt->timeout_per_command); |
SCpnt | 1119 | drivers/scsi/scsi.c | SCpnt->host->host_no, SCpnt->channel, SCpnt->target, SCpnt->cmnd, |
SCpnt | 1120 | drivers/scsi/scsi.c | SCpnt->buffer, SCpnt->bufflen, SCpnt->done); |
SCpnt | 1138 | drivers/scsi/scsi.c | if(!intr_count && SCpnt->host->irq) |
SCpnt | 1139 | drivers/scsi/scsi.c | disable_irq(SCpnt->host->irq); |
SCpnt | 1141 | drivers/scsi/scsi.c | host->hostt->queuecommand (SCpnt, scsi_done); |
SCpnt | 1143 | drivers/scsi/scsi.c | if(!intr_count && SCpnt->host->irq) |
SCpnt | 1144 | drivers/scsi/scsi.c | enable_irq(SCpnt->host->irq); |
SCpnt | 1152 | drivers/scsi/scsi.c | temp=host->hostt->command (SCpnt); |
SCpnt | 1153 | drivers/scsi/scsi.c | SCpnt->result = temp; |
SCpnt | 1160 | drivers/scsi/scsi.c | scsi_done(SCpnt); |
SCpnt | 1167 | drivers/scsi/scsi.c | static void scsi_request_sense (Scsi_Cmnd * SCpnt) |
SCpnt | 1173 | drivers/scsi/scsi.c | SCpnt->flags |= WAS_SENSE | ASKED_FOR_SENSE; |
SCpnt | 1174 | drivers/scsi/scsi.c | update_timeout(SCpnt, SENSE_TIMEOUT); |
SCpnt | 1178 | drivers/scsi/scsi.c | memcpy ((void *) SCpnt->cmnd , (void *) generic_sense, |
SCpnt | 1181 | drivers/scsi/scsi.c | SCpnt->cmnd[1] = SCpnt->lun << 5; |
SCpnt | 1182 | drivers/scsi/scsi.c | SCpnt->cmnd[4] = sizeof(SCpnt->sense_buffer); |
SCpnt | 1184 | drivers/scsi/scsi.c | SCpnt->request_buffer = &SCpnt->sense_buffer; |
SCpnt | 1185 | drivers/scsi/scsi.c | SCpnt->request_bufflen = sizeof(SCpnt->sense_buffer); |
SCpnt | 1186 | drivers/scsi/scsi.c | SCpnt->use_sg = 0; |
SCpnt | 1187 | drivers/scsi/scsi.c | SCpnt->cmd_len = COMMAND_SIZE(SCpnt->cmnd[0]); |
SCpnt | 1188 | drivers/scsi/scsi.c | internal_cmnd (SCpnt); |
SCpnt | 1200 | drivers/scsi/scsi.c | void scsi_do_cmd (Scsi_Cmnd * SCpnt, const void *cmnd , |
SCpnt | 1205 | drivers/scsi/scsi.c | struct Scsi_Host * host = SCpnt->host; |
SCpnt | 1210 | drivers/scsi/scsi.c | int target = SCpnt->target; |
SCpnt | 1214 | drivers/scsi/scsi.c | "command : " , host->host_no, SCpnt->channel, target, buffer, |
SCpnt | 1238 | drivers/scsi/scsi.c | SCpnt->pid = scsi_pid++; |
SCpnt | 1258 | drivers/scsi/scsi.c | memcpy ((void *) SCpnt->data_cmnd , (const void *) cmnd, 12); |
SCpnt | 1260 | drivers/scsi/scsi.c | SCpnt->host = host; |
SCpnt | 1261 | drivers/scsi/scsi.c | SCpnt->channel = channel; |
SCpnt | 1262 | drivers/scsi/scsi.c | SCpnt->target = target; |
SCpnt | 1263 | drivers/scsi/scsi.c | SCpnt->lun = (SCpnt->data_cmnd[1] >> 5); |
SCpnt | 1265 | drivers/scsi/scsi.c | SCpnt->bufflen = bufflen; |
SCpnt | 1266 | drivers/scsi/scsi.c | SCpnt->buffer = buffer; |
SCpnt | 1267 | drivers/scsi/scsi.c | SCpnt->flags=0; |
SCpnt | 1268 | drivers/scsi/scsi.c | SCpnt->retries=0; |
SCpnt | 1269 | drivers/scsi/scsi.c | SCpnt->allowed=retries; |
SCpnt | 1270 | drivers/scsi/scsi.c | SCpnt->done = done; |
SCpnt | 1271 | drivers/scsi/scsi.c | SCpnt->timeout_per_command = timeout; |
SCpnt | 1273 | drivers/scsi/scsi.c | memcpy ((void *) SCpnt->cmnd , (const void *) cmnd, 12); |
SCpnt | 1277 | drivers/scsi/scsi.c | memset ((void *) SCpnt->sense_buffer, 0, sizeof SCpnt->sense_buffer); |
SCpnt | 1278 | drivers/scsi/scsi.c | SCpnt->request_buffer = buffer; |
SCpnt | 1279 | drivers/scsi/scsi.c | SCpnt->request_bufflen = bufflen; |
SCpnt | 1280 | drivers/scsi/scsi.c | SCpnt->old_use_sg = SCpnt->use_sg; |
SCpnt | 1281 | drivers/scsi/scsi.c | if (SCpnt->cmd_len == 0) |
SCpnt | 1282 | drivers/scsi/scsi.c | SCpnt->cmd_len = COMMAND_SIZE(SCpnt->cmnd[0]); |
SCpnt | 1283 | drivers/scsi/scsi.c | SCpnt->old_cmd_len = SCpnt->cmd_len; |
SCpnt | 1287 | drivers/scsi/scsi.c | SCpnt->internal_timeout = 0; |
SCpnt | 1288 | drivers/scsi/scsi.c | SCpnt->abort_reason = 0; |
SCpnt | 1289 | drivers/scsi/scsi.c | internal_cmnd (SCpnt); |
SCpnt | 1296 | drivers/scsi/scsi.c | static int check_sense (Scsi_Cmnd * SCpnt) |
SCpnt | 1302 | drivers/scsi/scsi.c | if (((SCpnt->sense_buffer[0] & 0x70) >> 4) != 7) { |
SCpnt | 1303 | drivers/scsi/scsi.c | if(!(SCpnt->flags & ASKED_FOR_SENSE)) |
SCpnt | 1309 | drivers/scsi/scsi.c | SCpnt->flags &= ~ASKED_FOR_SENSE; |
SCpnt | 1312 | drivers/scsi/scsi.c | printk("scsi%d, channel%d : ", SCpnt->host->host_no, SCpnt->channel); |
SCpnt | 1313 | drivers/scsi/scsi.c | print_sense("", SCpnt); |
SCpnt | 1316 | drivers/scsi/scsi.c | if (SCpnt->sense_buffer[2] & 0xe0) |
SCpnt | 1319 | drivers/scsi/scsi.c | switch (SCpnt->sense_buffer[2] & 0xf) |
SCpnt | 1336 | drivers/scsi/scsi.c | if( SCpnt->device->expecting_cc_ua ) |
SCpnt | 1338 | drivers/scsi/scsi.c | SCpnt->device->expecting_cc_ua = 0; |
SCpnt | 1380 | drivers/scsi/scsi.c | static void scsi_done (Scsi_Cmnd * SCpnt) |
SCpnt | 1386 | drivers/scsi/scsi.c | struct Scsi_Host * host = SCpnt->host; |
SCpnt | 1387 | drivers/scsi/scsi.c | int result = SCpnt->result; |
SCpnt | 1388 | drivers/scsi/scsi.c | oldto = update_timeout(SCpnt, 0); |
SCpnt | 1392 | drivers/scsi/scsi.c | result, SCpnt->target, SCpnt->lun); |
SCpnt | 1398 | drivers/scsi/scsi.c | if(host_byte(result) == DID_ABORT && SCpnt->abort_reason) |
SCpnt | 1399 | drivers/scsi/scsi.c | SCpnt->result = result = (result & 0xff00ffff) | |
SCpnt | 1400 | drivers/scsi/scsi.c | (SCpnt->abort_reason << 16); |
SCpnt | 1412 | drivers/scsi/scsi.c | if(SCpnt->flags & WAS_SENSE) |
SCpnt | 1414 | drivers/scsi/scsi.c | SCpnt->use_sg = SCpnt->old_use_sg; |
SCpnt | 1415 | drivers/scsi/scsi.c | SCpnt->cmd_len = SCpnt->old_cmd_len; |
SCpnt | 1421 | drivers/scsi/scsi.c | if (status_byte(result) && (SCpnt->flags & WAS_SENSE)) |
SCpnt | 1424 | drivers/scsi/scsi.c | SCpnt->flags &= ~WAS_SENSE; |
SCpnt | 1425 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~SENSE_TIMEOUT; |
SCpnt | 1427 | drivers/scsi/scsi.c | if (!(SCpnt->flags & WAS_RESET)) |
SCpnt | 1431 | drivers/scsi/scsi.c | SCpnt->host->host_no, SCpnt->channel, SCpnt->target, |
SCpnt | 1432 | drivers/scsi/scsi.c | SCpnt->lun); |
SCpnt | 1433 | drivers/scsi/scsi.c | scsi_reset(SCpnt, FALSE); |
SCpnt | 1448 | drivers/scsi/scsi.c | if (SCpnt->flags & WAS_SENSE) |
SCpnt | 1453 | drivers/scsi/scsi.c | SCpnt->flags &= ~WAS_SENSE; |
SCpnt | 1454 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~SENSE_TIMEOUT; |
SCpnt | 1456 | drivers/scsi/scsi.c | switch (checked = check_sense(SCpnt)) |
SCpnt | 1463 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1499 | drivers/scsi/scsi.c | switch (check_sense(SCpnt)) |
SCpnt | 1502 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1515 | drivers/scsi/scsi.c | scsi_request_sense (SCpnt); |
SCpnt | 1527 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1533 | drivers/scsi/scsi.c | " reset.\n", SCpnt->host->host_no, SCpnt->channel); |
SCpnt | 1534 | drivers/scsi/scsi.c | scsi_reset(SCpnt, FALSE); |
SCpnt | 1558 | drivers/scsi/scsi.c | if (SCpnt->flags & WAS_TIMEDOUT) |
SCpnt | 1570 | drivers/scsi/scsi.c | SCpnt->flags |= WAS_TIMEDOUT; |
SCpnt | 1571 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_ABORT; |
SCpnt | 1594 | drivers/scsi/scsi.c | if (SCpnt->flags & IS_RESETTING) |
SCpnt | 1596 | drivers/scsi/scsi.c | SCpnt->flags &= ~IS_RESETTING; |
SCpnt | 1603 | drivers/scsi/scsi.c | switch (check_sense(SCpnt)) { |
SCpnt | 1605 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1618 | drivers/scsi/scsi.c | scsi_request_sense (SCpnt); |
SCpnt | 1639 | drivers/scsi/scsi.c | SCpnt->allowed, SCpnt->retries); |
SCpnt | 1641 | drivers/scsi/scsi.c | if ((++SCpnt->retries) < SCpnt->allowed) |
SCpnt | 1643 | drivers/scsi/scsi.c | if ((SCpnt->retries >= (SCpnt->allowed >> 1)) |
SCpnt | 1644 | drivers/scsi/scsi.c | && !(jiffies < SCpnt->host->last_reset + MIN_RESET_PERIOD) |
SCpnt | 1645 | drivers/scsi/scsi.c | && !(SCpnt->flags & WAS_RESET)) |
SCpnt | 1648 | drivers/scsi/scsi.c | SCpnt->host->host_no, SCpnt->channel); |
SCpnt | 1649 | drivers/scsi/scsi.c | scsi_reset(SCpnt, FALSE); |
SCpnt | 1663 | drivers/scsi/scsi.c | if (SCpnt->flags & WAS_SENSE) |
SCpnt | 1664 | drivers/scsi/scsi.c | scsi_request_sense(SCpnt); |
SCpnt | 1667 | drivers/scsi/scsi.c | memcpy ((void *) SCpnt->cmnd, |
SCpnt | 1668 | drivers/scsi/scsi.c | (void*) SCpnt->data_cmnd, |
SCpnt | 1669 | drivers/scsi/scsi.c | sizeof(SCpnt->data_cmnd)); |
SCpnt | 1670 | drivers/scsi/scsi.c | SCpnt->request_buffer = SCpnt->buffer; |
SCpnt | 1671 | drivers/scsi/scsi.c | SCpnt->request_bufflen = SCpnt->bufflen; |
SCpnt | 1672 | drivers/scsi/scsi.c | SCpnt->use_sg = SCpnt->old_use_sg; |
SCpnt | 1673 | drivers/scsi/scsi.c | SCpnt->cmd_len = SCpnt->old_cmd_len; |
SCpnt | 1674 | drivers/scsi/scsi.c | internal_cmnd (SCpnt); |
SCpnt | 1683 | drivers/scsi/scsi.c | printk("Calling done function - at address %p\n", SCpnt->done); |
SCpnt | 1691 | drivers/scsi/scsi.c | if (MAJOR(SCpnt->request.rq_dev) != SCSI_DISK_MAJOR && |
SCpnt | 1692 | drivers/scsi/scsi.c | MAJOR(SCpnt->request.rq_dev) != SCSI_CDROM_MAJOR) { |
SCpnt | 1702 | drivers/scsi/scsi.c | SCpnt->result = result | ((exit & 0xff) << 24); |
SCpnt | 1703 | drivers/scsi/scsi.c | SCpnt->use_sg = SCpnt->old_use_sg; |
SCpnt | 1704 | drivers/scsi/scsi.c | SCpnt->cmd_len = SCpnt->old_cmd_len; |
SCpnt | 1705 | drivers/scsi/scsi.c | SCpnt->done (SCpnt); |
SCpnt | 1730 | drivers/scsi/scsi.c | int scsi_abort (Scsi_Cmnd * SCpnt, int why, int pid) |
SCpnt | 1734 | drivers/scsi/scsi.c | struct Scsi_Host * host = SCpnt->host; |
SCpnt | 1745 | drivers/scsi/scsi.c | if (SCpnt->request.rq_status == RQ_INACTIVE || pid != SCpnt->pid) { |
SCpnt | 1750 | drivers/scsi/scsi.c | if (SCpnt->internal_timeout & IN_ABORT) |
SCpnt | 1753 | drivers/scsi/scsi.c | while (SCpnt->internal_timeout & IN_ABORT) |
SCpnt | 1758 | drivers/scsi/scsi.c | SCpnt->internal_timeout |= IN_ABORT; |
SCpnt | 1759 | drivers/scsi/scsi.c | oldto = update_timeout(SCpnt, ABORT_TIMEOUT); |
SCpnt | 1761 | drivers/scsi/scsi.c | if ((SCpnt->flags & IS_RESETTING) && |
SCpnt | 1762 | drivers/scsi/scsi.c | SCpnt->device->soft_reset) { |
SCpnt | 1768 | drivers/scsi/scsi.c | SCpnt->channel, SCpnt->target, SCpnt->lun); |
SCpnt | 1773 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_ABORT; |
SCpnt | 1774 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1779 | drivers/scsi/scsi.c | SCpnt->pid, SCpnt->host->host_no, (int) SCpnt->channel, |
SCpnt | 1780 | drivers/scsi/scsi.c | (int) SCpnt->target, (int) SCpnt->lun); |
SCpnt | 1781 | drivers/scsi/scsi.c | print_command (SCpnt->cmnd); |
SCpnt | 1782 | drivers/scsi/scsi.c | if (SCpnt->request.rq_status == RQ_INACTIVE || pid != SCpnt->pid) |
SCpnt | 1784 | drivers/scsi/scsi.c | SCpnt->abort_reason = why; |
SCpnt | 1785 | drivers/scsi/scsi.c | switch(host->hostt->abort(SCpnt)) { |
SCpnt | 1797 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_ABORT; |
SCpnt | 1798 | drivers/scsi/scsi.c | if(SCpnt->flags & WAS_TIMEDOUT) { |
SCpnt | 1805 | drivers/scsi/scsi.c | SCpnt->flags |= WAS_TIMEDOUT; |
SCpnt | 1806 | drivers/scsi/scsi.c | oldto = SCpnt->timeout_per_command; |
SCpnt | 1807 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1816 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1825 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_ABORT; |
SCpnt | 1826 | drivers/scsi/scsi.c | update_timeout(SCpnt, 0); |
SCpnt | 1830 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_ABORT; |
SCpnt | 1837 | drivers/scsi/scsi.c | int scsi_reset (Scsi_Cmnd * SCpnt, int bus_reset_flag) |
SCpnt | 1842 | drivers/scsi/scsi.c | struct Scsi_Host * host = SCpnt->host; |
SCpnt | 1856 | drivers/scsi/scsi.c | SCpnt->host->suggest_bus_reset = FALSE; |
SCpnt | 1876 | drivers/scsi/scsi.c | SCpnt->host->suggest_bus_reset = TRUE; |
SCpnt | 1886 | drivers/scsi/scsi.c | SCpnt->host->suggest_bus_reset = TRUE; |
SCpnt | 1892 | drivers/scsi/scsi.c | if (SCpnt->internal_timeout & IN_RESET) |
SCpnt | 1895 | drivers/scsi/scsi.c | while (SCpnt->internal_timeout & IN_RESET) |
SCpnt | 1900 | drivers/scsi/scsi.c | SCpnt->internal_timeout |= IN_RESET; |
SCpnt | 1901 | drivers/scsi/scsi.c | oldto = update_timeout(SCpnt, RESET_TIMEOUT); |
SCpnt | 1912 | drivers/scsi/scsi.c | scsi_abort(SCpnt1, DID_RESET, SCpnt->pid); |
SCpnt | 1920 | drivers/scsi/scsi.c | temp = host->hostt->reset(SCpnt); |
SCpnt | 1928 | drivers/scsi/scsi.c | SCpnt->flags |= (WAS_RESET | IS_RESETTING); |
SCpnt | 1929 | drivers/scsi/scsi.c | temp = host->hostt->reset(SCpnt); |
SCpnt | 1961 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_RESET; |
SCpnt | 1962 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1968 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_RESET; |
SCpnt | 1969 | drivers/scsi/scsi.c | scsi_request_sense (SCpnt); |
SCpnt | 1972 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_RESET; |
SCpnt | 1973 | drivers/scsi/scsi.c | scsi_request_sense (SCpnt); |
SCpnt | 1983 | drivers/scsi/scsi.c | if( SCpnt->request.rq_status != RQ_INACTIVE |
SCpnt | 1984 | drivers/scsi/scsi.c | && SCpnt1 != SCpnt) |
SCpnt | 1985 | drivers/scsi/scsi.c | scsi_request_sense (SCpnt); |
SCpnt | 1998 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_RESET; |
SCpnt | 1999 | drivers/scsi/scsi.c | update_timeout(SCpnt, 0); |
SCpnt | 2022 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 2036 | drivers/scsi/scsi.c | for(SCpnt = host->host_queue; SCpnt; SCpnt = SCpnt->next) |
SCpnt | 2037 | drivers/scsi/scsi.c | if (SCpnt->timeout == -1) |
SCpnt | 2039 | drivers/scsi/scsi.c | SCpnt->timeout = 0; |
SCpnt | 2040 | drivers/scsi/scsi.c | pid = SCpnt->pid; |
SCpnt | 2042 | drivers/scsi/scsi.c | scsi_times_out(SCpnt, pid); |
SCpnt | 2066 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 2093 | drivers/scsi/scsi.c | for(SCpnt = host->host_queue; SCpnt; SCpnt = SCpnt->next) |
SCpnt | 2094 | drivers/scsi/scsi.c | if (SCpnt->timeout > 0) { |
SCpnt | 2095 | drivers/scsi/scsi.c | SCpnt->timeout -= used; |
SCpnt | 2096 | drivers/scsi/scsi.c | if(SCpnt->timeout <= 0) SCpnt->timeout = -1; |
SCpnt | 2097 | drivers/scsi/scsi.c | if(SCpnt->timeout > 0 && SCpnt->timeout < least) |
SCpnt | 2098 | drivers/scsi/scsi.c | least = SCpnt->timeout; |
SCpnt | 2244 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt; |
SCpnt | 2248 | drivers/scsi/scsi.c | SCpnt = (Scsi_Cmnd *) scsi_init_malloc(sizeof(Scsi_Cmnd), GFP_ATOMIC); |
SCpnt | 2249 | drivers/scsi/scsi.c | SCpnt->host = SDpnt->host; |
SCpnt | 2250 | drivers/scsi/scsi.c | SCpnt->device = SDpnt; |
SCpnt | 2251 | drivers/scsi/scsi.c | SCpnt->target = SDpnt->id; |
SCpnt | 2252 | drivers/scsi/scsi.c | SCpnt->lun = SDpnt->lun; |
SCpnt | 2253 | drivers/scsi/scsi.c | SCpnt->channel = SDpnt->channel; |
SCpnt | 2254 | drivers/scsi/scsi.c | SCpnt->request.rq_status = RQ_INACTIVE; |
SCpnt | 2255 | drivers/scsi/scsi.c | SCpnt->use_sg = 0; |
SCpnt | 2256 | drivers/scsi/scsi.c | SCpnt->old_use_sg = 0; |
SCpnt | 2257 | drivers/scsi/scsi.c | SCpnt->old_cmd_len = 0; |
SCpnt | 2258 | drivers/scsi/scsi.c | SCpnt->timeout = 0; |
SCpnt | 2259 | drivers/scsi/scsi.c | SCpnt->underflow = 0; |
SCpnt | 2260 | drivers/scsi/scsi.c | SCpnt->transfersize = 0; |
SCpnt | 2261 | drivers/scsi/scsi.c | SCpnt->host_scribble = NULL; |
SCpnt | 2264 | drivers/scsi/scsi.c | host->host_queue->prev = SCpnt; |
SCpnt | 2265 | drivers/scsi/scsi.c | SCpnt->next = host->host_queue; |
SCpnt | 2266 | drivers/scsi/scsi.c | SCpnt->prev = NULL; |
SCpnt | 2267 | drivers/scsi/scsi.c | host->host_queue = SCpnt; |
SCpnt | 2705 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt; |
SCpnt | 2721 | drivers/scsi/scsi.c | for(SCpnt = shpnt->host_queue; SCpnt; SCpnt = SCpnt->next) |
SCpnt | 2725 | drivers/scsi/scsi.c | if(SCpnt->request.rq_status != RQ_INACTIVE) { |
SCpnt | 2727 | drivers/scsi/scsi.c | for(SCpnt = shpnt->host_queue; SCpnt; SCpnt = SCpnt->next) |
SCpnt | 2728 | drivers/scsi/scsi.c | if(SCpnt->request.rq_status == RQ_SCSI_DISCONNECTING) |
SCpnt | 2729 | drivers/scsi/scsi.c | SCpnt->request.rq_status = RQ_INACTIVE; |
SCpnt | 2733 | drivers/scsi/scsi.c | SCpnt->request.rq_status = RQ_SCSI_DISCONNECTING; /* Mark as busy */ |
SCpnt | 2756 | drivers/scsi/scsi.c | SCpnt = sdpnt->host->host_queue->next; |
SCpnt | 2758 | drivers/scsi/scsi.c | sdpnt->host->host_queue = SCpnt; |
SCpnt | 2759 | drivers/scsi/scsi.c | if (SCpnt) SCpnt->prev = NULL; |
SCpnt | 2905 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt; |
SCpnt | 2926 | drivers/scsi/scsi.c | for(SCpnt = SDpnt->host->host_queue; SCpnt; SCpnt = SCpnt->next) |
SCpnt | 2928 | drivers/scsi/scsi.c | if(SCpnt->device == SDpnt) |
SCpnt | 2930 | drivers/scsi/scsi.c | if(SCpnt->prev != NULL) |
SCpnt | 2931 | drivers/scsi/scsi.c | SCpnt->prev->next = SCpnt->next; |
SCpnt | 2932 | drivers/scsi/scsi.c | if(SCpnt->next != NULL) |
SCpnt | 2933 | drivers/scsi/scsi.c | SCpnt->next->prev = SCpnt->prev; |
SCpnt | 2934 | drivers/scsi/scsi.c | if(SCpnt == SDpnt->host->host_queue) |
SCpnt | 2935 | drivers/scsi/scsi.c | SDpnt->host->host_queue = SCpnt->next; |
SCpnt | 2936 | drivers/scsi/scsi.c | scsi_init_free((char *) SCpnt, sizeof(*SCpnt)); |
SCpnt | 3013 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt; |
SCpnt | 3017 | drivers/scsi/scsi.c | for(SCpnt=shpnt->host_queue; SCpnt; SCpnt = SCpnt->next) |
SCpnt | 3021 | drivers/scsi/scsi.c | i++, SCpnt->host->host_no, |
SCpnt | 3022 | drivers/scsi/scsi.c | SCpnt->channel, |
SCpnt | 3023 | drivers/scsi/scsi.c | SCpnt->target, |
SCpnt | 3024 | drivers/scsi/scsi.c | SCpnt->lun, |
SCpnt | 3025 | drivers/scsi/scsi.c | kdevname(SCpnt->request.rq_dev), |
SCpnt | 3026 | drivers/scsi/scsi.c | SCpnt->request.sector, |
SCpnt | 3027 | drivers/scsi/scsi.c | SCpnt->request.nr_sectors, |
SCpnt | 3028 | drivers/scsi/scsi.c | SCpnt->request.current_nr_sectors, |
SCpnt | 3029 | drivers/scsi/scsi.c | SCpnt->use_sg, |
SCpnt | 3030 | drivers/scsi/scsi.c | SCpnt->retries, |
SCpnt | 3031 | drivers/scsi/scsi.c | SCpnt->allowed, |
SCpnt | 3032 | drivers/scsi/scsi.c | SCpnt->flags, |
SCpnt | 3033 | drivers/scsi/scsi.c | SCpnt->timeout_per_command, |
SCpnt | 3034 | drivers/scsi/scsi.c | SCpnt->timeout, |
SCpnt | 3035 | drivers/scsi/scsi.c | SCpnt->internal_timeout, |
SCpnt | 3036 | drivers/scsi/scsi.c | SCpnt->cmnd[0], |
SCpnt | 3037 | drivers/scsi/scsi.c | SCpnt->sense_buffer[2], |
SCpnt | 3038 | drivers/scsi/scsi.c | SCpnt->result); |
SCpnt | 456 | drivers/scsi/scsi.h | static Scsi_Cmnd * end_scsi_request(Scsi_Cmnd * SCpnt, int uptodate, int sectors) |
SCpnt | 461 | drivers/scsi/scsi.h | req = &SCpnt->request; |
SCpnt | 488 | drivers/scsi/scsi.h | return SCpnt; |
SCpnt | 495 | drivers/scsi/scsi.h | if (SCpnt->host->block) { |
SCpnt | 498 | drivers/scsi/scsi.h | for (next = SCpnt->host->block; next != SCpnt->host; |
SCpnt | 505 | drivers/scsi/scsi.h | wake_up(&SCpnt->device->device_wait); |
SCpnt | 87 | drivers/scsi/scsi_debug.c | if ((MINOR(SCpnt->request.rq_dev) & 0xf) != 0) start = starts[(MINOR(SCpnt->request.rq_dev) & 0xf) - 1]; \ |
SCpnt | 94 | drivers/scsi/scsi_debug.c | if (bh->b_dev != SCpnt->request.rq_dev) \ |
SCpnt | 99 | drivers/scsi/scsi_debug.c | if (bufflen != 1024 && (!SCpnt->use_sg)) {printk("%x %d\n ",bufflen, SCpnt->use_sg); panic("Bad bufflen");}; \ |
SCpnt | 101 | drivers/scsi/scsi_debug.c | if ((MINOR(SCpnt->request.rq_dev) & 0xf) > npart) panic ("Bad partition"); \ |
SCpnt | 102 | drivers/scsi/scsi_debug.c | if ((MINOR(SCpnt->request.rq_dev) & 0xf) != 0) start = starts[(MINOR(SCpnt->request.rq_dev) & 0xf) - 1]; \ |
SCpnt | 103 | drivers/scsi/scsi_debug.c | if (SCpnt->request.cmd != RW) panic ("Wrong operation"); \ |
SCpnt | 104 | drivers/scsi/scsi_debug.c | if (SCpnt->request.sector + start != block) panic("Wrong block."); \ |
SCpnt | 105 | drivers/scsi/scsi_debug.c | if (SCpnt->request.current_nr_sectors != 2 && (!SCpnt->use_sg)) panic ("Wrong # blocks"); \ |
SCpnt | 106 | drivers/scsi/scsi_debug.c | if (SCpnt->request.bh){ \ |
SCpnt | 107 | drivers/scsi/scsi_debug.c | if (SCpnt->request.bh->b_size != 1024) panic ("Wrong bh size"); \ |
SCpnt | 108 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.bh->b_blocknr << 1) + start != block) \ |
SCpnt | 109 | drivers/scsi/scsi_debug.c | { printk("Wrong bh block# %d %d ",SCpnt->request.bh->b_blocknr, block); \ |
SCpnt | 112 | drivers/scsi/scsi_debug.c | if (SCpnt->request.bh->b_dev != SCpnt->request.rq_dev) \ |
SCpnt | 131 | drivers/scsi/scsi_debug.c | static void scsi_dump(Scsi_Cmnd * SCpnt, int flag){ |
SCpnt | 138 | drivers/scsi/scsi_debug.c | printk("use_sg: %d",SCpnt->use_sg); |
SCpnt | 139 | drivers/scsi/scsi_debug.c | if (SCpnt->use_sg){ |
SCpnt | 140 | drivers/scsi/scsi_debug.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 141 | drivers/scsi/scsi_debug.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 147 | drivers/scsi/scsi_debug.c | printk("nosg: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 148 | drivers/scsi/scsi_debug.c | SCpnt->bufflen); |
SCpnt | 149 | drivers/scsi/scsi_debug.c | lpnt = (int *) SCpnt->request.buffer; |
SCpnt | 152 | drivers/scsi/scsi_debug.c | lpnt = (unsigned int *) SCpnt; |
SCpnt | 176 | drivers/scsi/scsi_debug.c | int scsi_debug_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 178 | drivers/scsi/scsi_debug.c | unchar *cmd = (unchar *) SCpnt->cmnd; |
SCpnt | 186 | drivers/scsi/scsi_debug.c | int target = SCpnt->target; |
SCpnt | 187 | drivers/scsi/scsi_debug.c | int bufflen = SCpnt->request_bufflen; |
SCpnt | 193 | drivers/scsi/scsi_debug.c | DEB(if (target > 1) { SCpnt->result = DID_TIME_OUT << 16;done(SCpnt);return 0;}); |
SCpnt | 195 | drivers/scsi/scsi_debug.c | buff = (unsigned char *) SCpnt->request_buffer; |
SCpnt | 197 | drivers/scsi/scsi_debug.c | if(target>=1 || SCpnt->lun != 0) { |
SCpnt | 198 | drivers/scsi/scsi_debug.c | SCpnt->result = DID_NO_CONNECT << 16; |
SCpnt | 199 | drivers/scsi/scsi_debug.c | done(SCpnt); |
SCpnt | 206 | drivers/scsi/scsi_debug.c | memset(SCpnt->sense_buffer, 0, sizeof(SCpnt->sense_buffer)); |
SCpnt | 207 | drivers/scsi/scsi_debug.c | SCpnt->sense_buffer[0] = 0x70; |
SCpnt | 208 | drivers/scsi/scsi_debug.c | SCpnt->sense_buffer[2] = UNIT_ATTENTION; |
SCpnt | 209 | drivers/scsi/scsi_debug.c | SCpnt->result = (CHECK_CONDITION << 1); |
SCpnt | 210 | drivers/scsi/scsi_debug.c | done(SCpnt); |
SCpnt | 218 | drivers/scsi/scsi_debug.c | printk("scsi_debug: Requesting sense buffer (%x %x %x %d):", SCpnt, buff, done, bufflen); |
SCpnt | 226 | drivers/scsi/scsi_debug.c | SCpnt->result = 0; |
SCpnt | 227 | drivers/scsi/scsi_debug.c | done(SCpnt); |
SCpnt | 254 | drivers/scsi/scsi_debug.c | if(NR_REAL < 0) NR_REAL = (MINOR(SCpnt->request.rq_dev) >> 4) & 0x0f; |
SCpnt | 279 | drivers/scsi/scsi_debug.c | usec = (SCpnt->request.nr_sectors << 9) * 1.0e6 / SCSI_DATARATE; |
SCpnt | 286 | drivers/scsi/scsi_debug.c | printk("(r%d)",SCpnt->request.nr_sectors); |
SCpnt | 289 | drivers/scsi/scsi_debug.c | if(SCpnt->use_sg){ |
SCpnt | 294 | drivers/scsi/scsi_debug.c | bh = SCpnt->request.bh; |
SCpnt | 321 | drivers/scsi/scsi_debug.c | if (SCpnt->use_sg) printk("Block %x (%d %d)\n",block, SCpnt->request.nr_sectors, |
SCpnt | 322 | drivers/scsi/scsi_debug.c | SCpnt->request.current_nr_sectors); |
SCpnt | 351 | drivers/scsi/scsi_debug.c | memcpy(buff+64, SCpnt, sizeof(Scsi_Cmnd)); |
SCpnt | 354 | drivers/scsi/scsi_debug.c | if(SCpnt->use_sg){ |
SCpnt | 369 | drivers/scsi/scsi_debug.c | SCpnt->result = 0; |
SCpnt | 370 | drivers/scsi/scsi_debug.c | (done)(SCpnt); |
SCpnt | 373 | drivers/scsi/scsi_debug.c | if (SCpnt->use_sg && !scsi_debug_errsts) |
SCpnt | 374 | drivers/scsi/scsi_debug.c | if(bh) scsi_dump(SCpnt, 0); |
SCpnt | 387 | drivers/scsi/scsi_debug.c | if (SCpnt->use_sg){ |
SCpnt | 388 | drivers/scsi/scsi_debug.c | if ((bufflen >> 9) != SCpnt->request.nr_sectors) |
SCpnt | 396 | drivers/scsi/scsi_debug.c | scsi_dump(SCpnt,1); |
SCpnt | 404 | drivers/scsi/scsi_debug.c | SCpnt->result = DID_NO_CONNECT << 16; |
SCpnt | 405 | drivers/scsi/scsi_debug.c | done(SCpnt); |
SCpnt | 418 | drivers/scsi/scsi_debug.c | SCint[i] = SCpnt; |
SCpnt | 433 | drivers/scsi/scsi_debug.c | SCpnt->result = scsi_debug_errsts; |
SCpnt | 446 | drivers/scsi/scsi_debug.c | SCpnt->result = scsi_debug_errsts; |
SCpnt | 459 | drivers/scsi/scsi_debug.c | static void internal_done(Scsi_Cmnd * SCpnt) |
SCpnt | 461 | drivers/scsi/scsi_debug.c | internal_done_errcode = SCpnt->result; |
SCpnt | 465 | drivers/scsi/scsi_debug.c | int scsi_debug_command(Scsi_Cmnd * SCpnt) |
SCpnt | 468 | drivers/scsi/scsi_debug.c | scsi_debug_queuecommand(SCpnt, internal_done); |
SCpnt | 566 | drivers/scsi/scsi_debug.c | int scsi_debug_abort(Scsi_Cmnd * SCpnt) |
SCpnt | 574 | drivers/scsi/scsi_debug.c | SCpnt->result = SCpnt->abort_reason << 16; |
SCpnt | 576 | drivers/scsi/scsi_debug.c | if(SCpnt == SCint[j]) { |
SCpnt | 578 | drivers/scsi/scsi_debug.c | my_done(SCpnt); |
SCpnt | 600 | drivers/scsi/scsi_debug.c | int scsi_debug_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 606 | drivers/scsi/scsi_debug.c | printk("Bus unlocked by reset(%d)\n", SCpnt->host->suggest_bus_reset); |
SCpnt | 92 | drivers/scsi/scsi_ioctl.c | static void scsi_ioctl_done (Scsi_Cmnd * SCpnt) |
SCpnt | 96 | drivers/scsi/scsi_ioctl.c | req = &SCpnt->request; |
SCpnt | 107 | drivers/scsi/scsi_ioctl.c | Scsi_Cmnd * SCpnt; |
SCpnt | 109 | drivers/scsi/scsi_ioctl.c | SCpnt = allocate_device(NULL, dev, 1); |
SCpnt | 112 | drivers/scsi/scsi_ioctl.c | SCpnt->request.sem = &sem; |
SCpnt | 113 | drivers/scsi/scsi_ioctl.c | scsi_do_cmd(SCpnt, cmd, NULL, 0, |
SCpnt | 119 | drivers/scsi/scsi_ioctl.c | if(driver_byte(SCpnt->result) != 0) |
SCpnt | 120 | drivers/scsi/scsi_ioctl.c | switch(SCpnt->sense_buffer[2] & 0xf) { |
SCpnt | 133 | drivers/scsi/scsi_ioctl.c | SCpnt->result = 0; /* This is no longer considered an error */ |
SCpnt | 142 | drivers/scsi/scsi_ioctl.c | SCpnt->result); |
SCpnt | 144 | drivers/scsi/scsi_ioctl.c | sense_class(SCpnt->sense_buffer[0]), |
SCpnt | 145 | drivers/scsi/scsi_ioctl.c | sense_error(SCpnt->sense_buffer[0]), |
SCpnt | 146 | drivers/scsi/scsi_ioctl.c | SCpnt->sense_buffer[2] & 0xf); |
SCpnt | 150 | drivers/scsi/scsi_ioctl.c | result = SCpnt->result; |
SCpnt | 151 | drivers/scsi/scsi_ioctl.c | SCpnt->request.rq_status = RQ_INACTIVE; |
SCpnt | 152 | drivers/scsi/scsi_ioctl.c | wake_up(&SCpnt->device->device_wait); |
SCpnt | 166 | drivers/scsi/scsi_ioctl.c | Scsi_Cmnd * SCpnt; |
SCpnt | 240 | drivers/scsi/scsi_ioctl.c | SCpnt = allocate_device(NULL, dev, 1); |
SCpnt | 244 | drivers/scsi/scsi_ioctl.c | SCpnt->request.sem = &sem; |
SCpnt | 245 | drivers/scsi/scsi_ioctl.c | scsi_do_cmd(SCpnt, cmd, buf, needed, scsi_ioctl_done, MAX_TIMEOUT, |
SCpnt | 253 | drivers/scsi/scsi_ioctl.c | if(SCpnt->result) { |
SCpnt | 256 | drivers/scsi/scsi_ioctl.c | sizeof(SCpnt->sense_buffer)); |
SCpnt | 259 | drivers/scsi/scsi_ioctl.c | SCpnt->sense_buffer, |
SCpnt | 260 | drivers/scsi/scsi_ioctl.c | sizeof(SCpnt->sense_buffer)); |
SCpnt | 266 | drivers/scsi/scsi_ioctl.c | result = SCpnt->result; |
SCpnt | 268 | drivers/scsi/scsi_ioctl.c | SCpnt->request.rq_status = RQ_INACTIVE; |
SCpnt | 272 | drivers/scsi/scsi_ioctl.c | if(SCpnt->device->scsi_request_fn) |
SCpnt | 273 | drivers/scsi/scsi_ioctl.c | (*SCpnt->device->scsi_request_fn)(); |
SCpnt | 275 | drivers/scsi/scsi_ioctl.c | wake_up(&SCpnt->device->device_wait); |
SCpnt | 37 | drivers/scsi/scsi_syms.c | extern void print_sense(const char * devclass, Scsi_Cmnd * SCpnt); |
SCpnt | 79 | drivers/scsi/sd.c | static void requeue_sd_request (Scsi_Cmnd * SCpnt); |
SCpnt | 216 | drivers/scsi/sd.c | static void rw_intr (Scsi_Cmnd *SCpnt) |
SCpnt | 218 | drivers/scsi/sd.c | int result = SCpnt->result; |
SCpnt | 219 | drivers/scsi/sd.c | int this_count = SCpnt->bufflen >> 9; |
SCpnt | 222 | drivers/scsi/sd.c | printk("sd%c : rw_intr(%d, %d)\n", 'a' + MINOR(SCpnt->request.rq_dev), |
SCpnt | 223 | drivers/scsi/sd.c | SCpnt->host->host_no, result); |
SCpnt | 235 | drivers/scsi/sd.c | printk("sd%c : %d sectors remain.\n", 'a' + MINOR(SCpnt->request.rq_dev), |
SCpnt | 236 | drivers/scsi/sd.c | SCpnt->request.nr_sectors); |
SCpnt | 237 | drivers/scsi/sd.c | printk("use_sg is %d\n ",SCpnt->use_sg); |
SCpnt | 239 | drivers/scsi/sd.c | if (SCpnt->use_sg) { |
SCpnt | 242 | drivers/scsi/sd.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 243 | drivers/scsi/sd.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 249 | drivers/scsi/sd.c | if (SCpnt->request.cmd == READ) |
SCpnt | 257 | drivers/scsi/sd.c | scsi_free(SCpnt->buffer, SCpnt->sglist_len); |
SCpnt | 259 | drivers/scsi/sd.c | if (SCpnt->buffer != SCpnt->request.buffer) { |
SCpnt | 261 | drivers/scsi/sd.c | printk("nosg: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 262 | drivers/scsi/sd.c | SCpnt->bufflen); |
SCpnt | 264 | drivers/scsi/sd.c | if (SCpnt->request.cmd == READ) |
SCpnt | 265 | drivers/scsi/sd.c | memcpy(SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 266 | drivers/scsi/sd.c | SCpnt->bufflen); |
SCpnt | 267 | drivers/scsi/sd.c | scsi_free(SCpnt->buffer, SCpnt->bufflen); |
SCpnt | 275 | drivers/scsi/sd.c | if (SCpnt->request.nr_sectors > this_count) |
SCpnt | 277 | drivers/scsi/sd.c | SCpnt->request.errors = 0; |
SCpnt | 279 | drivers/scsi/sd.c | if (!SCpnt->request.bh) |
SCpnt | 283 | drivers/scsi/sd.c | 'a' + MINOR(SCpnt->request.rq_dev)); |
SCpnt | 290 | drivers/scsi/sd.c | SCpnt->request.sector, this_count); |
SCpnt | 293 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 1, this_count); |
SCpnt | 294 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 299 | drivers/scsi/sd.c | if (SCpnt->use_sg) { |
SCpnt | 302 | drivers/scsi/sd.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 303 | drivers/scsi/sd.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 305 | drivers/scsi/sd.c | printk("err: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 306 | drivers/scsi/sd.c | SCpnt->bufflen); |
SCpnt | 312 | drivers/scsi/sd.c | scsi_free(SCpnt->buffer, SCpnt->sglist_len); /* Free list of scatter-gather pointers */ |
SCpnt | 315 | drivers/scsi/sd.c | printk("nosgerr: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 316 | drivers/scsi/sd.c | SCpnt->bufflen); |
SCpnt | 318 | drivers/scsi/sd.c | if (SCpnt->buffer != SCpnt->request.buffer) |
SCpnt | 319 | drivers/scsi/sd.c | scsi_free(SCpnt->buffer, SCpnt->bufflen); |
SCpnt | 335 | drivers/scsi/sd.c | if rscsi_disks[DEVICE_NR(SCpnt->request.rq_dev)].remap |
SCpnt | 343 | drivers/scsi/sd.c | if ((SCpnt->sense_buffer[0] & 0x7f) == 0x70) { |
SCpnt | 344 | drivers/scsi/sd.c | if ((SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) { |
SCpnt | 345 | drivers/scsi/sd.c | if(rscsi_disks[DEVICE_NR(SCpnt->request.rq_dev)].device->removable) { |
SCpnt | 349 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.rq_dev)].device->changed = 1; |
SCpnt | 350 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, this_count); |
SCpnt | 351 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 361 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 375 | drivers/scsi/sd.c | if (SCpnt->sense_buffer[2] == ILLEGAL_REQUEST) { |
SCpnt | 376 | drivers/scsi/sd.c | if (rscsi_disks[DEVICE_NR(SCpnt->request.rq_dev)].ten) { |
SCpnt | 377 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.rq_dev)].ten = 0; |
SCpnt | 378 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 387 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.rq_dev)].device->host->host_no, |
SCpnt | 388 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.rq_dev)].device->channel, |
SCpnt | 389 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.rq_dev)].device->id, |
SCpnt | 390 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.rq_dev)].device->lun, result); |
SCpnt | 393 | drivers/scsi/sd.c | print_sense("sd", SCpnt); |
SCpnt | 394 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.current_nr_sectors); |
SCpnt | 395 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 408 | drivers/scsi/sd.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 459 | drivers/scsi/sd.c | SCpnt = allocate_device(&CURRENT, |
SCpnt | 461 | drivers/scsi/sd.c | else SCpnt = NULL; |
SCpnt | 479 | drivers/scsi/sd.c | if (!SCpnt && sd_template.nr_dev > 1){ |
SCpnt | 485 | drivers/scsi/sd.c | SCpnt = request_queueable(req, rscsi_disks[DEVICE_NR(req->rq_dev)].device); |
SCpnt | 486 | drivers/scsi/sd.c | if(SCpnt) break; |
SCpnt | 490 | drivers/scsi/sd.c | if (SCpnt && req->rq_status == RQ_INACTIVE) { |
SCpnt | 499 | drivers/scsi/sd.c | if (!SCpnt) return; /* Could not find anything to do */ |
SCpnt | 502 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 506 | drivers/scsi/sd.c | static void requeue_sd_request (Scsi_Cmnd * SCpnt) |
SCpnt | 517 | drivers/scsi/sd.c | if(!SCpnt || SCpnt->request.rq_status == RQ_INACTIVE) { |
SCpnt | 522 | drivers/scsi/sd.c | devm = MINOR(SCpnt->request.rq_dev); |
SCpnt | 523 | drivers/scsi/sd.c | dev = DEVICE_NR(SCpnt->request.rq_dev); |
SCpnt | 525 | drivers/scsi/sd.c | block = SCpnt->request.sector; |
SCpnt | 534 | drivers/scsi/sd.c | block + SCpnt->request.nr_sectors > sd[devm].nr_sects) |
SCpnt | 536 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 549 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 570 | drivers/scsi/sd.c | if((block & 1) || (SCpnt->request.nr_sectors & 1)) { |
SCpnt | 572 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 576 | drivers/scsi/sd.c | switch (SCpnt->request.cmd) |
SCpnt | 581 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 590 | drivers/scsi/sd.c | panic ("Unknown sd command %d\n", SCpnt->request.cmd); |
SCpnt | 593 | drivers/scsi/sd.c | SCpnt->this_count = 0; |
SCpnt | 598 | drivers/scsi/sd.c | contiguous = (!CLUSTERABLE_DEVICE(SCpnt) ? 0 :1); |
SCpnt | 600 | drivers/scsi/sd.c | bounce_size = (SCpnt->request.nr_sectors << 9); |
SCpnt | 606 | drivers/scsi/sd.c | if (contiguous && SCpnt->request.bh && |
SCpnt | 607 | drivers/scsi/sd.c | ((long) SCpnt->request.bh->b_data) |
SCpnt | 608 | drivers/scsi/sd.c | + (SCpnt->request.nr_sectors << 9) - 1 > ISA_DMA_THRESHOLD |
SCpnt | 609 | drivers/scsi/sd.c | && SCpnt->host->unchecked_isa_dma) { |
SCpnt | 610 | drivers/scsi/sd.c | if(((long) SCpnt->request.bh->b_data) > ISA_DMA_THRESHOLD) |
SCpnt | 615 | drivers/scsi/sd.c | if(contiguous && SCpnt->request.bh && SCpnt->request.bh->b_reqnext) |
SCpnt | 616 | drivers/scsi/sd.c | for(bh = SCpnt->request.bh, bhp = bh->b_reqnext; bhp; bh = bhp, |
SCpnt | 624 | drivers/scsi/sd.c | if (!SCpnt->request.bh || contiguous) { |
SCpnt | 627 | drivers/scsi/sd.c | this_count = SCpnt->request.nr_sectors; |
SCpnt | 628 | drivers/scsi/sd.c | buff = SCpnt->request.buffer; |
SCpnt | 629 | drivers/scsi/sd.c | SCpnt->use_sg = 0; |
SCpnt | 631 | drivers/scsi/sd.c | } else if (SCpnt->host->sg_tablesize == 0 || |
SCpnt | 641 | drivers/scsi/sd.c | if (SCpnt->host->sg_tablesize != 0 && |
SCpnt | 646 | drivers/scsi/sd.c | this_count = SCpnt->request.current_nr_sectors; |
SCpnt | 647 | drivers/scsi/sd.c | buff = SCpnt->request.buffer; |
SCpnt | 648 | drivers/scsi/sd.c | SCpnt->use_sg = 0; |
SCpnt | 657 | drivers/scsi/sd.c | bh = SCpnt->request.bh; |
SCpnt | 665 | drivers/scsi/sd.c | !CLUSTERABLE_DEVICE(SCpnt) || |
SCpnt | 666 | drivers/scsi/sd.c | (SCpnt->host->unchecked_isa_dma && |
SCpnt | 668 | drivers/scsi/sd.c | if (count < SCpnt->host->sg_tablesize) count++; |
SCpnt | 676 | drivers/scsi/sd.c | if(SCpnt->host->unchecked_isa_dma && |
SCpnt | 677 | drivers/scsi/sd.c | ((unsigned int) SCpnt->request.bh->b_data-1) == ISA_DMA_THRESHOLD) count--; |
SCpnt | 679 | drivers/scsi/sd.c | SCpnt->use_sg = count; /* Number of chains */ |
SCpnt | 681 | drivers/scsi/sd.c | while( count < (SCpnt->use_sg * sizeof(struct scatterlist))) |
SCpnt | 683 | drivers/scsi/sd.c | SCpnt->sglist_len = count; |
SCpnt | 685 | drivers/scsi/sd.c | if(SCpnt->host->sg_tablesize < max_sg) |
SCpnt | 686 | drivers/scsi/sd.c | max_sg = SCpnt->host->sg_tablesize; |
SCpnt | 690 | drivers/scsi/sd.c | SCpnt->use_sg = 0; /* No memory left - bail out */ |
SCpnt | 691 | drivers/scsi/sd.c | this_count = SCpnt->request.current_nr_sectors; |
SCpnt | 692 | drivers/scsi/sd.c | buff = SCpnt->request.buffer; |
SCpnt | 699 | drivers/scsi/sd.c | for(count = 0, bh = SCpnt->request.bh, bhp = bh->b_reqnext; |
SCpnt | 700 | drivers/scsi/sd.c | count < SCpnt->use_sg && bh; |
SCpnt | 710 | drivers/scsi/sd.c | ISA_DMA_THRESHOLD && (SCpnt->host->unchecked_isa_dma) && |
SCpnt | 737 | drivers/scsi/sd.c | this_count = SCpnt->request.current_nr_sectors; |
SCpnt | 738 | drivers/scsi/sd.c | buff = SCpnt->request.buffer; |
SCpnt | 739 | drivers/scsi/sd.c | SCpnt->use_sg = 0; |
SCpnt | 740 | drivers/scsi/sd.c | scsi_free(sgpnt, SCpnt->sglist_len); |
SCpnt | 742 | drivers/scsi/sd.c | SCpnt->use_sg = count; |
SCpnt | 754 | drivers/scsi/sd.c | && CLUSTERABLE_DEVICE(SCpnt)) { |
SCpnt | 759 | drivers/scsi/sd.c | (SCpnt->host->unchecked_isa_dma) && |
SCpnt | 768 | drivers/scsi/sd.c | max_sg = SCpnt->use_sg; |
SCpnt | 781 | drivers/scsi/sd.c | if (SCpnt->use_sg < max_sg) SCpnt->use_sg++; |
SCpnt | 788 | drivers/scsi/sd.c | if(count < SCpnt->use_sg || SCpnt->use_sg |
SCpnt | 789 | drivers/scsi/sd.c | > SCpnt->host->sg_tablesize){ |
SCpnt | 790 | drivers/scsi/sd.c | bh = SCpnt->request.bh; |
SCpnt | 792 | drivers/scsi/sd.c | SCpnt->use_sg, count, dma_free_sectors); |
SCpnt | 799 | drivers/scsi/sd.c | if(SCpnt->use_sg < 16) |
SCpnt | 800 | drivers/scsi/sd.c | for(count=0; count<SCpnt->use_sg; count++) |
SCpnt | 808 | drivers/scsi/sd.c | if (SCpnt->request.cmd == WRITE) |
SCpnt | 809 | drivers/scsi/sd.c | for(count=0; count<SCpnt->use_sg; count++) |
SCpnt | 818 | drivers/scsi/sd.c | if(SCpnt->use_sg == 0){ |
SCpnt | 820 | drivers/scsi/sd.c | (SCpnt->host->unchecked_isa_dma)) { |
SCpnt | 826 | drivers/scsi/sd.c | this_count = SCpnt->request.current_nr_sectors; |
SCpnt | 830 | drivers/scsi/sd.c | if (SCpnt->request.cmd == WRITE) |
SCpnt | 831 | drivers/scsi/sd.c | memcpy(buff, (char *)SCpnt->request.buffer, this_count << 9); |
SCpnt | 837 | drivers/scsi/sd.c | (SCpnt->request.cmd == WRITE) ? "writing" : "reading", |
SCpnt | 838 | drivers/scsi/sd.c | this_count, SCpnt->request.nr_sectors); |
SCpnt | 841 | drivers/scsi/sd.c | cmd[1] = (SCpnt->lun << 5) & 0xe0; |
SCpnt | 887 | drivers/scsi/sd.c | SCpnt->transfersize = rscsi_disks[dev].sector_size; |
SCpnt | 888 | drivers/scsi/sd.c | SCpnt->underflow = this_count << 9; |
SCpnt | 889 | drivers/scsi/sd.c | scsi_do_cmd (SCpnt, (void *) cmd, buff, |
SCpnt | 892 | drivers/scsi/sd.c | (SCpnt->device->type == TYPE_DISK ? |
SCpnt | 940 | drivers/scsi/sd.c | static void sd_init_done (Scsi_Cmnd * SCpnt) |
SCpnt | 944 | drivers/scsi/sd.c | req = &SCpnt->request; |
SCpnt | 958 | drivers/scsi/sd.c | Scsi_Cmnd * SCpnt; |
SCpnt | 965 | drivers/scsi/sd.c | SCpnt = allocate_device(NULL, rscsi_disks[i].device, 1); |
SCpnt | 979 | drivers/scsi/sd.c | SCpnt->cmd_len = 0; |
SCpnt | 980 | drivers/scsi/sd.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 981 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] = 0; |
SCpnt | 986 | drivers/scsi/sd.c | SCpnt->request.rq_status = RQ_SCSI_BUSY; |
SCpnt | 987 | drivers/scsi/sd.c | SCpnt->request.sem = &sem; |
SCpnt | 988 | drivers/scsi/sd.c | scsi_do_cmd (SCpnt, |
SCpnt | 995 | drivers/scsi/sd.c | the_result = SCpnt->result; |
SCpnt | 998 | drivers/scsi/sd.c | || SCpnt->sense_buffer[2] != UNIT_ATTENTION) |
SCpnt | 1005 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] == NOT_READY) { |
SCpnt | 1014 | drivers/scsi/sd.c | SCpnt->cmd_len = 0; |
SCpnt | 1015 | drivers/scsi/sd.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 1016 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] = 0; |
SCpnt | 1021 | drivers/scsi/sd.c | SCpnt->request.rq_status = RQ_SCSI_BUSY; |
SCpnt | 1022 | drivers/scsi/sd.c | SCpnt->request.sem = &sem; |
SCpnt | 1023 | drivers/scsi/sd.c | scsi_do_cmd (SCpnt, |
SCpnt | 1053 | drivers/scsi/sd.c | SCpnt->cmd_len = 0; |
SCpnt | 1054 | drivers/scsi/sd.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 1055 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] = 0; |
SCpnt | 1060 | drivers/scsi/sd.c | SCpnt->request.rq_status = RQ_SCSI_BUSY; |
SCpnt | 1061 | drivers/scsi/sd.c | SCpnt->request.sem = &sem; |
SCpnt | 1062 | drivers/scsi/sd.c | scsi_do_cmd (SCpnt, |
SCpnt | 1069 | drivers/scsi/sd.c | the_result = SCpnt->result; |
SCpnt | 1074 | drivers/scsi/sd.c | SCpnt->request.rq_status = RQ_INACTIVE; /* Mark as not busy */ |
SCpnt | 1076 | drivers/scsi/sd.c | wake_up(&SCpnt->device->device_wait); |
SCpnt | 1106 | drivers/scsi/sd.c | 'a' + i, SCpnt->sense_buffer[2] & 0xf); |
SCpnt | 1118 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] == NOT_READY) |
SCpnt | 1193 | drivers/scsi/sd.c | SCpnt->cmd_len = 0; |
SCpnt | 1194 | drivers/scsi/sd.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 1195 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] = 0; |
SCpnt | 1200 | drivers/scsi/sd.c | SCpnt->request.rq_status = RQ_SCSI_BUSY; /* Mark as really busy again */ |
SCpnt | 1201 | drivers/scsi/sd.c | SCpnt->request.sem = &sem; |
SCpnt | 1202 | drivers/scsi/sd.c | scsi_do_cmd (SCpnt, |
SCpnt | 1209 | drivers/scsi/sd.c | the_result = SCpnt->result; |
SCpnt | 1210 | drivers/scsi/sd.c | SCpnt->request.rq_status = RQ_INACTIVE; /* Mark as not busy */ |
SCpnt | 1211 | drivers/scsi/sd.c | wake_up(&SCpnt->device->device_wait); |
SCpnt | 525 | drivers/scsi/seagate.c | int seagate_st0x_queue_command (Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 531 | drivers/scsi/seagate.c | current_target = SCpnt->target; |
SCpnt | 532 | drivers/scsi/seagate.c | current_lun = SCpnt->lun; |
SCpnt | 533 | drivers/scsi/seagate.c | (const void *) current_cmnd = SCpnt->cmnd; |
SCpnt | 534 | drivers/scsi/seagate.c | current_data = (unsigned char *) SCpnt->request_buffer; |
SCpnt | 535 | drivers/scsi/seagate.c | current_bufflen = SCpnt->request_bufflen; |
SCpnt | 536 | drivers/scsi/seagate.c | SCint = SCpnt; |
SCpnt | 547 | drivers/scsi/seagate.c | current_cmnd[SCpnt->cmd_len] |= 0x01; |
SCpnt | 586 | drivers/scsi/seagate.c | int seagate_st0x_command (Scsi_Cmnd * SCpnt) { |
SCpnt | 587 | drivers/scsi/seagate.c | return internal_command (SCpnt->target, SCpnt->lun, SCpnt->cmnd, SCpnt->request_buffer, |
SCpnt | 588 | drivers/scsi/seagate.c | SCpnt->request_bufflen, |
SCpnt | 1562 | drivers/scsi/seagate.c | int seagate_st0x_abort (Scsi_Cmnd * SCpnt) |
SCpnt | 1573 | drivers/scsi/seagate.c | int seagate_st0x_reset (Scsi_Cmnd * SCpnt) |
SCpnt | 263 | drivers/scsi/sg.c | static void sg_command_done(Scsi_Cmnd * SCpnt) |
SCpnt | 265 | drivers/scsi/sg.c | int dev = MINOR(SCpnt->request.rq_dev); |
SCpnt | 270 | drivers/scsi/sg.c | SCpnt->request.rq_status = RQ_INACTIVE; |
SCpnt | 278 | drivers/scsi/sg.c | memcpy(device->header.sense_buffer, SCpnt->sense_buffer, sizeof(SCpnt->sense_buffer)); |
SCpnt | 279 | drivers/scsi/sg.c | if (SCpnt->sense_buffer[0]) |
SCpnt | 284 | drivers/scsi/sg.c | device->header.result=SCpnt->result; |
SCpnt | 291 | drivers/scsi/sg.c | SCpnt->request.rq_status = RQ_INACTIVE; |
SCpnt | 307 | drivers/scsi/sg.c | Scsi_Cmnd * SCpnt; |
SCpnt | 389 | drivers/scsi/sg.c | if (!(SCpnt=allocate_device(NULL,device->device, !(filp->f_flags & O_NONBLOCK)))) |
SCpnt | 404 | drivers/scsi/sg.c | SCpnt->request.rq_dev = devt; |
SCpnt | 405 | drivers/scsi/sg.c | SCpnt->request.rq_status = RQ_ACTIVE; |
SCpnt | 406 | drivers/scsi/sg.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 410 | drivers/scsi/sg.c | SCpnt->cmd_len = size; |
SCpnt | 459 | drivers/scsi/sg.c | scsi_do_cmd (SCpnt,(void *) cmnd, |
SCpnt | 65 | drivers/scsi/sr.c | void requeue_sr_request (Scsi_Cmnd * SCpnt); |
SCpnt | 149 | drivers/scsi/sr.c | static void rw_intr (Scsi_Cmnd * SCpnt) |
SCpnt | 151 | drivers/scsi/sr.c | int result = SCpnt->result; |
SCpnt | 152 | drivers/scsi/sr.c | int this_count = SCpnt->this_count; |
SCpnt | 155 | drivers/scsi/sr.c | printk("sr.c done: %x %x\n",result, SCpnt->request.bh->b_data); |
SCpnt | 159 | drivers/scsi/sr.c | if (SCpnt->use_sg == 0) { |
SCpnt | 160 | drivers/scsi/sr.c | if (SCpnt->buffer != SCpnt->request.buffer) |
SCpnt | 163 | drivers/scsi/sr.c | offset = (SCpnt->request.sector % 4) << 9; |
SCpnt | 164 | drivers/scsi/sr.c | memcpy((char *)SCpnt->request.buffer, |
SCpnt | 165 | drivers/scsi/sr.c | (char *)SCpnt->buffer + offset, |
SCpnt | 172 | drivers/scsi/sr.c | SCpnt->request.nr_sectors > this_count && |
SCpnt | 173 | drivers/scsi/sr.c | SCpnt->request.bh && |
SCpnt | 174 | drivers/scsi/sr.c | SCpnt->request.bh->b_reqnext && |
SCpnt | 175 | drivers/scsi/sr.c | SCpnt->request.bh->b_reqnext->b_size == 1024) { |
SCpnt | 176 | drivers/scsi/sr.c | memcpy((char *)SCpnt->request.bh->b_reqnext->b_data, |
SCpnt | 177 | drivers/scsi/sr.c | (char *)SCpnt->buffer + 1024, |
SCpnt | 182 | drivers/scsi/sr.c | scsi_free(SCpnt->buffer, 2048); |
SCpnt | 187 | drivers/scsi/sr.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 188 | drivers/scsi/sr.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 196 | drivers/scsi/sr.c | scsi_free(SCpnt->buffer, SCpnt->sglist_len); /* Free list of scatter-gather pointers */ |
SCpnt | 197 | drivers/scsi/sr.c | if(SCpnt->request.sector % 4) this_count -= 2; |
SCpnt | 199 | drivers/scsi/sr.c | if(this_count > SCpnt->request.nr_sectors) |
SCpnt | 204 | drivers/scsi/sr.c | printk("(%x %x %x) ",SCpnt->request.bh, SCpnt->request.nr_sectors, |
SCpnt | 207 | drivers/scsi/sr.c | if (SCpnt->request.nr_sectors > this_count) |
SCpnt | 209 | drivers/scsi/sr.c | SCpnt->request.errors = 0; |
SCpnt | 210 | drivers/scsi/sr.c | if (!SCpnt->request.bh) |
SCpnt | 212 | drivers/scsi/sr.c | SCpnt->request.sector, this_count); |
SCpnt | 215 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 1, this_count); /* All done */ |
SCpnt | 216 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 223 | drivers/scsi/sr.c | if (SCpnt->use_sg) { |
SCpnt | 226 | drivers/scsi/sr.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 227 | drivers/scsi/sr.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 232 | drivers/scsi/sr.c | scsi_free(SCpnt->buffer, SCpnt->sglist_len); /* Free list of scatter-gather pointers */ |
SCpnt | 234 | drivers/scsi/sr.c | if (SCpnt->buffer != SCpnt->request.buffer) |
SCpnt | 235 | drivers/scsi/sr.c | scsi_free(SCpnt->buffer, SCpnt->bufflen); |
SCpnt | 239 | drivers/scsi/sr.c | if ((SCpnt->sense_buffer[0] & 0x7f) == 0x70) { |
SCpnt | 240 | drivers/scsi/sr.c | if ((SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) { |
SCpnt | 244 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.rq_dev)].device->changed = 1; |
SCpnt | 245 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, this_count); |
SCpnt | 246 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 251 | drivers/scsi/sr.c | if (SCpnt->sense_buffer[2] == ILLEGAL_REQUEST) { |
SCpnt | 253 | drivers/scsi/sr.c | print_sense("sr", SCpnt); |
SCpnt | 255 | drivers/scsi/sr.c | print_command(SCpnt->cmnd); |
SCpnt | 256 | drivers/scsi/sr.c | if (scsi_CDs[DEVICE_NR(SCpnt->request.rq_dev)].ten) { |
SCpnt | 257 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.rq_dev)].ten = 0; |
SCpnt | 258 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 262 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, this_count); |
SCpnt | 263 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); /* Do next request */ |
SCpnt | 269 | drivers/scsi/sr.c | if (SCpnt->sense_buffer[2] == NOT_READY) { |
SCpnt | 271 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, this_count); |
SCpnt | 272 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); /* Do next request */ |
SCpnt | 280 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.rq_dev)].device->host->host_no, |
SCpnt | 281 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.rq_dev)].device->id, |
SCpnt | 282 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.rq_dev)].device->lun, |
SCpnt | 286 | drivers/scsi/sr.c | print_sense("sr", SCpnt); |
SCpnt | 288 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.current_nr_sectors); |
SCpnt | 289 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 557 | drivers/scsi/sr.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 596 | drivers/scsi/sr.c | SCpnt = allocate_device(&CURRENT, |
SCpnt | 598 | drivers/scsi/sr.c | else SCpnt = NULL; |
SCpnt | 608 | drivers/scsi/sr.c | if (!SCpnt && sr_template.nr_dev > 1){ |
SCpnt | 615 | drivers/scsi/sr.c | SCpnt = request_queueable(req, |
SCpnt | 617 | drivers/scsi/sr.c | if(SCpnt) break; |
SCpnt | 621 | drivers/scsi/sr.c | if (SCpnt && req->rq_status == RQ_INACTIVE) { |
SCpnt | 630 | drivers/scsi/sr.c | if (!SCpnt) |
SCpnt | 636 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 640 | drivers/scsi/sr.c | void requeue_sr_request (Scsi_Cmnd * SCpnt) |
SCpnt | 649 | drivers/scsi/sr.c | if(!SCpnt || SCpnt->request.rq_status == RQ_INACTIVE) { |
SCpnt | 654 | drivers/scsi/sr.c | dev = MINOR(SCpnt->request.rq_dev); |
SCpnt | 655 | drivers/scsi/sr.c | block = SCpnt->request.sector; |
SCpnt | 661 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 668 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 679 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 684 | drivers/scsi/sr.c | switch (SCpnt->request.cmd) |
SCpnt | 687 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 694 | drivers/scsi/sr.c | panic ("Unknown sr command %d\n", SCpnt->request.cmd); |
SCpnt | 697 | drivers/scsi/sr.c | cmd[1] = (SCpnt->lun << 5) & 0xe0; |
SCpnt | 716 | drivers/scsi/sr.c | SCpnt->use_sg = 0; |
SCpnt | 718 | drivers/scsi/sr.c | if (SCpnt->host->sg_tablesize > 0 && |
SCpnt | 724 | drivers/scsi/sr.c | bh = SCpnt->request.bh; |
SCpnt | 730 | drivers/scsi/sr.c | this_count = SCpnt->request.sector % 4; |
SCpnt | 732 | drivers/scsi/sr.c | while(bh && count < SCpnt->host->sg_tablesize) { |
SCpnt | 741 | drivers/scsi/sr.c | if (count < SCpnt->host->sg_tablesize) { |
SCpnt | 750 | drivers/scsi/sr.c | SCpnt->use_sg = count; /* Number of chains */ |
SCpnt | 752 | drivers/scsi/sr.c | while( count < (SCpnt->use_sg * sizeof(struct scatterlist))) |
SCpnt | 754 | drivers/scsi/sr.c | SCpnt->sglist_len = count; |
SCpnt | 758 | drivers/scsi/sr.c | SCpnt->use_sg = 0; /* No memory left - bail out */ |
SCpnt | 762 | drivers/scsi/sr.c | bh = SCpnt->request.bh; |
SCpnt | 763 | drivers/scsi/sr.c | if(SCpnt->request.sector % 4) { |
SCpnt | 764 | drivers/scsi/sr.c | sgpnt[count].length = (SCpnt->request.sector % 4) << 9; |
SCpnt | 771 | drivers/scsi/sr.c | for(bh = SCpnt->request.bh; count < SCpnt->use_sg; |
SCpnt | 782 | drivers/scsi/sr.c | if (count+1 != SCpnt->use_sg) panic("Bad sr request list"); |
SCpnt | 786 | drivers/scsi/sr.c | SCpnt->host->unchecked_isa_dma) { |
SCpnt | 807 | drivers/scsi/sr.c | SCpnt->use_sg = 0; |
SCpnt | 808 | drivers/scsi/sr.c | scsi_free(buffer, SCpnt->sglist_len); |
SCpnt | 814 | drivers/scsi/sr.c | printk("SR: %d %d %d %d %d *** ",SCpnt->use_sg, SCpnt->request.sector, |
SCpnt | 816 | drivers/scsi/sr.c | SCpnt->request.current_nr_sectors, |
SCpnt | 817 | drivers/scsi/sr.c | SCpnt->request.nr_sectors); |
SCpnt | 818 | drivers/scsi/sr.c | for(count=0; count<SCpnt->use_sg; count++) |
SCpnt | 827 | drivers/scsi/sr.c | if (SCpnt->use_sg == 0){ |
SCpnt | 829 | drivers/scsi/sr.c | if (!SCpnt->request.bh) |
SCpnt | 830 | drivers/scsi/sr.c | this_count = SCpnt->request.nr_sectors; |
SCpnt | 832 | drivers/scsi/sr.c | this_count = (SCpnt->request.bh->b_size >> 9); |
SCpnt | 848 | drivers/scsi/sr.c | buffer = (unsigned char *) SCpnt->request.buffer; |
SCpnt | 850 | drivers/scsi/sr.c | SCpnt->host->unchecked_isa_dma) |
SCpnt | 900 | drivers/scsi/sr.c | printk("Use sg: %d\n", SCpnt->use_sg); |
SCpnt | 917 | drivers/scsi/sr.c | SCpnt->transfersize = (scsi_CDs[dev].sector_size > 1024) ? |
SCpnt | 920 | drivers/scsi/sr.c | SCpnt->this_count = this_count; |
SCpnt | 921 | drivers/scsi/sr.c | scsi_do_cmd (SCpnt, (void *) cmd, buffer, |
SCpnt | 963 | drivers/scsi/sr.c | static void sr_init_done (Scsi_Cmnd * SCpnt) |
SCpnt | 967 | drivers/scsi/sr.c | req = &SCpnt->request; |
SCpnt | 979 | drivers/scsi/sr.c | Scsi_Cmnd * SCpnt; |
SCpnt | 982 | drivers/scsi/sr.c | SCpnt = allocate_device(NULL, scsi_CDs[i].device, 1); |
SCpnt | 989 | drivers/scsi/sr.c | SCpnt->request.rq_status = RQ_SCSI_BUSY; /* Mark as really busy */ |
SCpnt | 990 | drivers/scsi/sr.c | SCpnt->cmd_len = 0; |
SCpnt | 997 | drivers/scsi/sr.c | SCpnt->request.sem = &sem; |
SCpnt | 998 | drivers/scsi/sr.c | scsi_do_cmd (SCpnt, |
SCpnt | 1005 | drivers/scsi/sr.c | the_result = SCpnt->result; |
SCpnt | 1010 | drivers/scsi/sr.c | SCpnt->request.rq_status = RQ_INACTIVE; /* Mark as not busy */ |
SCpnt | 1012 | drivers/scsi/sr.c | wake_up(&SCpnt->device->device_wait); |
SCpnt | 21 | drivers/scsi/sr_ioctl.c | static void sr_ioctl_done(Scsi_Cmnd * SCpnt) |
SCpnt | 25 | drivers/scsi/sr_ioctl.c | req = &SCpnt->request; |
SCpnt | 39 | drivers/scsi/sr_ioctl.c | Scsi_Cmnd * SCpnt; |
SCpnt | 42 | drivers/scsi/sr_ioctl.c | SCpnt = allocate_device(NULL, scsi_CDs[target].device, 1); |
SCpnt | 45 | drivers/scsi/sr_ioctl.c | SCpnt->request.sem = &sem; |
SCpnt | 46 | drivers/scsi/sr_ioctl.c | scsi_do_cmd(SCpnt, |
SCpnt | 52 | drivers/scsi/sr_ioctl.c | result = SCpnt->result; |
SCpnt | 56 | drivers/scsi/sr_ioctl.c | switch(SCpnt->sense_buffer[2] & 0xf) { |
SCpnt | 74 | drivers/scsi/sr_ioctl.c | sense_class(SCpnt->sense_buffer[0]), |
SCpnt | 75 | drivers/scsi/sr_ioctl.c | sense_error(SCpnt->sense_buffer[0]), |
SCpnt | 76 | drivers/scsi/sr_ioctl.c | SCpnt->sense_buffer[2] & 0xf); |
SCpnt | 80 | drivers/scsi/sr_ioctl.c | result = SCpnt->result; |
SCpnt | 81 | drivers/scsi/sr_ioctl.c | SCpnt->request.rq_status = RQ_INACTIVE; /* Deallocate */ |
SCpnt | 82 | drivers/scsi/sr_ioctl.c | wake_up(&SCpnt->device->device_wait); |
SCpnt | 104 | drivers/scsi/st.c | st_chk_result(Scsi_Cmnd * SCpnt) |
SCpnt | 106 | drivers/scsi/st.c | int dev = TAPE_NR(SCpnt->request.rq_dev); |
SCpnt | 107 | drivers/scsi/st.c | int result = SCpnt->result; |
SCpnt | 108 | drivers/scsi/st.c | unsigned char * sense = SCpnt->sense_buffer, scode; |
SCpnt | 118 | drivers/scsi/st.c | SCpnt->data_cmnd[0], SCpnt->data_cmnd[1], SCpnt->data_cmnd[2], |
SCpnt | 119 | drivers/scsi/st.c | SCpnt->data_cmnd[3], SCpnt->data_cmnd[4], SCpnt->data_cmnd[5], |
SCpnt | 120 | drivers/scsi/st.c | SCpnt->request_bufflen); |
SCpnt | 122 | drivers/scsi/st.c | print_sense("st", SCpnt); |
SCpnt | 135 | drivers/scsi/st.c | SCpnt->data_cmnd[0] != MODE_SENSE)) { /* Abnormal conditions for tape */ |
SCpnt | 139 | drivers/scsi/st.c | print_sense("st", SCpnt); |
SCpnt | 148 | drivers/scsi/st.c | && SCpnt->data_cmnd[0] != WRITE_6 |
SCpnt | 149 | drivers/scsi/st.c | && SCpnt->data_cmnd[0] != WRITE_FILEMARKS |
SCpnt | 156 | drivers/scsi/st.c | if (SCpnt->data_cmnd[0] == READ_6) |
SCpnt | 158 | drivers/scsi/st.c | else if (SCpnt->data_cmnd[0] == WRITE_6) |
SCpnt | 174 | drivers/scsi/st.c | st_sleep_done (Scsi_Cmnd * SCpnt) |
SCpnt | 180 | drivers/scsi/st.c | if ((st_nbr = TAPE_NR(SCpnt->request.rq_dev)) < st_template.nr_dev) { |
SCpnt | 183 | drivers/scsi/st.c | (SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 184 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x40)) { |
SCpnt | 186 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x80) != 0) |
SCpnt | 187 | drivers/scsi/st.c | remainder = (SCpnt->sense_buffer[3] << 24) | |
SCpnt | 188 | drivers/scsi/st.c | (SCpnt->sense_buffer[4] << 16) | |
SCpnt | 189 | drivers/scsi/st.c | (SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6]; |
SCpnt | 192 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW || |
SCpnt | 194 | drivers/scsi/st.c | (STp->buffer)->last_result = SCpnt->result; /* Error */ |
SCpnt | 199 | drivers/scsi/st.c | (STp->buffer)->last_result = SCpnt->result; |
SCpnt | 202 | drivers/scsi/st.c | (STp->buffer)->last_result_fatal = st_chk_result(SCpnt); |
SCpnt | 203 | drivers/scsi/st.c | SCpnt->request.rq_status = RQ_INACTIVE; |
SCpnt | 206 | drivers/scsi/st.c | SCpnt->request.rq_status = RQ_SCSI_DONE; |
SCpnt | 211 | drivers/scsi/st.c | up(SCpnt->request.sem); |
SCpnt | 222 | drivers/scsi/st.c | st_do_scsi(Scsi_Cmnd *SCpnt, Scsi_Tape *STp, unsigned char *cmd, int bytes, |
SCpnt | 225 | drivers/scsi/st.c | if (SCpnt == NULL) |
SCpnt | 226 | drivers/scsi/st.c | if ((SCpnt = allocate_device(NULL, STp->device, 1)) == NULL) { |
SCpnt | 231 | drivers/scsi/st.c | cmd[1] |= (SCpnt->lun << 5) & 0xe0; |
SCpnt | 233 | drivers/scsi/st.c | SCpnt->request.sem = &(STp->sem); |
SCpnt | 234 | drivers/scsi/st.c | SCpnt->request.rq_status = RQ_SCSI_BUSY; |
SCpnt | 235 | drivers/scsi/st.c | SCpnt->request.rq_dev = STp->devt; |
SCpnt | 237 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, (void *)cmd, (STp->buffer)->b_data, bytes, |
SCpnt | 240 | drivers/scsi/st.c | down(SCpnt->request.sem); |
SCpnt | 242 | drivers/scsi/st.c | (STp->buffer)->last_result_fatal = st_chk_result(SCpnt); |
SCpnt | 244 | drivers/scsi/st.c | return SCpnt; |
SCpnt | 287 | drivers/scsi/st.c | Scsi_Cmnd *SCpnt; |
SCpnt | 295 | drivers/scsi/st.c | SCpnt = st_do_scsi(NULL, STp, cmd, 0, ST_TIMEOUT, MAX_RETRIES); |
SCpnt | 296 | drivers/scsi/st.c | if (!SCpnt) |
SCpnt | 299 | drivers/scsi/st.c | SCpnt->request.rq_status = RQ_INACTIVE; |
SCpnt | 318 | drivers/scsi/st.c | Scsi_Cmnd *SCpnt; |
SCpnt | 357 | drivers/scsi/st.c | SCpnt = st_do_scsi(NULL, STp, cmd, transfer, ST_TIMEOUT, MAX_WRITE_RETRIES); |
SCpnt | 358 | drivers/scsi/st.c | if (!SCpnt) |
SCpnt | 363 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 364 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x40) && |
SCpnt | 365 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) != VOLUME_OVERFLOW) { |
SCpnt | 380 | drivers/scsi/st.c | SCpnt->request.rq_status = RQ_INACTIVE; /* Mark as not busy */ |
SCpnt | 445 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt; |
SCpnt | 491 | drivers/scsi/st.c | SCpnt = st_do_scsi(NULL, STp, cmd, 0, ST_LONG_TIMEOUT, MAX_READY_RETRIES); |
SCpnt | 492 | drivers/scsi/st.c | if (!SCpnt) |
SCpnt | 495 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 496 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == UNIT_ATTENTION) { /* New media? */ |
SCpnt | 501 | drivers/scsi/st.c | SCpnt = st_do_scsi(SCpnt, STp, cmd, 0, ST_LONG_TIMEOUT, MAX_READY_RETRIES); |
SCpnt | 509 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 510 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == NO_TAPE) { |
SCpnt | 518 | drivers/scsi/st.c | SCpnt->request.rq_status = RQ_INACTIVE; /* Mark as not busy */ |
SCpnt | 534 | drivers/scsi/st.c | SCpnt = st_do_scsi(SCpnt, STp, cmd, 6, ST_TIMEOUT, MAX_READY_RETRIES); |
SCpnt | 536 | drivers/scsi/st.c | if (!SCpnt->result && !SCpnt->sense_buffer[0]) { |
SCpnt | 559 | drivers/scsi/st.c | SCpnt = st_do_scsi(SCpnt, STp, cmd, 12, ST_TIMEOUT, MAX_READY_RETRIES); |
SCpnt | 603 | drivers/scsi/st.c | SCpnt->request.rq_status = RQ_INACTIVE; /* Mark as not busy */ |
SCpnt | 647 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt; |
SCpnt | 675 | drivers/scsi/st.c | SCpnt = st_do_scsi(NULL, STp, cmd, 0, ST_TIMEOUT, MAX_WRITE_RETRIES); |
SCpnt | 676 | drivers/scsi/st.c | if (!SCpnt) |
SCpnt | 679 | drivers/scsi/st.c | SCpnt->request.rq_status = RQ_INACTIVE; /* Mark as not busy */ |
SCpnt | 735 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 848 | drivers/scsi/st.c | SCpnt = st_do_scsi(SCpnt, STp, cmd, transfer, ST_TIMEOUT, MAX_WRITE_RETRIES); |
SCpnt | 849 | drivers/scsi/st.c | if (!SCpnt) |
SCpnt | 857 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 858 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x40)) { |
SCpnt | 859 | drivers/scsi/st.c | if (STp->block_size != 0 && (SCpnt->sense_buffer[0] & 0x80) != 0) |
SCpnt | 860 | drivers/scsi/st.c | transfer = (SCpnt->sense_buffer[3] << 24) | |
SCpnt | 861 | drivers/scsi/st.c | (SCpnt->sense_buffer[4] << 16) | |
SCpnt | 862 | drivers/scsi/st.c | (SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6]; |
SCpnt | 864 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW) |
SCpnt | 902 | drivers/scsi/st.c | SCpnt->request.rq_status = RQ_INACTIVE; /* Mark as not busy */ |
SCpnt | 932 | drivers/scsi/st.c | SCpnt->request.rq_status = RQ_INACTIVE; |
SCpnt | 940 | drivers/scsi/st.c | if (!SCpnt) { |
SCpnt | 941 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 942 | drivers/scsi/st.c | if (!SCpnt) |
SCpnt | 961 | drivers/scsi/st.c | SCpnt->request.sem = &(STp->sem); |
SCpnt | 962 | drivers/scsi/st.c | SCpnt->request.rq_status = RQ_SCSI_BUSY; |
SCpnt | 963 | drivers/scsi/st.c | SCpnt->request.rq_dev = STp->devt; |
SCpnt | 968 | drivers/scsi/st.c | scsi_do_cmd (SCpnt, |
SCpnt | 973 | drivers/scsi/st.c | else if (SCpnt != NULL) |
SCpnt | 974 | drivers/scsi/st.c | SCpnt->request.rq_status = RQ_INACTIVE; /* Mark as not busy */ |
SCpnt | 988 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 1062 | drivers/scsi/st.c | SCpnt = st_do_scsi(SCpnt, STp, cmd, bytes, ST_TIMEOUT, MAX_RETRIES); |
SCpnt | 1063 | drivers/scsi/st.c | if (!SCpnt) |
SCpnt | 1074 | drivers/scsi/st.c | SCpnt->sense_buffer[0], SCpnt->sense_buffer[1], |
SCpnt | 1075 | drivers/scsi/st.c | SCpnt->sense_buffer[2], SCpnt->sense_buffer[3], |
SCpnt | 1076 | drivers/scsi/st.c | SCpnt->sense_buffer[4], SCpnt->sense_buffer[5], |
SCpnt | 1077 | drivers/scsi/st.c | SCpnt->sense_buffer[6], SCpnt->sense_buffer[7]); |
SCpnt | 1079 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70) { /* extended sense */ |
SCpnt | 1081 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[2] & 0xe0) != 0) { /* EOF, EOM, or ILI */ |
SCpnt | 1083 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x80) != 0) |
SCpnt | 1084 | drivers/scsi/st.c | transfer = (SCpnt->sense_buffer[3] << 24) | |
SCpnt | 1085 | drivers/scsi/st.c | (SCpnt->sense_buffer[4] << 16) | |
SCpnt | 1086 | drivers/scsi/st.c | (SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6]; |
SCpnt | 1090 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == MEDIUM_ERROR) |
SCpnt | 1093 | drivers/scsi/st.c | if (SCpnt->sense_buffer[2] & 0x20) { |
SCpnt | 1101 | drivers/scsi/st.c | SCpnt->request.rq_status = RQ_INACTIVE; /* Mark as not busy */ |
SCpnt | 1105 | drivers/scsi/st.c | else if (SCpnt->sense_buffer[2] & 0x40) { |
SCpnt | 1118 | drivers/scsi/st.c | else if (SCpnt->sense_buffer[2] & 0x80) { |
SCpnt | 1138 | drivers/scsi/st.c | SCpnt->request.rq_status = RQ_INACTIVE; |
SCpnt | 1143 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == BLANK_CHECK) { |
SCpnt | 1158 | drivers/scsi/st.c | SCpnt->request.rq_status = RQ_INACTIVE; /* Mark as not busy */ |
SCpnt | 1193 | drivers/scsi/st.c | if (SCpnt != NULL) |
SCpnt | 1194 | drivers/scsi/st.c | SCpnt->request.rq_status = RQ_INACTIVE; /* Mark as not busy */ |
SCpnt | 1213 | drivers/scsi/st.c | if (SCpnt != NULL) |
SCpnt | 1214 | drivers/scsi/st.c | SCpnt->request.rq_status = RQ_INACTIVE; /* Mark as not busy */ |
SCpnt | 1276 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt; |
SCpnt | 1619 | drivers/scsi/st.c | SCpnt = st_do_scsi(NULL, STp, cmd, datalen, timeout, MAX_RETRIES); |
SCpnt | 1620 | drivers/scsi/st.c | if (!SCpnt) |
SCpnt | 1625 | drivers/scsi/st.c | SCpnt->request.rq_status = RQ_INACTIVE; /* Mark as not busy */ |
SCpnt | 1669 | drivers/scsi/st.c | if (SCpnt->sense_buffer[2] & 0x40) { |
SCpnt | 1677 | drivers/scsi/st.c | (SCpnt->sense_buffer[3] << 24) + |
SCpnt | 1678 | drivers/scsi/st.c | (SCpnt->sense_buffer[4] << 16) + |
SCpnt | 1679 | drivers/scsi/st.c | (SCpnt->sense_buffer[5] << 8) + |
SCpnt | 1680 | drivers/scsi/st.c | SCpnt->sense_buffer[6] ); |
SCpnt | 1693 | drivers/scsi/st.c | if (SCpnt->sense_buffer[2] & 0x80) { /* Hit filemark */ |
SCpnt | 1705 | drivers/scsi/st.c | if (SCpnt->sense_buffer[2] & 0x80) { /* Hit filemark */ |
SCpnt | 1721 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == BLANK_CHECK) |
SCpnt | 1741 | drivers/scsi/st.c | Scsi_Cmnd *SCpnt; |
SCpnt | 1899 | drivers/scsi/st.c | SCpnt = st_do_scsi(NULL, STp, scmd, 20, ST_TIMEOUT, MAX_READY_RETRIES); |
SCpnt | 1900 | drivers/scsi/st.c | if (!SCpnt) |
SCpnt | 1925 | drivers/scsi/st.c | SCpnt->request.rq_status = RQ_INACTIVE; /* Mark as not busy */ |
SCpnt | 59 | drivers/scsi/st.h | Scsi_Cmnd SCpnt; |
SCpnt | 253 | drivers/scsi/u14-34f.c | Scsi_Cmnd *SCpnt; |
SCpnt | 549 | drivers/scsi/u14-34f.c | static inline void build_sg_list(struct mscp *cpp, Scsi_Cmnd *SCpnt) { |
SCpnt | 553 | drivers/scsi/u14-34f.c | sgpnt = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 555 | drivers/scsi/u14-34f.c | for (k = 0; k < SCpnt->use_sg; k++) { |
SCpnt | 561 | drivers/scsi/u14-34f.c | cpp->use_sg = SCpnt->use_sg; |
SCpnt | 566 | drivers/scsi/u14-34f.c | int u14_34f_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) { |
SCpnt | 573 | drivers/scsi/u14-34f.c | j = ((struct hostdata *) SCpnt->host->hostdata)->board_number; |
SCpnt | 575 | drivers/scsi/u14-34f.c | if (!done) panic("%s: qcomm, pid %ld, null done.\n", BN(j), SCpnt->pid); |
SCpnt | 596 | drivers/scsi/u14-34f.c | else if (u14_34f_reset(SCpnt) == SCSI_RESET_SUCCESS) |
SCpnt | 599 | drivers/scsi/u14-34f.c | SCpnt->result = DID_BUS_BUSY << 16; |
SCpnt | 600 | drivers/scsi/u14-34f.c | SCpnt->host_scribble = NULL; |
SCpnt | 601 | drivers/scsi/u14-34f.c | printk("%s: qcomm, pid %ld, DID_BUS_BUSY, done.\n", BN(j), SCpnt->pid); |
SCpnt | 603 | drivers/scsi/u14-34f.c | done(SCpnt); |
SCpnt | 611 | drivers/scsi/u14-34f.c | SCpnt->scsi_done = done; |
SCpnt | 613 | drivers/scsi/u14-34f.c | SCpnt->host_scribble = (unsigned char *) &cpp->index; |
SCpnt | 616 | drivers/scsi/u14-34f.c | BN(j), i, SCpnt->target, SCpnt->pid); |
SCpnt | 620 | drivers/scsi/u14-34f.c | cpp->target = SCpnt->target; |
SCpnt | 621 | drivers/scsi/u14-34f.c | cpp->lun = SCpnt->lun; |
SCpnt | 622 | drivers/scsi/u14-34f.c | cpp->SCpnt = SCpnt; |
SCpnt | 623 | drivers/scsi/u14-34f.c | cpp->sense_addr = (unsigned int) SCpnt->sense_buffer; |
SCpnt | 624 | drivers/scsi/u14-34f.c | cpp->sense_len = sizeof SCpnt->sense_buffer; |
SCpnt | 626 | drivers/scsi/u14-34f.c | if (SCpnt->use_sg) { |
SCpnt | 628 | drivers/scsi/u14-34f.c | build_sg_list(cpp, SCpnt); |
SCpnt | 631 | drivers/scsi/u14-34f.c | cpp->data_address = (unsigned int)SCpnt->request_buffer; |
SCpnt | 632 | drivers/scsi/u14-34f.c | cpp->data_len = SCpnt->request_bufflen; |
SCpnt | 635 | drivers/scsi/u14-34f.c | cpp->scsi_cdbs_len = SCpnt->cmd_len; |
SCpnt | 636 | drivers/scsi/u14-34f.c | memcpy(cpp->scsi_cdbs, SCpnt->cmnd, cpp->scsi_cdbs_len); |
SCpnt | 639 | drivers/scsi/u14-34f.c | SCpnt->result = DID_ERROR << 16; |
SCpnt | 640 | drivers/scsi/u14-34f.c | SCpnt->host_scribble = NULL; |
SCpnt | 642 | drivers/scsi/u14-34f.c | BN(j), SCpnt->target, SCpnt->pid); |
SCpnt | 644 | drivers/scsi/u14-34f.c | done(SCpnt); |
SCpnt | 695 | drivers/scsi/u14-34f.c | if (SCarg != HD(j)->cp[i].SCpnt) |
SCpnt | 697 | drivers/scsi/u14-34f.c | BN(j), i, SCarg, HD(j)->cp[i].SCpnt); |
SCpnt | 721 | drivers/scsi/u14-34f.c | Scsi_Cmnd *SCpnt; |
SCpnt | 758 | drivers/scsi/u14-34f.c | SCpnt = HD(j)->cp[i].SCpnt; |
SCpnt | 761 | drivers/scsi/u14-34f.c | BN(j), i, SCpnt->pid); |
SCpnt | 763 | drivers/scsi/u14-34f.c | if (SCpnt == NULL) |
SCpnt | 766 | drivers/scsi/u14-34f.c | if (SCpnt->host_scribble == NULL) |
SCpnt | 769 | drivers/scsi/u14-34f.c | if (*(unsigned int *)SCpnt->host_scribble != i) |
SCpnt | 772 | drivers/scsi/u14-34f.c | if (SCpnt->scsi_done == NULL) |
SCpnt | 775 | drivers/scsi/u14-34f.c | if (SCpnt == SCarg) arg_done = TRUE; |
SCpnt | 803 | drivers/scsi/u14-34f.c | SCpnt = HD(j)->cp[i].SCpnt; |
SCpnt | 804 | drivers/scsi/u14-34f.c | SCpnt->result = DID_RESET << 16; |
SCpnt | 805 | drivers/scsi/u14-34f.c | SCpnt->host_scribble = NULL; |
SCpnt | 811 | drivers/scsi/u14-34f.c | BN(j), i, SCpnt->pid); |
SCpnt | 813 | drivers/scsi/u14-34f.c | SCpnt->scsi_done(SCpnt); |
SCpnt | 842 | drivers/scsi/u14-34f.c | Scsi_Cmnd *SCpnt; |
SCpnt | 904 | drivers/scsi/u14-34f.c | SCpnt = spp->SCpnt; |
SCpnt | 906 | drivers/scsi/u14-34f.c | if (SCpnt == NULL) |
SCpnt | 909 | drivers/scsi/u14-34f.c | if (SCpnt->host_scribble == NULL) |
SCpnt | 911 | drivers/scsi/u14-34f.c | BN(j), i, SCpnt->pid, SCpnt); |
SCpnt | 913 | drivers/scsi/u14-34f.c | if (*(unsigned int *)SCpnt->host_scribble != i) |
SCpnt | 915 | drivers/scsi/u14-34f.c | " irq %d.\n", BN(j), i, SCpnt->pid, |
SCpnt | 916 | drivers/scsi/u14-34f.c | *(unsigned int *)SCpnt->host_scribble, irq); |
SCpnt | 924 | drivers/scsi/u14-34f.c | if (tstatus == BUSY && SCpnt->device->type != TYPE_TAPE) |
SCpnt | 929 | drivers/scsi/u14-34f.c | && SCpnt->device->type == TYPE_DISK |
SCpnt | 930 | drivers/scsi/u14-34f.c | && HD(j)->target_reset[SCpnt->target]) |
SCpnt | 935 | drivers/scsi/u14-34f.c | && SCpnt->device->type == TYPE_DISK |
SCpnt | 936 | drivers/scsi/u14-34f.c | && (SCpnt->sense_buffer[2] & 0xf) == RECOVERED_ERROR) |
SCpnt | 943 | drivers/scsi/u14-34f.c | HD(j)->target_reset[SCpnt->target] = FALSE; |
SCpnt | 945 | drivers/scsi/u14-34f.c | if (spp->target_status && SCpnt->device->type == TYPE_DISK) |
SCpnt | 948 | drivers/scsi/u14-34f.c | SCpnt->target, SCpnt->lun, SCpnt->pid, |
SCpnt | 949 | drivers/scsi/u14-34f.c | spp->target_status, SCpnt->sense_buffer[2]); |
SCpnt | 951 | drivers/scsi/u14-34f.c | HD(j)->target_time_out[SCpnt->target] = 0; |
SCpnt | 956 | drivers/scsi/u14-34f.c | if (HD(j)->target_time_out[SCpnt->target] > 1) |
SCpnt | 960 | drivers/scsi/u14-34f.c | HD(j)->target_time_out[SCpnt->target]++; |
SCpnt | 970 | drivers/scsi/u14-34f.c | if (SCpnt->device->type != TYPE_TAPE) |
SCpnt | 991 | drivers/scsi/u14-34f.c | SCpnt->result = status | spp->target_status; |
SCpnt | 997 | drivers/scsi/u14-34f.c | if (SCpnt->result || do_trace) |
SCpnt | 1007 | drivers/scsi/u14-34f.c | SCpnt->target, SCpnt->lun, SCpnt->pid, HD(j)->iocount); |
SCpnt | 1010 | drivers/scsi/u14-34f.c | SCpnt->host_scribble = NULL; |
SCpnt | 1013 | drivers/scsi/u14-34f.c | SCpnt->scsi_done(SCpnt); |
SCpnt | 297 | drivers/scsi/ultrastor.c | static inline void build_sg_list(struct mscp *, Scsi_Cmnd *SCpnt); |
SCpnt | 656 | drivers/scsi/ultrastor.c | static inline void build_sg_list(register struct mscp *mscp, Scsi_Cmnd *SCpnt) |
SCpnt | 662 | drivers/scsi/ultrastor.c | sl = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 663 | drivers/scsi/ultrastor.c | max = SCpnt->use_sg; |
SCpnt | 677 | drivers/scsi/ultrastor.c | int ultrastor_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 715 | drivers/scsi/ultrastor.c | my_mscp->ca = SCpnt->device->type != TYPE_TAPE; |
SCpnt | 716 | drivers/scsi/ultrastor.c | my_mscp->target_id = SCpnt->target; |
SCpnt | 718 | drivers/scsi/ultrastor.c | my_mscp->lun = SCpnt->lun; |
SCpnt | 719 | drivers/scsi/ultrastor.c | if (SCpnt->use_sg) { |
SCpnt | 722 | drivers/scsi/ultrastor.c | build_sg_list(my_mscp, SCpnt); |
SCpnt | 726 | drivers/scsi/ultrastor.c | my_mscp->transfer_data = (unsigned int)SCpnt->request_buffer; |
SCpnt | 727 | drivers/scsi/ultrastor.c | my_mscp->transfer_data_length = SCpnt->request_bufflen; |
SCpnt | 731 | drivers/scsi/ultrastor.c | my_mscp->length_of_sense_byte = sizeof SCpnt->sense_buffer; |
SCpnt | 732 | drivers/scsi/ultrastor.c | my_mscp->length_of_scsi_cdbs = SCpnt->cmd_len; |
SCpnt | 733 | drivers/scsi/ultrastor.c | memcpy(my_mscp->scsi_cdbs, SCpnt->cmnd, my_mscp->length_of_scsi_cdbs); |
SCpnt | 736 | drivers/scsi/ultrastor.c | my_mscp->sense_data = (unsigned int)&SCpnt->sense_buffer; |
SCpnt | 738 | drivers/scsi/ultrastor.c | my_mscp->SCint = SCpnt; |
SCpnt | 739 | drivers/scsi/ultrastor.c | SCpnt->host_scribble = (unsigned char *)my_mscp; |
SCpnt | 785 | drivers/scsi/ultrastor.c | SCpnt->result = status; |
SCpnt | 786 | drivers/scsi/ultrastor.c | done(SCpnt); |
SCpnt | 829 | drivers/scsi/ultrastor.c | int ultrastor_abort(Scsi_Cmnd *SCpnt) |
SCpnt | 844 | drivers/scsi/ultrastor.c | if(!SCpnt->host_scribble) |
SCpnt | 847 | drivers/scsi/ultrastor.c | mscp_index = ((struct mscp *)SCpnt->host_scribble) - config.mscp; |
SCpnt | 935 | drivers/scsi/ultrastor.c | if (config.mscp[mscp_index].SCint != SCpnt) |
SCpnt | 937 | drivers/scsi/ultrastor.c | config.mscp[mscp_index].SCint, SCpnt); |
SCpnt | 942 | drivers/scsi/ultrastor.c | if (config.mscp[mscp_index].SCint != SCpnt) panic("Bad abort"); |
SCpnt | 946 | drivers/scsi/ultrastor.c | SCpnt->result = DID_ABORT << 16; |
SCpnt | 948 | drivers/scsi/ultrastor.c | done(SCpnt); |
SCpnt | 954 | drivers/scsi/ultrastor.c | int ultrastor_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 351 | drivers/scsi/wd7000.c | Scsi_Cmnd *SCpnt; /* Scsi_Cmnd using this SCB */ |
SCpnt | 682 | drivers/scsi/wd7000.c | scbs[i].next = &(scbs[i+1]); scbs[i].SCpnt = NULL; |
SCpnt | 685 | drivers/scsi/wd7000.c | scbs[MAX_SCBS-1].SCpnt = NULL; |
SCpnt | 800 | drivers/scsi/wd7000.c | static void wd7000_scsi_done(Scsi_Cmnd * SCpnt) |
SCpnt | 803 | drivers/scsi/wd7000.c | printk("wd7000_scsi_done: %06x\n",(unsigned int) SCpnt); |
SCpnt | 805 | drivers/scsi/wd7000.c | SCpnt->SCp.phase = 0; |
SCpnt | 817 | drivers/scsi/wd7000.c | register Scsi_Cmnd *SCpnt; |
SCpnt | 874 | drivers/scsi/wd7000.c | SCpnt = scb->SCpnt; |
SCpnt | 875 | drivers/scsi/wd7000.c | if (--(SCpnt->SCp.phase) <= 0) { /* all scbs are done */ |
SCpnt | 879 | drivers/scsi/wd7000.c | SCpnt->result = errstatus; |
SCpnt | 883 | drivers/scsi/wd7000.c | SCpnt->scsi_done(SCpnt); |
SCpnt | 898 | drivers/scsi/wd7000.c | int wd7000_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 902 | drivers/scsi/wd7000.c | register unchar *cdb = (unchar *) SCpnt->cmnd; |
SCpnt | 905 | drivers/scsi/wd7000.c | Adapter *host = (Adapter *) SCpnt->host->hostdata; |
SCpnt | 907 | drivers/scsi/wd7000.c | cdblen = SCpnt->cmd_len; |
SCpnt | 908 | drivers/scsi/wd7000.c | idlun = ((SCpnt->target << 5) & 0xe0) | (SCpnt->lun & 7); |
SCpnt | 909 | drivers/scsi/wd7000.c | SCpnt->scsi_done = done; |
SCpnt | 910 | drivers/scsi/wd7000.c | SCpnt->SCp.phase = 1; |
SCpnt | 916 | drivers/scsi/wd7000.c | scb->SCpnt = SCpnt; /* so we can find stuff later */ |
SCpnt | 917 | drivers/scsi/wd7000.c | SCpnt->host_scribble = (unchar *) scb; |
SCpnt | 920 | drivers/scsi/wd7000.c | if (SCpnt->use_sg) { |
SCpnt | 921 | drivers/scsi/wd7000.c | struct scatterlist *sg = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 924 | drivers/scsi/wd7000.c | if (SCpnt->host->sg_tablesize == SG_NONE) { |
SCpnt | 928 | drivers/scsi/wd7000.c | printk("Using scatter/gather with %d elements.\n",SCpnt->use_sg); |
SCpnt | 934 | drivers/scsi/wd7000.c | any2scsi(scb->maxlen, SCpnt->use_sg * sizeof (Sgb) ); |
SCpnt | 936 | drivers/scsi/wd7000.c | for (i = 0; i < SCpnt->use_sg; i++) { |
SCpnt | 942 | drivers/scsi/wd7000.c | any2scsi(scb->dataptr, (int) SCpnt->request_buffer); |
SCpnt | 943 | drivers/scsi/wd7000.c | any2scsi(scb->maxlen, SCpnt->request_bufflen); |
SCpnt | 951 | drivers/scsi/wd7000.c | int wd7000_command(Scsi_Cmnd *SCpnt) |
SCpnt | 953 | drivers/scsi/wd7000.c | wd7000_queuecommand(SCpnt, wd7000_scsi_done); |
SCpnt | 955 | drivers/scsi/wd7000.c | while (SCpnt->SCp.phase > 0) barrier(); /* phase counts scbs down to 0 */ |
SCpnt | 957 | drivers/scsi/wd7000.c | return SCpnt->result; |
SCpnt | 1194 | drivers/scsi/wd7000.c | int wd7000_abort(Scsi_Cmnd * SCpnt) |
SCpnt | 1196 | drivers/scsi/wd7000.c | Adapter *host = (Adapter *) SCpnt->host->hostdata; |
SCpnt | 1211 | drivers/scsi/wd7000.c | int wd7000_reset(Scsi_Cmnd * SCpnt) |