tag | line | file | source code |
SCpnt | 777 | drivers/scsi/aha152x.c | int aha152x_queue( Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 793 | drivers/scsi/aha152x.c | printk( "SCpnt (target = %d lun = %d cmnd = ", SCpnt->target, SCpnt->lun); |
SCpnt | 794 | drivers/scsi/aha152x.c | print_command(SCpnt->cmnd); |
SCpnt | 796 | drivers/scsi/aha152x.c | SCpnt->cmd_len, SCpnt->use_sg, SCpnt->request_bufflen ); |
SCpnt | 801 | drivers/scsi/aha152x.c | SCpnt->scsi_done = done; |
SCpnt | 809 | drivers/scsi/aha152x.c | SCpnt->SCp.phase = not_issued; |
SCpnt | 810 | drivers/scsi/aha152x.c | if (SCpnt->use_sg) |
SCpnt | 812 | drivers/scsi/aha152x.c | SCpnt->SCp.buffer = (struct scatterlist *)SCpnt->request_buffer; |
SCpnt | 813 | drivers/scsi/aha152x.c | SCpnt->SCp.ptr = SCpnt->SCp.buffer->address; |
SCpnt | 814 | drivers/scsi/aha152x.c | SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length; |
SCpnt | 815 | drivers/scsi/aha152x.c | SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1; |
SCpnt | 819 | drivers/scsi/aha152x.c | SCpnt->SCp.ptr = (char *)SCpnt->request_buffer; |
SCpnt | 820 | drivers/scsi/aha152x.c | SCpnt->SCp.this_residual = SCpnt->request_bufflen; |
SCpnt | 821 | drivers/scsi/aha152x.c | SCpnt->SCp.buffer = NULL; |
SCpnt | 822 | drivers/scsi/aha152x.c | SCpnt->SCp.buffers_residual = 0; |
SCpnt | 825 | drivers/scsi/aha152x.c | SCpnt->SCp.Status = CHECK_CONDITION; |
SCpnt | 826 | drivers/scsi/aha152x.c | SCpnt->SCp.Message = 0; |
SCpnt | 827 | drivers/scsi/aha152x.c | SCpnt->SCp.have_data_in = 0; |
SCpnt | 828 | drivers/scsi/aha152x.c | SCpnt->SCp.sent_command = 0; |
SCpnt | 841 | drivers/scsi/aha152x.c | append_SC( &issue_SC, SCpnt); |
SCpnt | 861 | drivers/scsi/aha152x.c | int aha152x_command( Scsi_Cmnd *SCpnt ) |
SCpnt | 871 | drivers/scsi/aha152x.c | int aha152x_abort( Scsi_Cmnd *SCpnt) |
SCpnt | 882 | drivers/scsi/aha152x.c | printk("aha152x: abort(), SCpnt=0x%08x, ", (unsigned int) SCpnt ); |
SCpnt | 890 | drivers/scsi/aha152x.c | ptr && ptr!=SCpnt; |
SCpnt | 911 | drivers/scsi/aha152x.c | if ( TESTLO(SSTAT1, BUSFREE) || (current_SC && current_SC!=SCpnt)) |
SCpnt | 936 | drivers/scsi/aha152x.c | ptr && ptr!=SCpnt; |
SCpnt | 506 | drivers/scsi/aha1542.c | int aha1542_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 510 | drivers/scsi/aha1542.c | unchar *cmd = (unchar *) SCpnt->cmnd; |
SCpnt | 511 | drivers/scsi/aha1542.c | unchar target = SCpnt->target; |
SCpnt | 512 | drivers/scsi/aha1542.c | unchar lun = SCpnt->lun; |
SCpnt | 514 | drivers/scsi/aha1542.c | void *buff = SCpnt->request_buffer; |
SCpnt | 515 | drivers/scsi/aha1542.c | int bufflen = SCpnt->request_bufflen; |
SCpnt | 522 | drivers/scsi/aha1542.c | mb = HOSTDATA(SCpnt->host)->mb; |
SCpnt | 523 | drivers/scsi/aha1542.c | ccb = HOSTDATA(SCpnt->host)->ccb; |
SCpnt | 526 | drivers/scsi/aha1542.c | SCpnt->result = DID_TIME_OUT << 16; |
SCpnt | 527 | drivers/scsi/aha1542.c | done(SCpnt); return 0;}); |
SCpnt | 531 | drivers/scsi/aha1542.c | if (bufflen != sizeof(SCpnt->sense_buffer)) { |
SCpnt | 535 | drivers/scsi/aha1542.c | SCpnt->result = 0; |
SCpnt | 536 | drivers/scsi/aha1542.c | done(SCpnt); |
SCpnt | 553 | drivers/scsi/aha1542.c | for (i = 0; i < SCpnt->cmd_len; i++) printk("%02x ", cmd[i]); |
SCpnt | 563 | drivers/scsi/aha1542.c | mbo = HOSTDATA(SCpnt->host)->aha1542_last_mbo_used + 1; |
SCpnt | 567 | drivers/scsi/aha1542.c | if(mb[mbo].status == 0 && HOSTDATA(SCpnt->host)->SCint[mbo] == NULL) |
SCpnt | 571 | drivers/scsi/aha1542.c | } while (mbo != HOSTDATA(SCpnt->host)->aha1542_last_mbo_used); |
SCpnt | 573 | drivers/scsi/aha1542.c | if(mb[mbo].status || HOSTDATA(SCpnt->host)->SCint[mbo]) |
SCpnt | 576 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->SCint[mbo] = SCpnt; /* This will effectively prevent someone else from |
SCpnt | 579 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->aha1542_last_mbo_used = mbo; |
SCpnt | 590 | drivers/scsi/aha1542.c | ccb[mbo].cdblen = SCpnt->cmd_len; |
SCpnt | 600 | drivers/scsi/aha1542.c | if (SCpnt->use_sg) { |
SCpnt | 608 | drivers/scsi/aha1542.c | SCpnt->host_scribble = (unsigned char *) scsi_malloc(512); |
SCpnt | 609 | drivers/scsi/aha1542.c | sgpnt = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 610 | drivers/scsi/aha1542.c | cptr = (struct chain *) SCpnt->host_scribble; |
SCpnt | 612 | drivers/scsi/aha1542.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 613 | drivers/scsi/aha1542.c | if(sgpnt[i].length == 0 || SCpnt->use_sg > 16 || |
SCpnt | 616 | drivers/scsi/aha1542.c | printk("Bad segment list supplied to aha1542.c (%d, %d)\n",SCpnt->use_sg,i); |
SCpnt | 617 | drivers/scsi/aha1542.c | for(i=0;i<SCpnt->use_sg;i++){ |
SCpnt | 630 | drivers/scsi/aha1542.c | any2scsi(ccb[mbo].datalen, SCpnt->use_sg * sizeof(struct chain)); |
SCpnt | 639 | drivers/scsi/aha1542.c | SCpnt->host_scribble = NULL; |
SCpnt | 659 | drivers/scsi/aha1542.c | SCpnt->scsi_done = done; |
SCpnt | 661 | drivers/scsi/aha1542.c | aha1542_out(SCpnt->host->io_port, &ahacmd, 1); /* start scsi command */ |
SCpnt | 672 | drivers/scsi/aha1542.c | static void internal_done(Scsi_Cmnd * SCpnt) |
SCpnt | 674 | drivers/scsi/aha1542.c | SCpnt->SCp.Status++; |
SCpnt | 677 | drivers/scsi/aha1542.c | int aha1542_command(Scsi_Cmnd * SCpnt) |
SCpnt | 681 | drivers/scsi/aha1542.c | aha1542_queuecommand(SCpnt, internal_done); |
SCpnt | 683 | drivers/scsi/aha1542.c | SCpnt->SCp.Status = 0; |
SCpnt | 684 | drivers/scsi/aha1542.c | while (!SCpnt->SCp.Status); |
SCpnt | 685 | drivers/scsi/aha1542.c | return SCpnt->result; |
SCpnt | 1097 | drivers/scsi/aha1542.c | int aha1542_abort(Scsi_Cmnd * SCpnt) |
SCpnt | 1106 | drivers/scsi/aha1542.c | inb(STATUS(SCpnt->host->io_port)), |
SCpnt | 1107 | drivers/scsi/aha1542.c | inb(INTRFLAGS(SCpnt->host->io_port))); |
SCpnt | 1111 | drivers/scsi/aha1542.c | mb = HOSTDATA(SCpnt->host)->mb; |
SCpnt | 1112 | drivers/scsi/aha1542.c | mbi = HOSTDATA(SCpnt->host)->aha1542_last_mbi_used + 1; |
SCpnt | 1119 | drivers/scsi/aha1542.c | } while (mbi != HOSTDATA(SCpnt->host)->aha1542_last_mbi_used); |
SCpnt | 1124 | drivers/scsi/aha1542.c | SCpnt->host->irq); |
SCpnt | 1125 | drivers/scsi/aha1542.c | aha1542_intr_handle(SCpnt->host->irq, NULL); |
SCpnt | 1133 | drivers/scsi/aha1542.c | if(HOSTDATA(SCpnt->host)->SCint[i]) |
SCpnt | 1135 | drivers/scsi/aha1542.c | if(HOSTDATA(SCpnt->host)->SCint[i] == SCpnt) { |
SCpnt | 1136 | drivers/scsi/aha1542.c | printk("Timed out command pending for %4.4x\n", SCpnt->request.dev); |
SCpnt | 1137 | drivers/scsi/aha1542.c | if (HOSTDATA(SCpnt->host)->mb[i].status) { |
SCpnt | 1139 | drivers/scsi/aha1542.c | aha1542_out(SCpnt->host->io_port, &ahacmd, 1); |
SCpnt | 1142 | drivers/scsi/aha1542.c | printk("Other pending command %4.4x\n", SCpnt->request.dev); |
SCpnt | 1152 | drivers/scsi/aha1542.c | if (SCpnt == HOSTDATA(SCpnt->host)->SCint[mbo]){ |
SCpnt | 1154 | drivers/scsi/aha1542.c | aha1542_out(SCpnt->host->io_port, &ahacmd, 1); /* start scsi command */ |
SCpnt | 1168 | drivers/scsi/aha1542.c | int aha1542_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 1176 | drivers/scsi/aha1542.c | outb(SCRST, CONTROL(SCpnt->host->io_port)); |
SCpnt | 1181 | drivers/scsi/aha1542.c | if(HOSTDATA(SCpnt->host)->SCint[i] == SCpnt) |
SCpnt | 1183 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->ccb[i].op = 0x81; /* BUS DEVICE RESET */ |
SCpnt | 1185 | drivers/scsi/aha1542.c | aha1542_out(SCpnt->host->io_port, &ahacmd, 1); |
SCpnt | 1191 | drivers/scsi/aha1542.c | printk("Sent BUS DEVICE RESET to target %d\n", SCpnt->target); |
SCpnt | 1198 | drivers/scsi/aha1542.c | if(HOSTDATA(SCpnt->host)->SCint[i] && |
SCpnt | 1199 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->SCint[i]->target == SCpnt->target) |
SCpnt | 1202 | drivers/scsi/aha1542.c | SCtmp = HOSTDATA(SCpnt->host)->SCint[i]; |
SCpnt | 1205 | drivers/scsi/aha1542.c | printk("Sending DID_RESET for target %d\n", SCpnt->target); |
SCpnt | 1206 | drivers/scsi/aha1542.c | SCtmp->scsi_done(SCpnt); |
SCpnt | 1208 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->SCint[i] = NULL; |
SCpnt | 1209 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->mb[i].status = 0; |
SCpnt | 199 | drivers/scsi/aha1740.c | SCtmp = ecbptr->SCpnt; |
SCpnt | 245 | drivers/scsi/aha1740.c | int aha1740_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 248 | drivers/scsi/aha1740.c | unchar *cmd = (unchar *) SCpnt->cmnd; |
SCpnt | 249 | drivers/scsi/aha1740.c | unchar target = SCpnt->target; |
SCpnt | 251 | drivers/scsi/aha1740.c | void *buff = SCpnt->request_buffer; |
SCpnt | 252 | drivers/scsi/aha1740.c | int bufflen = SCpnt->request_bufflen; |
SCpnt | 259 | drivers/scsi/aha1740.c | if (bufflen != sizeof(SCpnt->sense_buffer)) |
SCpnt | 263 | drivers/scsi/aha1740.c | SCpnt->result = 0; |
SCpnt | 264 | drivers/scsi/aha1740.c | done(SCpnt); |
SCpnt | 277 | drivers/scsi/aha1740.c | for (i = 0; i < SCpnt->cmd_len; i++) printk("%02x ", cmd[i]); |
SCpnt | 307 | drivers/scsi/aha1740.c | ecb[ecbno].cdblen = SCpnt->cmd_len; /* SCSI Command Descriptor Block Length */ |
SCpnt | 317 | drivers/scsi/aha1740.c | if (SCpnt->use_sg) |
SCpnt | 326 | drivers/scsi/aha1740.c | SCpnt->host_scribble = (unsigned char *) scsi_malloc(512); |
SCpnt | 327 | drivers/scsi/aha1740.c | sgpnt = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 328 | drivers/scsi/aha1740.c | cptr = (struct aha1740_chain *) SCpnt->host_scribble; |
SCpnt | 330 | drivers/scsi/aha1740.c | for(i=0; i<SCpnt->use_sg; i++) |
SCpnt | 335 | drivers/scsi/aha1740.c | ecb[ecbno].datalen = SCpnt->use_sg * sizeof(struct aha1740_chain); |
SCpnt | 345 | drivers/scsi/aha1740.c | SCpnt->host_scribble = NULL; |
SCpnt | 349 | drivers/scsi/aha1740.c | ecb[ecbno].lun = SCpnt->lun; |
SCpnt | 357 | drivers/scsi/aha1740.c | ecb[ecbno].SCpnt = SCpnt; |
SCpnt | 412 | drivers/scsi/aha1740.c | static void internal_done(Scsi_Cmnd * SCpnt) |
SCpnt | 414 | drivers/scsi/aha1740.c | internal_done_errcode = SCpnt->result; |
SCpnt | 418 | drivers/scsi/aha1740.c | int aha1740_command(Scsi_Cmnd * SCpnt) |
SCpnt | 420 | drivers/scsi/aha1740.c | aha1740_queuecommand(SCpnt, internal_done); |
SCpnt | 486 | drivers/scsi/aha1740.c | int aha1740_abort(Scsi_Cmnd * SCpnt) |
SCpnt | 496 | drivers/scsi/aha1740.c | int aha1740_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 142 | drivers/scsi/aha1740.h | Scsi_Cmnd *SCpnt; /* Link to the SCSI Command Block */ |
SCpnt | 364 | drivers/scsi/constants.c | void print_sense(char * devclass, Scsi_Cmnd * SCpnt) |
SCpnt | 368 | drivers/scsi/constants.c | unsigned char * sense_buffer = SCpnt->sense_buffer; |
SCpnt | 370 | drivers/scsi/constants.c | int dev = SCpnt->request.dev; |
SCpnt | 378 | drivers/scsi/constants.c | if(s > sizeof(SCpnt->sense_buffer)) s = sizeof(SCpnt->sense_buffer); |
SCpnt | 251 | drivers/scsi/eata.c | Scsi_Cmnd *SCpnt; /* Address set in cp */ |
SCpnt | 278 | drivers/scsi/eata.c | Scsi_Cmnd *SCpnt; /* Address to be returned is sp */ |
SCpnt | 578 | drivers/scsi/eata.c | static inline void build_sg_list(struct mscp *cpp, Scsi_Cmnd *SCpnt) { |
SCpnt | 582 | drivers/scsi/eata.c | sgpnt = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 584 | drivers/scsi/eata.c | for (k = 0; k < SCpnt->use_sg; k++) { |
SCpnt | 590 | drivers/scsi/eata.c | cpp->data_len = htonl((SCpnt->use_sg * sizeof(struct sg_list))); |
SCpnt | 593 | drivers/scsi/eata.c | int eata2x_queuecommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) { |
SCpnt | 607 | drivers/scsi/eata.c | j = ((struct hostdata *) SCpnt->host->hostdata)->board_number; |
SCpnt | 609 | drivers/scsi/eata.c | if (!done) panic("%s: qcomm, pid %ld, null done.\n", BN(j), SCpnt->pid); |
SCpnt | 630 | drivers/scsi/eata.c | else if (eata2x_reset(SCpnt) == SCSI_RESET_SUCCESS) |
SCpnt | 633 | drivers/scsi/eata.c | SCpnt->result = DID_BUS_BUSY << 16; |
SCpnt | 634 | drivers/scsi/eata.c | SCpnt->host_scribble = NULL; |
SCpnt | 635 | drivers/scsi/eata.c | printk("%s: qcomm, pid %ld, DID_BUS_BUSY, done.\n", BN(j), SCpnt->pid); |
SCpnt | 637 | drivers/scsi/eata.c | done(SCpnt); |
SCpnt | 654 | drivers/scsi/eata.c | SCpnt->scsi_done = done; |
SCpnt | 656 | drivers/scsi/eata.c | SCpnt->host_scribble = (unsigned char *) &cpp->index; |
SCpnt | 659 | drivers/scsi/eata.c | BN(j), i, SCpnt->target, SCpnt->pid); |
SCpnt | 662 | drivers/scsi/eata.c | if (SCpnt->cmnd[0] == data_out_cmds[k]) { |
SCpnt | 671 | drivers/scsi/eata.c | cpp->target = SCpnt->target; |
SCpnt | 672 | drivers/scsi/eata.c | cpp->lun = SCpnt->lun; |
SCpnt | 673 | drivers/scsi/eata.c | cpp->SCpnt = SCpnt; |
SCpnt | 674 | drivers/scsi/eata.c | cpp->sense_addr = htonl((unsigned int) SCpnt->sense_buffer); |
SCpnt | 675 | drivers/scsi/eata.c | cpp->sense_len = sizeof SCpnt->sense_buffer; |
SCpnt | 677 | drivers/scsi/eata.c | if (SCpnt->use_sg) { |
SCpnt | 679 | drivers/scsi/eata.c | build_sg_list(cpp, SCpnt); |
SCpnt | 682 | drivers/scsi/eata.c | cpp->data_address = htonl((unsigned int) SCpnt->request_buffer); |
SCpnt | 683 | drivers/scsi/eata.c | cpp->data_len = htonl(SCpnt->request_bufflen); |
SCpnt | 686 | drivers/scsi/eata.c | memcpy(cpp->cdb, SCpnt->cmnd, SCpnt->cmd_len); |
SCpnt | 690 | drivers/scsi/eata.c | SCpnt->result = DID_ERROR << 16; |
SCpnt | 691 | drivers/scsi/eata.c | SCpnt->host_scribble = NULL; |
SCpnt | 693 | drivers/scsi/eata.c | BN(j), SCpnt->target, SCpnt->pid); |
SCpnt | 695 | drivers/scsi/eata.c | done(SCpnt); |
SCpnt | 739 | drivers/scsi/eata.c | if (SCarg != HD(j)->cp[i].SCpnt) |
SCpnt | 741 | drivers/scsi/eata.c | BN(j), i, SCarg, HD(j)->cp[i].SCpnt); |
SCpnt | 765 | drivers/scsi/eata.c | Scsi_Cmnd *SCpnt; |
SCpnt | 802 | drivers/scsi/eata.c | SCpnt = HD(j)->cp[i].SCpnt; |
SCpnt | 805 | drivers/scsi/eata.c | BN(j), i, SCpnt->pid); |
SCpnt | 807 | drivers/scsi/eata.c | if (SCpnt == NULL) |
SCpnt | 810 | drivers/scsi/eata.c | if (SCpnt->host_scribble == NULL) |
SCpnt | 813 | drivers/scsi/eata.c | if (*(unsigned int *)SCpnt->host_scribble != i) |
SCpnt | 816 | drivers/scsi/eata.c | if (SCpnt->scsi_done == NULL) |
SCpnt | 819 | drivers/scsi/eata.c | if (SCpnt == SCarg) arg_done = TRUE; |
SCpnt | 846 | drivers/scsi/eata.c | SCpnt = HD(j)->cp[i].SCpnt; |
SCpnt | 847 | drivers/scsi/eata.c | SCpnt->result = DID_RESET << 16; |
SCpnt | 848 | drivers/scsi/eata.c | SCpnt->host_scribble = NULL; |
SCpnt | 854 | drivers/scsi/eata.c | BN(j), i, SCpnt->pid); |
SCpnt | 856 | drivers/scsi/eata.c | SCpnt->scsi_done(SCpnt); |
SCpnt | 875 | drivers/scsi/eata.c | Scsi_Cmnd *SCpnt; |
SCpnt | 941 | drivers/scsi/eata.c | SCpnt = spp->SCpnt; |
SCpnt | 943 | drivers/scsi/eata.c | if (SCpnt == NULL) |
SCpnt | 946 | drivers/scsi/eata.c | if (SCpnt != cpp->SCpnt) |
SCpnt | 948 | drivers/scsi/eata.c | BN(j), i, SCpnt, cpp->SCpnt); |
SCpnt | 950 | drivers/scsi/eata.c | if (SCpnt->host_scribble == NULL) |
SCpnt | 952 | drivers/scsi/eata.c | BN(j), i, SCpnt->pid, SCpnt); |
SCpnt | 954 | drivers/scsi/eata.c | if (*(unsigned int *)SCpnt->host_scribble != i) |
SCpnt | 956 | drivers/scsi/eata.c | " irq %d.\n", BN(j), i, SCpnt->pid, |
SCpnt | 957 | drivers/scsi/eata.c | *(unsigned int *)SCpnt->host_scribble, irq); |
SCpnt | 965 | drivers/scsi/eata.c | if (tstatus == BUSY && SCpnt->device->type != TYPE_TAPE) |
SCpnt | 970 | drivers/scsi/eata.c | && SCpnt->device->type == TYPE_DISK |
SCpnt | 971 | drivers/scsi/eata.c | && HD(j)->target_reset[SCpnt->target]) |
SCpnt | 976 | drivers/scsi/eata.c | && SCpnt->device->type == TYPE_DISK |
SCpnt | 977 | drivers/scsi/eata.c | && (SCpnt->sense_buffer[2] & 0xf) == RECOVERED_ERROR) |
SCpnt | 984 | drivers/scsi/eata.c | HD(j)->target_reset[SCpnt->target] = FALSE; |
SCpnt | 986 | drivers/scsi/eata.c | if (spp->target_status && SCpnt->device->type == TYPE_DISK) |
SCpnt | 989 | drivers/scsi/eata.c | SCpnt->target, SCpnt->lun, SCpnt->pid, |
SCpnt | 990 | drivers/scsi/eata.c | spp->target_status, SCpnt->sense_buffer[2]); |
SCpnt | 992 | drivers/scsi/eata.c | HD(j)->target_time_out[SCpnt->target] = 0; |
SCpnt | 998 | drivers/scsi/eata.c | if (HD(j)->target_time_out[SCpnt->target] > 1) |
SCpnt | 1002 | drivers/scsi/eata.c | HD(j)->target_time_out[SCpnt->target]++; |
SCpnt | 1009 | drivers/scsi/eata.c | if (SCpnt->device->type != TYPE_TAPE) |
SCpnt | 1031 | drivers/scsi/eata.c | SCpnt->result = status | spp->target_status; |
SCpnt | 1037 | drivers/scsi/eata.c | if (SCpnt->result || do_trace) |
SCpnt | 1047 | drivers/scsi/eata.c | SCpnt->target, SCpnt->lun, SCpnt->pid, HD(j)->iocount); |
SCpnt | 1050 | drivers/scsi/eata.c | SCpnt->host_scribble = NULL; |
SCpnt | 1053 | drivers/scsi/eata.c | SCpnt->scsi_done(SCpnt); |
SCpnt | 104 | drivers/scsi/eata_dma.c | void eata_scsi_done (Scsi_Cmnd * SCpnt) |
SCpnt | 1333 | drivers/scsi/fdomain.c | int fdomain_16x0_queue( Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 1340 | drivers/scsi/fdomain.c | SCpnt->target, |
SCpnt | 1341 | drivers/scsi/fdomain.c | *(unsigned char *)SCpnt->cmnd, |
SCpnt | 1342 | drivers/scsi/fdomain.c | SCpnt->use_sg, |
SCpnt | 1343 | drivers/scsi/fdomain.c | SCpnt->request_bufflen ); |
SCpnt | 1348 | drivers/scsi/fdomain.c | current_SC = SCpnt; /* Save this for the done function */ |
SCpnt | 1391 | drivers/scsi/fdomain.c | static void internal_done( Scsi_Cmnd *SCpnt ) |
SCpnt | 1393 | drivers/scsi/fdomain.c | internal_done_errcode = SCpnt->result; |
SCpnt | 1397 | drivers/scsi/fdomain.c | int fdomain_16x0_command( Scsi_Cmnd *SCpnt ) |
SCpnt | 1399 | drivers/scsi/fdomain.c | fdomain_16x0_queue( SCpnt, internal_done ); |
SCpnt | 1409 | drivers/scsi/fdomain.c | void print_info( Scsi_Cmnd *SCpnt ) |
SCpnt | 1415 | drivers/scsi/fdomain.c | if (!SCpnt || !SCpnt->host) { |
SCpnt | 1419 | drivers/scsi/fdomain.c | printk( "%s\n", fdomain_16x0_info( SCpnt->host ) ); |
SCpnt | 1420 | drivers/scsi/fdomain.c | print_banner( SCpnt->host ); |
SCpnt | 1421 | drivers/scsi/fdomain.c | switch (SCpnt->SCp.phase) { |
SCpnt | 1429 | drivers/scsi/fdomain.c | SCpnt->SCp.phase, |
SCpnt | 1430 | drivers/scsi/fdomain.c | SCpnt->target, |
SCpnt | 1431 | drivers/scsi/fdomain.c | *(unsigned char *)SCpnt->cmnd, |
SCpnt | 1432 | drivers/scsi/fdomain.c | SCpnt->use_sg, |
SCpnt | 1433 | drivers/scsi/fdomain.c | SCpnt->request_bufflen ); |
SCpnt | 1435 | drivers/scsi/fdomain.c | SCpnt->SCp.sent_command, |
SCpnt | 1436 | drivers/scsi/fdomain.c | SCpnt->SCp.have_data_in, |
SCpnt | 1437 | drivers/scsi/fdomain.c | SCpnt->timeout ); |
SCpnt | 1478 | drivers/scsi/fdomain.c | int fdomain_16x0_abort( Scsi_Cmnd *SCpnt) |
SCpnt | 1496 | drivers/scsi/fdomain.c | print_info( SCpnt ); |
SCpnt | 1513 | drivers/scsi/fdomain.c | int fdomain_16x0_reset( Scsi_Cmnd *SCpnt ) |
SCpnt | 1520 | drivers/scsi/fdomain.c | if (SCpnt) printk( "fdomain: SCSI Bus Reset\n" ); |
SCpnt | 409 | drivers/scsi/in2000.c | int in2000_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 412 | drivers/scsi/in2000.c | unchar *cmd = (unchar *) SCpnt->cmnd; |
SCpnt | 413 | drivers/scsi/in2000.c | unchar target = SCpnt->target; |
SCpnt | 414 | drivers/scsi/in2000.c | void *buff = SCpnt->request_buffer; |
SCpnt | 416 | drivers/scsi/in2000.c | int bufflen = SCpnt->request_bufflen; |
SCpnt | 443 | drivers/scsi/in2000.c | for (i = 0; i < SCpnt->cmd_len; i++) printk("%02x ", cmd[i]); |
SCpnt | 449 | drivers/scsi/in2000.c | size = SCpnt->cmd_len; /* CDB length */ |
SCpnt | 487 | drivers/scsi/in2000.c | SCpnt->result = DID_TIME_OUT << 16; |
SCpnt | 488 | drivers/scsi/in2000.c | (*done)(SCpnt); |
SCpnt | 492 | drivers/scsi/in2000.c | in2000_nsegment = SCpnt->use_sg; |
SCpnt | 494 | drivers/scsi/in2000.c | if(SCpnt->use_sg){ |
SCpnt | 504 | drivers/scsi/in2000.c | in2000_SCptr = SCpnt; |
SCpnt | 512 | drivers/scsi/in2000.c | outb(SCpnt->lun & 7,INDATA); |
SCpnt | 513 | drivers/scsi/in2000.c | SCpnt->host_scribble = NULL; |
SCpnt | 557 | drivers/scsi/in2000.c | static void internal_done(Scsi_Cmnd * SCpnt) |
SCpnt | 559 | drivers/scsi/in2000.c | internal_done_errcode = SCpnt->result; |
SCpnt | 563 | drivers/scsi/in2000.c | int in2000_command(Scsi_Cmnd * SCpnt) |
SCpnt | 565 | drivers/scsi/in2000.c | in2000_queuecommand(SCpnt, internal_done); |
SCpnt | 644 | drivers/scsi/in2000.c | int in2000_abort(Scsi_Cmnd * SCpnt) |
SCpnt | 661 | drivers/scsi/in2000.c | int in2000_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 678 | drivers/scsi/in2000.c | if(SCpnt) SCpnt->flags |= NEEDS_JUMPSTART; |
SCpnt | 46 | drivers/scsi/scsi.c | static void scsi_done (Scsi_Cmnd *SCpnt); |
SCpnt | 49 | drivers/scsi/scsi.c | static void scsi_times_out (Scsi_Cmnd * SCpnt, int pid); |
SCpnt | 270 | drivers/scsi/scsi.c | static void scan_scsis_done (Scsi_Cmnd * SCpnt) |
SCpnt | 274 | drivers/scsi/scsi.c | printk ("scan_scsis_done(%d, %06x)\n", SCpnt->host, SCpnt->result); |
SCpnt | 276 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xfffe; |
SCpnt | 278 | drivers/scsi/scsi.c | if (SCpnt->request.sem != NULL) |
SCpnt | 279 | drivers/scsi/scsi.c | up(SCpnt->request.sem); |
SCpnt | 311 | drivers/scsi/scsi.c | Scsi_Cmnd *SCpnt; |
SCpnt | 316 | drivers/scsi/scsi.c | SCpnt = (Scsi_Cmnd *) scsi_init_malloc(sizeof(Scsi_Cmnd), GFP_ATOMIC|GFP_DMA); |
SCpnt | 327 | drivers/scsi/scsi.c | shpnt->host_queue = SCpnt; /* We need this so that commands can time out */ |
SCpnt | 354 | drivers/scsi/scsi.c | memset(SCpnt, 0, sizeof(Scsi_Cmnd)); |
SCpnt | 355 | drivers/scsi/scsi.c | SCpnt->host = SDpnt->host; |
SCpnt | 356 | drivers/scsi/scsi.c | SCpnt->device = SDpnt; |
SCpnt | 357 | drivers/scsi/scsi.c | SCpnt->target = SDpnt->id; |
SCpnt | 358 | drivers/scsi/scsi.c | SCpnt->lun = SDpnt->lun; |
SCpnt | 361 | drivers/scsi/scsi.c | SCpnt->request.sem = NULL; |
SCpnt | 363 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xffff; /* Mark not busy */ |
SCpnt | 365 | drivers/scsi/scsi.c | scsi_do_cmd (SCpnt, (void *) scsi_cmd, (void *) scsi_result, |
SCpnt | 372 | drivers/scsi/scsi.c | while (SCpnt->request.dev != 0xfffe); |
SCpnt | 373 | drivers/scsi/scsi.c | else if (SCpnt->request.dev != 0xfffe) { |
SCpnt | 376 | drivers/scsi/scsi.c | SCpnt->request.sem = &sem; |
SCpnt | 380 | drivers/scsi/scsi.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 385 | drivers/scsi/scsi.c | printk("scsi: return code %08x\n", SCpnt->result); |
SCpnt | 389 | drivers/scsi/scsi.c | if(SCpnt->result) { |
SCpnt | 390 | drivers/scsi/scsi.c | if (((driver_byte(SCpnt->result) & DRIVER_SENSE) || |
SCpnt | 391 | drivers/scsi/scsi.c | (status_byte(SCpnt->result) & CHECK_CONDITION)) && |
SCpnt | 392 | drivers/scsi/scsi.c | ((SCpnt->sense_buffer[0] & 0x70) >> 4) == 7) { |
SCpnt | 393 | drivers/scsi/scsi.c | if (SCpnt->sense_buffer[2] &0xe0) |
SCpnt | 395 | drivers/scsi/scsi.c | if(((SCpnt->sense_buffer[2] & 0xf) != NOT_READY) && |
SCpnt | 396 | drivers/scsi/scsi.c | ((SCpnt->sense_buffer[2] & 0xf) != UNIT_ATTENTION)) |
SCpnt | 417 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xffff; /* Mark not busy */ |
SCpnt | 418 | drivers/scsi/scsi.c | SCpnt->cmd_len = 0; |
SCpnt | 420 | drivers/scsi/scsi.c | scsi_do_cmd (SCpnt, (void *) scsi_cmd, (void *) scsi_result, |
SCpnt | 424 | drivers/scsi/scsi.c | while (SCpnt->request.dev != 0xfffe); |
SCpnt | 425 | drivers/scsi/scsi.c | else if (SCpnt->request.dev != 0xfffe) { |
SCpnt | 428 | drivers/scsi/scsi.c | SCpnt->request.sem = &sem; |
SCpnt | 432 | drivers/scsi/scsi.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 435 | drivers/scsi/scsi.c | the_result = SCpnt->result; |
SCpnt | 579 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xffff; /* Mark not busy */ |
SCpnt | 580 | drivers/scsi/scsi.c | SCpnt->cmd_len = 0; |
SCpnt | 582 | drivers/scsi/scsi.c | scsi_do_cmd (SCpnt, (void *) scsi_cmd, |
SCpnt | 587 | drivers/scsi/scsi.c | while (SCpnt->request.dev != 0xfffe); |
SCpnt | 588 | drivers/scsi/scsi.c | else if (SCpnt->request.dev != 0xfffe) { |
SCpnt | 591 | drivers/scsi/scsi.c | SCpnt->request.sem = &sem; |
SCpnt | 595 | drivers/scsi/scsi.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 625 | drivers/scsi/scsi.c | scsi_init_free((char *) SCpnt, sizeof(Scsi_Cmnd)); |
SCpnt | 647 | drivers/scsi/scsi.c | static void scsi_times_out (Scsi_Cmnd * SCpnt, int pid) |
SCpnt | 650 | drivers/scsi/scsi.c | switch (SCpnt->internal_timeout & (IN_ABORT | IN_RESET)) |
SCpnt | 659 | drivers/scsi/scsi.c | if (!scsi_abort (SCpnt, DID_TIME_OUT, pid)) |
SCpnt | 663 | drivers/scsi/scsi.c | SCpnt->host->host_no); |
SCpnt | 664 | drivers/scsi/scsi.c | if (!scsi_reset (SCpnt)) |
SCpnt | 671 | drivers/scsi/scsi.c | printk("Unable to reset scsi host %d - ",SCpnt->host->host_no); |
SCpnt | 690 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 700 | drivers/scsi/scsi.c | SCpnt = device->host->host_queue; |
SCpnt | 701 | drivers/scsi/scsi.c | while(SCpnt){ |
SCpnt | 702 | drivers/scsi/scsi.c | if(SCpnt->target == device->id && |
SCpnt | 703 | drivers/scsi/scsi.c | SCpnt->lun == device->lun) |
SCpnt | 704 | drivers/scsi/scsi.c | if(SCpnt->request.dev < 0) break; |
SCpnt | 705 | drivers/scsi/scsi.c | SCpnt = SCpnt->next; |
SCpnt | 708 | drivers/scsi/scsi.c | if (!SCpnt) return NULL; |
SCpnt | 713 | drivers/scsi/scsi.c | memcpy(&SCpnt->request, req, sizeof(struct request)); |
SCpnt | 728 | drivers/scsi/scsi.c | SCpnt->request.bhtail = bh; |
SCpnt | 734 | drivers/scsi/scsi.c | SCpnt->request.nr_sectors -= req->nr_sectors; |
SCpnt | 737 | drivers/scsi/scsi.c | SCpnt->request.sem = NULL; /* Wait until whole thing done */ |
SCpnt | 743 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xffff; /* Busy, but no request */ |
SCpnt | 744 | drivers/scsi/scsi.c | SCpnt->request.sem = NULL; /* And no one is waiting for the device either */ |
SCpnt | 747 | drivers/scsi/scsi.c | SCpnt->use_sg = 0; /* Reset the scatter-gather flag */ |
SCpnt | 748 | drivers/scsi/scsi.c | SCpnt->old_use_sg = 0; |
SCpnt | 749 | drivers/scsi/scsi.c | SCpnt->transfersize = 0; |
SCpnt | 750 | drivers/scsi/scsi.c | SCpnt->underflow = 0; |
SCpnt | 751 | drivers/scsi/scsi.c | SCpnt->cmd_len = 0; |
SCpnt | 752 | drivers/scsi/scsi.c | return SCpnt; |
SCpnt | 773 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 789 | drivers/scsi/scsi.c | SCpnt = host->host_queue; |
SCpnt | 790 | drivers/scsi/scsi.c | while(SCpnt){ |
SCpnt | 791 | drivers/scsi/scsi.c | if(SCpnt->target == device->id && |
SCpnt | 792 | drivers/scsi/scsi.c | SCpnt->lun == device->lun) { |
SCpnt | 793 | drivers/scsi/scsi.c | SCwait = SCpnt; |
SCpnt | 794 | drivers/scsi/scsi.c | if(SCpnt->request.dev < 0) break; |
SCpnt | 796 | drivers/scsi/scsi.c | SCpnt = SCpnt->next; |
SCpnt | 805 | drivers/scsi/scsi.c | if (!SCpnt || SCpnt->request.dev >= 0) /* Might have changed */ |
SCpnt | 818 | drivers/scsi/scsi.c | memcpy(&SCpnt->request, req, sizeof(struct request)); |
SCpnt | 833 | drivers/scsi/scsi.c | SCpnt->request.bhtail = bh; |
SCpnt | 838 | drivers/scsi/scsi.c | SCpnt->request.nr_sectors -= req->nr_sectors; |
SCpnt | 841 | drivers/scsi/scsi.c | SCpnt->request.sem = NULL; /* Wait until whole thing done */ |
SCpnt | 850 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xffff; /* Busy */ |
SCpnt | 851 | drivers/scsi/scsi.c | SCpnt->request.sem = NULL; /* And no one is waiting for this to complete */ |
SCpnt | 858 | drivers/scsi/scsi.c | SCpnt->use_sg = 0; /* Reset the scatter-gather flag */ |
SCpnt | 859 | drivers/scsi/scsi.c | SCpnt->old_use_sg = 0; |
SCpnt | 860 | drivers/scsi/scsi.c | SCpnt->transfersize = 0; /* No default transfer size */ |
SCpnt | 861 | drivers/scsi/scsi.c | SCpnt->cmd_len = 0; |
SCpnt | 862 | drivers/scsi/scsi.c | SCpnt->underflow = 0; /* Do not flag underflow conditions */ |
SCpnt | 863 | drivers/scsi/scsi.c | return SCpnt; |
SCpnt | 870 | drivers/scsi/scsi.c | inline void internal_cmnd (Scsi_Cmnd * SCpnt) |
SCpnt | 879 | drivers/scsi/scsi.c | if ((unsigned long) &SCpnt < current->kernel_stack_page) |
SCpnt | 882 | drivers/scsi/scsi.c | host = SCpnt->host; |
SCpnt | 894 | drivers/scsi/scsi.c | update_timeout(SCpnt, SCpnt->timeout_per_command); |
SCpnt | 902 | drivers/scsi/scsi.c | "bufflen = %d, done = %08x)\n", SCpnt->host->host_no, SCpnt->target, SCpnt->cmnd, SCpnt->buffer, SCpnt->bufflen, SCpnt->done); |
SCpnt | 919 | drivers/scsi/scsi.c | if(!intr_count && SCpnt->host->irq) |
SCpnt | 920 | drivers/scsi/scsi.c | disable_irq(SCpnt->host->irq); |
SCpnt | 922 | drivers/scsi/scsi.c | host->hostt->queuecommand (SCpnt, scsi_done); |
SCpnt | 924 | drivers/scsi/scsi.c | if(!intr_count && SCpnt->host->irq) |
SCpnt | 925 | drivers/scsi/scsi.c | enable_irq(SCpnt->host->irq); |
SCpnt | 933 | drivers/scsi/scsi.c | temp=host->hostt->command (SCpnt); |
SCpnt | 934 | drivers/scsi/scsi.c | SCpnt->result = temp; |
SCpnt | 940 | drivers/scsi/scsi.c | scsi_done(SCpnt); |
SCpnt | 947 | drivers/scsi/scsi.c | static void scsi_request_sense (Scsi_Cmnd * SCpnt) |
SCpnt | 953 | drivers/scsi/scsi.c | SCpnt->flags |= WAS_SENSE | ASKED_FOR_SENSE; |
SCpnt | 954 | drivers/scsi/scsi.c | update_timeout(SCpnt, SENSE_TIMEOUT); |
SCpnt | 958 | drivers/scsi/scsi.c | memcpy ((void *) SCpnt->cmnd , (void *) generic_sense, |
SCpnt | 961 | drivers/scsi/scsi.c | SCpnt->cmnd[1] = SCpnt->lun << 5; |
SCpnt | 962 | drivers/scsi/scsi.c | SCpnt->cmnd[4] = sizeof(SCpnt->sense_buffer); |
SCpnt | 964 | drivers/scsi/scsi.c | SCpnt->request_buffer = &SCpnt->sense_buffer; |
SCpnt | 965 | drivers/scsi/scsi.c | SCpnt->request_bufflen = sizeof(SCpnt->sense_buffer); |
SCpnt | 966 | drivers/scsi/scsi.c | SCpnt->use_sg = 0; |
SCpnt | 967 | drivers/scsi/scsi.c | SCpnt->cmd_len = COMMAND_SIZE(SCpnt->cmnd[0]); |
SCpnt | 968 | drivers/scsi/scsi.c | internal_cmnd (SCpnt); |
SCpnt | 980 | drivers/scsi/scsi.c | void scsi_do_cmd (Scsi_Cmnd * SCpnt, const void *cmnd , |
SCpnt | 986 | drivers/scsi/scsi.c | struct Scsi_Host * host = SCpnt->host; |
SCpnt | 991 | drivers/scsi/scsi.c | int target = SCpnt->target; |
SCpnt | 1017 | drivers/scsi/scsi.c | SCpnt->pid = scsi_pid++; |
SCpnt | 1038 | drivers/scsi/scsi.c | memcpy ((void *) SCpnt->data_cmnd , (void *) cmnd, 12); |
SCpnt | 1040 | drivers/scsi/scsi.c | SCpnt->host = host; |
SCpnt | 1041 | drivers/scsi/scsi.c | SCpnt->target = target; |
SCpnt | 1042 | drivers/scsi/scsi.c | SCpnt->lun = (SCpnt->data_cmnd[1] >> 5); |
SCpnt | 1044 | drivers/scsi/scsi.c | SCpnt->bufflen = bufflen; |
SCpnt | 1045 | drivers/scsi/scsi.c | SCpnt->buffer = buffer; |
SCpnt | 1046 | drivers/scsi/scsi.c | SCpnt->flags=0; |
SCpnt | 1047 | drivers/scsi/scsi.c | SCpnt->retries=0; |
SCpnt | 1048 | drivers/scsi/scsi.c | SCpnt->allowed=retries; |
SCpnt | 1049 | drivers/scsi/scsi.c | SCpnt->done = done; |
SCpnt | 1050 | drivers/scsi/scsi.c | SCpnt->timeout_per_command = timeout; |
SCpnt | 1052 | drivers/scsi/scsi.c | memcpy ((void *) SCpnt->cmnd , (void *) cmnd, 12); |
SCpnt | 1055 | drivers/scsi/scsi.c | memset ((void *) SCpnt->sense_buffer, 0, sizeof SCpnt->sense_buffer); |
SCpnt | 1056 | drivers/scsi/scsi.c | SCpnt->request_buffer = buffer; |
SCpnt | 1057 | drivers/scsi/scsi.c | SCpnt->request_bufflen = bufflen; |
SCpnt | 1058 | drivers/scsi/scsi.c | SCpnt->old_use_sg = SCpnt->use_sg; |
SCpnt | 1059 | drivers/scsi/scsi.c | if (SCpnt->cmd_len == 0) |
SCpnt | 1060 | drivers/scsi/scsi.c | SCpnt->cmd_len = COMMAND_SIZE(SCpnt->cmnd[0]); |
SCpnt | 1061 | drivers/scsi/scsi.c | SCpnt->old_cmd_len = SCpnt->cmd_len; |
SCpnt | 1065 | drivers/scsi/scsi.c | SCpnt->internal_timeout = 0; |
SCpnt | 1066 | drivers/scsi/scsi.c | SCpnt->abort_reason = 0; |
SCpnt | 1067 | drivers/scsi/scsi.c | internal_cmnd (SCpnt); |
SCpnt | 1082 | drivers/scsi/scsi.c | static void reset (Scsi_Cmnd * SCpnt) |
SCpnt | 1085 | drivers/scsi/scsi.c | printk("scsi: reset(%d)\n", SCpnt->host->host_no); |
SCpnt | 1088 | drivers/scsi/scsi.c | SCpnt->flags |= (WAS_RESET | IS_RESETTING); |
SCpnt | 1089 | drivers/scsi/scsi.c | scsi_reset(SCpnt); |
SCpnt | 1096 | drivers/scsi/scsi.c | if(SCpnt->flags & NEEDS_JUMPSTART) { |
SCpnt | 1097 | drivers/scsi/scsi.c | SCpnt->flags &= ~NEEDS_JUMPSTART; |
SCpnt | 1098 | drivers/scsi/scsi.c | scsi_request_sense (SCpnt); |
SCpnt | 1105 | drivers/scsi/scsi.c | static int check_sense (Scsi_Cmnd * SCpnt) |
SCpnt | 1110 | drivers/scsi/scsi.c | if (((SCpnt->sense_buffer[0] & 0x70) >> 4) != 7) { |
SCpnt | 1111 | drivers/scsi/scsi.c | if(!(SCpnt->flags & ASKED_FOR_SENSE)) |
SCpnt | 1117 | drivers/scsi/scsi.c | SCpnt->flags &= ~ASKED_FOR_SENSE; |
SCpnt | 1120 | drivers/scsi/scsi.c | printk("scsi%d : ", SCpnt->host->host_no); |
SCpnt | 1121 | drivers/scsi/scsi.c | print_sense("", SCpnt); |
SCpnt | 1124 | drivers/scsi/scsi.c | if (SCpnt->sense_buffer[2] &0xe0) |
SCpnt | 1127 | drivers/scsi/scsi.c | switch (SCpnt->sense_buffer[2] & 0xf) |
SCpnt | 1177 | drivers/scsi/scsi.c | static void scsi_done (Scsi_Cmnd * SCpnt) |
SCpnt | 1183 | drivers/scsi/scsi.c | struct Scsi_Host * host = SCpnt->host; |
SCpnt | 1184 | drivers/scsi/scsi.c | int result = SCpnt->result; |
SCpnt | 1185 | drivers/scsi/scsi.c | oldto = update_timeout(SCpnt, 0); |
SCpnt | 1189 | drivers/scsi/scsi.c | result, SCpnt->target, SCpnt->lun); |
SCpnt | 1194 | drivers/scsi/scsi.c | if(host_byte(result) == DID_ABORT && SCpnt->abort_reason) |
SCpnt | 1195 | drivers/scsi/scsi.c | SCpnt->result = result = (result & 0xff00ffff) | |
SCpnt | 1196 | drivers/scsi/scsi.c | (SCpnt->abort_reason << 16); |
SCpnt | 1208 | drivers/scsi/scsi.c | if(SCpnt->flags & WAS_SENSE) |
SCpnt | 1210 | drivers/scsi/scsi.c | SCpnt->use_sg = SCpnt->old_use_sg; |
SCpnt | 1211 | drivers/scsi/scsi.c | SCpnt->cmd_len = SCpnt->old_cmd_len; |
SCpnt | 1217 | drivers/scsi/scsi.c | if (status_byte(result) && (SCpnt->flags & WAS_SENSE)) |
SCpnt | 1220 | drivers/scsi/scsi.c | SCpnt->flags &= ~WAS_SENSE; |
SCpnt | 1221 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~SENSE_TIMEOUT; |
SCpnt | 1223 | drivers/scsi/scsi.c | if (!(SCpnt->flags & WAS_RESET)) |
SCpnt | 1226 | drivers/scsi/scsi.c | SCpnt->host->host_no, SCpnt->target, SCpnt->lun); |
SCpnt | 1227 | drivers/scsi/scsi.c | reset(SCpnt); |
SCpnt | 1242 | drivers/scsi/scsi.c | if (SCpnt->flags & WAS_SENSE) |
SCpnt | 1248 | drivers/scsi/scsi.c | SCpnt->flags &= ~WAS_SENSE; |
SCpnt | 1249 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~SENSE_TIMEOUT; |
SCpnt | 1251 | drivers/scsi/scsi.c | switch (checked = check_sense(SCpnt)) |
SCpnt | 1259 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1298 | drivers/scsi/scsi.c | switch (check_sense(SCpnt)) |
SCpnt | 1301 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1314 | drivers/scsi/scsi.c | scsi_request_sense (SCpnt); |
SCpnt | 1326 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1332 | drivers/scsi/scsi.c | SCpnt->host->host_no); |
SCpnt | 1333 | drivers/scsi/scsi.c | reset(SCpnt); |
SCpnt | 1356 | drivers/scsi/scsi.c | if (SCpnt->flags & WAS_TIMEDOUT) |
SCpnt | 1368 | drivers/scsi/scsi.c | SCpnt->flags |= WAS_TIMEDOUT; |
SCpnt | 1369 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_ABORT; |
SCpnt | 1392 | drivers/scsi/scsi.c | if (SCpnt->flags & IS_RESETTING) |
SCpnt | 1394 | drivers/scsi/scsi.c | SCpnt->flags &= ~IS_RESETTING; |
SCpnt | 1401 | drivers/scsi/scsi.c | switch (check_sense(SCpnt)) { |
SCpnt | 1403 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1416 | drivers/scsi/scsi.c | scsi_request_sense (SCpnt); |
SCpnt | 1438 | drivers/scsi/scsi.c | SCpnt->allowed, SCpnt->retries); |
SCpnt | 1441 | drivers/scsi/scsi.c | if ((++SCpnt->retries) < SCpnt->allowed) |
SCpnt | 1443 | drivers/scsi/scsi.c | if ((SCpnt->retries >= (SCpnt->allowed >> 1)) |
SCpnt | 1444 | drivers/scsi/scsi.c | && !(jiffies < SCpnt->host->last_reset + MIN_RESET_PERIOD) |
SCpnt | 1445 | drivers/scsi/scsi.c | && !(SCpnt->flags & WAS_RESET)) |
SCpnt | 1448 | drivers/scsi/scsi.c | SCpnt->host->host_no); |
SCpnt | 1449 | drivers/scsi/scsi.c | reset(SCpnt); |
SCpnt | 1463 | drivers/scsi/scsi.c | if (SCpnt->flags & WAS_SENSE) |
SCpnt | 1464 | drivers/scsi/scsi.c | scsi_request_sense(SCpnt); |
SCpnt | 1467 | drivers/scsi/scsi.c | memcpy ((void *) SCpnt->cmnd, |
SCpnt | 1468 | drivers/scsi/scsi.c | (void*) SCpnt->data_cmnd, |
SCpnt | 1469 | drivers/scsi/scsi.c | sizeof(SCpnt->data_cmnd)); |
SCpnt | 1470 | drivers/scsi/scsi.c | SCpnt->request_buffer = SCpnt->buffer; |
SCpnt | 1471 | drivers/scsi/scsi.c | SCpnt->request_bufflen = SCpnt->bufflen; |
SCpnt | 1472 | drivers/scsi/scsi.c | SCpnt->use_sg = SCpnt->old_use_sg; |
SCpnt | 1473 | drivers/scsi/scsi.c | SCpnt->cmd_len = SCpnt->old_cmd_len; |
SCpnt | 1474 | drivers/scsi/scsi.c | internal_cmnd (SCpnt); |
SCpnt | 1484 | drivers/scsi/scsi.c | printk("Calling done function - at address %08x\n", SCpnt->done); |
SCpnt | 1492 | drivers/scsi/scsi.c | if (MAJOR(SCpnt->request.dev) != SCSI_DISK_MAJOR && |
SCpnt | 1493 | drivers/scsi/scsi.c | MAJOR(SCpnt->request.dev) != SCSI_CDROM_MAJOR) { |
SCpnt | 1503 | drivers/scsi/scsi.c | SCpnt->result = result | ((exit & 0xff) << 24); |
SCpnt | 1504 | drivers/scsi/scsi.c | SCpnt->use_sg = SCpnt->old_use_sg; |
SCpnt | 1505 | drivers/scsi/scsi.c | SCpnt->cmd_len = SCpnt->old_cmd_len; |
SCpnt | 1506 | drivers/scsi/scsi.c | SCpnt->done (SCpnt); |
SCpnt | 1531 | drivers/scsi/scsi.c | int scsi_abort (Scsi_Cmnd * SCpnt, int why, int pid) |
SCpnt | 1535 | drivers/scsi/scsi.c | struct Scsi_Host * host = SCpnt->host; |
SCpnt | 1546 | drivers/scsi/scsi.c | if (SCpnt->request.dev == -1 || pid != SCpnt->pid) { |
SCpnt | 1551 | drivers/scsi/scsi.c | if (SCpnt->internal_timeout & IN_ABORT) |
SCpnt | 1554 | drivers/scsi/scsi.c | while (SCpnt->internal_timeout & IN_ABORT); |
SCpnt | 1558 | drivers/scsi/scsi.c | SCpnt->internal_timeout |= IN_ABORT; |
SCpnt | 1559 | drivers/scsi/scsi.c | oldto = update_timeout(SCpnt, ABORT_TIMEOUT); |
SCpnt | 1561 | drivers/scsi/scsi.c | if ((SCpnt->flags & IS_RESETTING) && |
SCpnt | 1562 | drivers/scsi/scsi.c | SCpnt->device->soft_reset) { |
SCpnt | 1566 | drivers/scsi/scsi.c | " the bus was reset\n", SCpnt->target, SCpnt->lun); |
SCpnt | 1571 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_ABORT; |
SCpnt | 1572 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1576 | drivers/scsi/scsi.c | SCpnt->pid, SCpnt->host->host_no, (int) SCpnt->target, (int) |
SCpnt | 1577 | drivers/scsi/scsi.c | SCpnt->lun); |
SCpnt | 1578 | drivers/scsi/scsi.c | print_command (SCpnt->cmnd); |
SCpnt | 1579 | drivers/scsi/scsi.c | if (SCpnt->request.dev == -1 || pid != SCpnt->pid) |
SCpnt | 1581 | drivers/scsi/scsi.c | SCpnt->abort_reason = why; |
SCpnt | 1582 | drivers/scsi/scsi.c | switch(host->hostt->abort(SCpnt)) { |
SCpnt | 1593 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_ABORT; |
SCpnt | 1594 | drivers/scsi/scsi.c | if(SCpnt->flags & WAS_TIMEDOUT) { |
SCpnt | 1600 | drivers/scsi/scsi.c | SCpnt->flags |= WAS_TIMEDOUT; |
SCpnt | 1601 | drivers/scsi/scsi.c | oldto = SCpnt->timeout_per_command; |
SCpnt | 1602 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1611 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1619 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_ABORT; |
SCpnt | 1620 | drivers/scsi/scsi.c | update_timeout(SCpnt, 0); |
SCpnt | 1624 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_ABORT; |
SCpnt | 1631 | drivers/scsi/scsi.c | int scsi_reset (Scsi_Cmnd * SCpnt) |
SCpnt | 1636 | drivers/scsi/scsi.c | struct Scsi_Host * host = SCpnt->host; |
SCpnt | 1644 | drivers/scsi/scsi.c | if (SCpnt->internal_timeout & IN_RESET) |
SCpnt | 1647 | drivers/scsi/scsi.c | while (SCpnt->internal_timeout & IN_RESET); |
SCpnt | 1651 | drivers/scsi/scsi.c | SCpnt->internal_timeout |= IN_RESET; |
SCpnt | 1652 | drivers/scsi/scsi.c | oldto = update_timeout(SCpnt, RESET_TIMEOUT); |
SCpnt | 1663 | drivers/scsi/scsi.c | scsi_abort(SCpnt1, DID_RESET, SCpnt->pid); |
SCpnt | 1671 | drivers/scsi/scsi.c | temp = host->hostt->reset(SCpnt); |
SCpnt | 1679 | drivers/scsi/scsi.c | temp = host->hostt->reset(SCpnt); |
SCpnt | 1691 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_RESET; |
SCpnt | 1692 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1699 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_RESET; |
SCpnt | 1700 | drivers/scsi/scsi.c | scsi_request_sense (SCpnt); |
SCpnt | 1709 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_RESET; |
SCpnt | 1710 | drivers/scsi/scsi.c | update_timeout(SCpnt, 0); |
SCpnt | 1733 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 1747 | drivers/scsi/scsi.c | for(SCpnt = host->host_queue; SCpnt; SCpnt = SCpnt->next) |
SCpnt | 1748 | drivers/scsi/scsi.c | if (SCpnt->timeout == -1) |
SCpnt | 1750 | drivers/scsi/scsi.c | SCpnt->timeout = 0; |
SCpnt | 1751 | drivers/scsi/scsi.c | pid = SCpnt->pid; |
SCpnt | 1753 | drivers/scsi/scsi.c | scsi_times_out(SCpnt, pid); |
SCpnt | 1777 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 1804 | drivers/scsi/scsi.c | for(SCpnt = host->host_queue; SCpnt; SCpnt = SCpnt->next) |
SCpnt | 1805 | drivers/scsi/scsi.c | if (SCpnt->timeout > 0) { |
SCpnt | 1806 | drivers/scsi/scsi.c | SCpnt->timeout -= used; |
SCpnt | 1807 | drivers/scsi/scsi.c | if(SCpnt->timeout <= 0) SCpnt->timeout = -1; |
SCpnt | 1808 | drivers/scsi/scsi.c | if(SCpnt->timeout > 0 && SCpnt->timeout < least) |
SCpnt | 1809 | drivers/scsi/scsi.c | least = SCpnt->timeout; |
SCpnt | 1981 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt; |
SCpnt | 2022 | drivers/scsi/scsi.c | SCpnt = (Scsi_Cmnd *) scsi_init_malloc(sizeof(Scsi_Cmnd), GFP_ATOMIC); |
SCpnt | 2023 | drivers/scsi/scsi.c | SCpnt->host = SDpnt->host; |
SCpnt | 2024 | drivers/scsi/scsi.c | SCpnt->device = SDpnt; |
SCpnt | 2025 | drivers/scsi/scsi.c | SCpnt->target = SDpnt->id; |
SCpnt | 2026 | drivers/scsi/scsi.c | SCpnt->lun = SDpnt->lun; |
SCpnt | 2027 | drivers/scsi/scsi.c | SCpnt->request.dev = -1; /* Mark not busy */ |
SCpnt | 2028 | drivers/scsi/scsi.c | SCpnt->use_sg = 0; |
SCpnt | 2029 | drivers/scsi/scsi.c | SCpnt->old_use_sg = 0; |
SCpnt | 2030 | drivers/scsi/scsi.c | SCpnt->old_cmd_len = 0; |
SCpnt | 2031 | drivers/scsi/scsi.c | SCpnt->timeout = 0; |
SCpnt | 2032 | drivers/scsi/scsi.c | SCpnt->underflow = 0; |
SCpnt | 2033 | drivers/scsi/scsi.c | SCpnt->transfersize = 0; |
SCpnt | 2034 | drivers/scsi/scsi.c | SCpnt->host_scribble = NULL; |
SCpnt | 2037 | drivers/scsi/scsi.c | host->host_queue->prev = SCpnt; |
SCpnt | 2038 | drivers/scsi/scsi.c | SCpnt->next = host->host_queue; |
SCpnt | 2039 | drivers/scsi/scsi.c | SCpnt->prev = NULL; |
SCpnt | 2040 | drivers/scsi/scsi.c | host->host_queue = SCpnt; |
SCpnt | 2165 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt; |
SCpnt | 2222 | drivers/scsi/scsi.c | SCpnt = (Scsi_Cmnd *) scsi_init_malloc(sizeof(Scsi_Cmnd), GFP_ATOMIC); |
SCpnt | 2223 | drivers/scsi/scsi.c | SCpnt->host = SDpnt->host; |
SCpnt | 2224 | drivers/scsi/scsi.c | SCpnt->device = SDpnt; |
SCpnt | 2225 | drivers/scsi/scsi.c | SCpnt->target = SDpnt->id; |
SCpnt | 2226 | drivers/scsi/scsi.c | SCpnt->lun = SDpnt->lun; |
SCpnt | 2227 | drivers/scsi/scsi.c | SCpnt->request.dev = -1; /* Mark not busy */ |
SCpnt | 2228 | drivers/scsi/scsi.c | SCpnt->request.sem = NULL; |
SCpnt | 2229 | drivers/scsi/scsi.c | SCpnt->use_sg = 0; |
SCpnt | 2230 | drivers/scsi/scsi.c | SCpnt->old_use_sg = 0; |
SCpnt | 2231 | drivers/scsi/scsi.c | SCpnt->underflow = 0; |
SCpnt | 2232 | drivers/scsi/scsi.c | SCpnt->timeout = 0; |
SCpnt | 2233 | drivers/scsi/scsi.c | SCpnt->transfersize = 0; |
SCpnt | 2234 | drivers/scsi/scsi.c | SCpnt->host_scribble = NULL; |
SCpnt | 2236 | drivers/scsi/scsi.c | SCpnt->next = host->host_queue; |
SCpnt | 2237 | drivers/scsi/scsi.c | SCpnt->prev = NULL; |
SCpnt | 2238 | drivers/scsi/scsi.c | host->host_queue = SCpnt; |
SCpnt | 2240 | drivers/scsi/scsi.c | host->host_queue->prev = SCpnt; |
SCpnt | 2329 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt; |
SCpnt | 2345 | drivers/scsi/scsi.c | for(SCpnt = shpnt->host_queue; SCpnt; SCpnt = SCpnt->next) |
SCpnt | 2349 | drivers/scsi/scsi.c | if(SCpnt->request.dev != -1) { |
SCpnt | 2351 | drivers/scsi/scsi.c | for(SCpnt = shpnt->host_queue; SCpnt; SCpnt = SCpnt->next) |
SCpnt | 2352 | drivers/scsi/scsi.c | if(SCpnt->request.dev == 0xffe0) SCpnt->request.dev = -1; |
SCpnt | 2356 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xffe0; /* Mark as busy */ |
SCpnt | 2379 | drivers/scsi/scsi.c | SCpnt = sdpnt->host->host_queue->next; |
SCpnt | 2381 | drivers/scsi/scsi.c | sdpnt->host->host_queue = SCpnt; |
SCpnt | 2382 | drivers/scsi/scsi.c | if (SCpnt) SCpnt->prev = NULL; |
SCpnt | 2498 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt; |
SCpnt | 2502 | drivers/scsi/scsi.c | for(SCpnt=shpnt->host_queue; SCpnt; SCpnt = SCpnt->next) |
SCpnt | 2506 | drivers/scsi/scsi.c | i++, SCpnt->host->host_no, |
SCpnt | 2507 | drivers/scsi/scsi.c | SCpnt->target, |
SCpnt | 2508 | drivers/scsi/scsi.c | SCpnt->lun, |
SCpnt | 2509 | drivers/scsi/scsi.c | SCpnt->request.dev, |
SCpnt | 2510 | drivers/scsi/scsi.c | SCpnt->request.sector, |
SCpnt | 2511 | drivers/scsi/scsi.c | SCpnt->request.nr_sectors, |
SCpnt | 2512 | drivers/scsi/scsi.c | SCpnt->request.current_nr_sectors, |
SCpnt | 2513 | drivers/scsi/scsi.c | SCpnt->use_sg, |
SCpnt | 2514 | drivers/scsi/scsi.c | SCpnt->retries, |
SCpnt | 2515 | drivers/scsi/scsi.c | SCpnt->allowed, |
SCpnt | 2516 | drivers/scsi/scsi.c | SCpnt->flags, |
SCpnt | 2517 | drivers/scsi/scsi.c | SCpnt->timeout_per_command, |
SCpnt | 2518 | drivers/scsi/scsi.c | SCpnt->timeout, |
SCpnt | 2519 | drivers/scsi/scsi.c | SCpnt->internal_timeout, |
SCpnt | 2520 | drivers/scsi/scsi.c | SCpnt->cmnd[0], |
SCpnt | 2521 | drivers/scsi/scsi.c | SCpnt->sense_buffer[2], |
SCpnt | 2522 | drivers/scsi/scsi.c | SCpnt->result); |
SCpnt | 545 | drivers/scsi/scsi.h | static Scsi_Cmnd * end_scsi_request(Scsi_Cmnd * SCpnt, int uptodate, int sectors) |
SCpnt | 550 | drivers/scsi/scsi.h | req = &SCpnt->request; |
SCpnt | 577 | drivers/scsi/scsi.h | return SCpnt; |
SCpnt | 584 | drivers/scsi/scsi.h | if (SCpnt->host->block) { |
SCpnt | 587 | drivers/scsi/scsi.h | for (next = SCpnt->host->block; next != SCpnt->host; |
SCpnt | 594 | drivers/scsi/scsi.h | wake_up(&SCpnt->device->device_wait); |
SCpnt | 67 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xf) != 0) start = starts[(SCpnt->request.dev & 0xf) - 1]; \ |
SCpnt | 73 | drivers/scsi/scsi_debug.c | if (bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\ |
SCpnt | 79 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xfff0) != ((target + NR_REAL) << 4) +(MAJOR_NR << 8)){ \ |
SCpnt | 80 | drivers/scsi/scsi_debug.c | printk("Dev #s %x %x ",SCpnt->request.dev, target); \ |
SCpnt | 86 | drivers/scsi/scsi_debug.c | if (bufflen != 1024 && (!SCpnt->use_sg)) {printk("%x %d\n ",bufflen, SCpnt->use_sg); panic("Bad bufflen");}; \ |
SCpnt | 88 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xf) > npart) panic ("Bad partition"); \ |
SCpnt | 89 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xf) != 0) start = starts[(SCpnt->request.dev & 0xf) - 1]; \ |
SCpnt | 90 | drivers/scsi/scsi_debug.c | if (SCpnt->request.cmd != RW) panic ("Wrong operation"); \ |
SCpnt | 91 | drivers/scsi/scsi_debug.c | if (SCpnt->request.sector + start != block) panic("Wrong block."); \ |
SCpnt | 92 | drivers/scsi/scsi_debug.c | if (SCpnt->request.current_nr_sectors != 2 && (!SCpnt->use_sg)) panic ("Wrong # blocks"); \ |
SCpnt | 93 | drivers/scsi/scsi_debug.c | if (SCpnt->request.bh){ \ |
SCpnt | 94 | drivers/scsi/scsi_debug.c | if (SCpnt->request.bh->b_size != 1024) panic ("Wrong bh size"); \ |
SCpnt | 95 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.bh->b_blocknr << 1) + start != block) \ |
SCpnt | 96 | drivers/scsi/scsi_debug.c | { printk("Wrong bh block# %d %d ",SCpnt->request.bh->b_blocknr, block); \ |
SCpnt | 98 | drivers/scsi/scsi_debug.c | if (SCpnt->request.bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\ |
SCpnt | 110 | drivers/scsi/scsi_debug.c | static void scsi_dump(Scsi_Cmnd * SCpnt, int flag){ |
SCpnt | 117 | drivers/scsi/scsi_debug.c | printk("use_sg: %d",SCpnt->use_sg); |
SCpnt | 118 | drivers/scsi/scsi_debug.c | if (SCpnt->use_sg){ |
SCpnt | 119 | drivers/scsi/scsi_debug.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 120 | drivers/scsi/scsi_debug.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 126 | drivers/scsi/scsi_debug.c | printk("nosg: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 127 | drivers/scsi/scsi_debug.c | SCpnt->bufflen); |
SCpnt | 128 | drivers/scsi/scsi_debug.c | lpnt = (int *) SCpnt->request.buffer; |
SCpnt | 131 | drivers/scsi/scsi_debug.c | lpnt = (unsigned int *) SCpnt; |
SCpnt | 155 | drivers/scsi/scsi_debug.c | int scsi_debug_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 157 | drivers/scsi/scsi_debug.c | unchar *cmd = (unchar *) SCpnt->cmnd; |
SCpnt | 165 | drivers/scsi/scsi_debug.c | int target = SCpnt->target; |
SCpnt | 166 | drivers/scsi/scsi_debug.c | int bufflen = SCpnt->request_bufflen; |
SCpnt | 172 | drivers/scsi/scsi_debug.c | DEB(if (target > 1) { SCpnt->result = DID_TIME_OUT << 16;done(SCpnt);return 0;}); |
SCpnt | 174 | drivers/scsi/scsi_debug.c | buff = (unsigned char *) SCpnt->request_buffer; |
SCpnt | 176 | drivers/scsi/scsi_debug.c | if(target>=1 || SCpnt->lun != 0) { |
SCpnt | 177 | drivers/scsi/scsi_debug.c | SCpnt->result = DID_NO_CONNECT << 16; |
SCpnt | 178 | drivers/scsi/scsi_debug.c | done(SCpnt); |
SCpnt | 187 | drivers/scsi/scsi_debug.c | printk("scsi_debug: Requesting sense buffer (%x %x %x %d):", SCpnt, buff, done, bufflen); |
SCpnt | 195 | drivers/scsi/scsi_debug.c | SCpnt->result = 0; |
SCpnt | 196 | drivers/scsi/scsi_debug.c | done(SCpnt); |
SCpnt | 223 | drivers/scsi/scsi_debug.c | if(NR_REAL < 0) NR_REAL = (SCpnt->request.dev >> 4) & 0x0f; |
SCpnt | 248 | drivers/scsi/scsi_debug.c | usec = (SCpnt->request.nr_sectors << 9) * 1.0e6 / SCSI_DATARATE; |
SCpnt | 255 | drivers/scsi/scsi_debug.c | printk("(r%d)",SCpnt->request.nr_sectors); |
SCpnt | 258 | drivers/scsi/scsi_debug.c | if(SCpnt->use_sg){ |
SCpnt | 263 | drivers/scsi/scsi_debug.c | bh = SCpnt->request.bh; |
SCpnt | 289 | drivers/scsi/scsi_debug.c | if (SCpnt->use_sg) printk("Block %x (%d %d)\n",block, SCpnt->request.nr_sectors, |
SCpnt | 290 | drivers/scsi/scsi_debug.c | SCpnt->request.current_nr_sectors); |
SCpnt | 318 | drivers/scsi/scsi_debug.c | memcpy(buff+64, SCpnt, sizeof(Scsi_Cmnd)); |
SCpnt | 321 | drivers/scsi/scsi_debug.c | if(SCpnt->use_sg){ |
SCpnt | 336 | drivers/scsi/scsi_debug.c | SCpnt->result = 0; |
SCpnt | 337 | drivers/scsi/scsi_debug.c | (done)(SCpnt); |
SCpnt | 340 | drivers/scsi/scsi_debug.c | if (SCpnt->use_sg && !scsi_debug_errsts) |
SCpnt | 341 | drivers/scsi/scsi_debug.c | if(bh) scsi_dump(SCpnt, 0); |
SCpnt | 354 | drivers/scsi/scsi_debug.c | if (SCpnt->use_sg){ |
SCpnt | 355 | drivers/scsi/scsi_debug.c | if ((bufflen >> 9) != SCpnt->request.nr_sectors) |
SCpnt | 363 | drivers/scsi/scsi_debug.c | scsi_dump(SCpnt,1); |
SCpnt | 371 | drivers/scsi/scsi_debug.c | SCpnt->result = DID_NO_CONNECT << 16; |
SCpnt | 372 | drivers/scsi/scsi_debug.c | done(SCpnt); |
SCpnt | 385 | drivers/scsi/scsi_debug.c | SCint[i] = SCpnt; |
SCpnt | 398 | drivers/scsi/scsi_debug.c | SCpnt->result = scsi_debug_errsts; |
SCpnt | 409 | drivers/scsi/scsi_debug.c | SCpnt->result = scsi_debug_errsts; |
SCpnt | 422 | drivers/scsi/scsi_debug.c | static void internal_done(Scsi_Cmnd * SCpnt) |
SCpnt | 424 | drivers/scsi/scsi_debug.c | internal_done_errcode = SCpnt->result; |
SCpnt | 428 | drivers/scsi/scsi_debug.c | int scsi_debug_command(Scsi_Cmnd * SCpnt) |
SCpnt | 431 | drivers/scsi/scsi_debug.c | scsi_debug_queuecommand(SCpnt, internal_done); |
SCpnt | 528 | drivers/scsi/scsi_debug.c | int scsi_debug_abort(Scsi_Cmnd * SCpnt) |
SCpnt | 535 | drivers/scsi/scsi_debug.c | SCpnt->result = SCpnt->abort_reason << 16; |
SCpnt | 537 | drivers/scsi/scsi_debug.c | if(SCpnt == SCint[j]) { |
SCpnt | 539 | drivers/scsi/scsi_debug.c | my_done(SCpnt); |
SCpnt | 560 | drivers/scsi/scsi_debug.c | int scsi_debug_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 79 | drivers/scsi/scsi_ioctl.c | static void scsi_ioctl_done (Scsi_Cmnd * SCpnt) |
SCpnt | 83 | drivers/scsi/scsi_ioctl.c | req = &SCpnt->request; |
SCpnt | 94 | drivers/scsi/scsi_ioctl.c | Scsi_Cmnd * SCpnt; |
SCpnt | 96 | drivers/scsi/scsi_ioctl.c | SCpnt = allocate_device(NULL, dev, 1); |
SCpnt | 97 | drivers/scsi/scsi_ioctl.c | scsi_do_cmd(SCpnt, cmd, NULL, 0, |
SCpnt | 101 | drivers/scsi/scsi_ioctl.c | if (SCpnt->request.dev != 0xfffe){ |
SCpnt | 103 | drivers/scsi/scsi_ioctl.c | SCpnt->request.sem = &sem; |
SCpnt | 106 | drivers/scsi/scsi_ioctl.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 109 | drivers/scsi/scsi_ioctl.c | if(driver_byte(SCpnt->result) != 0) |
SCpnt | 110 | drivers/scsi/scsi_ioctl.c | switch(SCpnt->sense_buffer[2] & 0xf) { |
SCpnt | 123 | drivers/scsi/scsi_ioctl.c | SCpnt->result = 0; /* This is no longer considered an error */ |
SCpnt | 132 | drivers/scsi/scsi_ioctl.c | SCpnt->result); |
SCpnt | 134 | drivers/scsi/scsi_ioctl.c | sense_class(SCpnt->sense_buffer[0]), |
SCpnt | 135 | drivers/scsi/scsi_ioctl.c | sense_error(SCpnt->sense_buffer[0]), |
SCpnt | 136 | drivers/scsi/scsi_ioctl.c | SCpnt->sense_buffer[2] & 0xf); |
SCpnt | 140 | drivers/scsi/scsi_ioctl.c | result = SCpnt->result; |
SCpnt | 141 | drivers/scsi/scsi_ioctl.c | SCpnt->request.dev = -1; |
SCpnt | 142 | drivers/scsi/scsi_ioctl.c | wake_up(&SCpnt->device->device_wait); |
SCpnt | 151 | drivers/scsi/scsi_ioctl.c | Scsi_Cmnd * SCpnt; |
SCpnt | 183 | drivers/scsi/scsi_ioctl.c | SCpnt = allocate_device(NULL, dev, 1); |
SCpnt | 185 | drivers/scsi/scsi_ioctl.c | scsi_do_cmd(SCpnt, cmd, buf, needed, scsi_ioctl_done, MAX_TIMEOUT, |
SCpnt | 188 | drivers/scsi/scsi_ioctl.c | if (SCpnt->request.dev != 0xfffe){ |
SCpnt | 190 | drivers/scsi/scsi_ioctl.c | SCpnt->request.sem = &sem; |
SCpnt | 193 | drivers/scsi/scsi_ioctl.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 198 | drivers/scsi/scsi_ioctl.c | if(SCpnt->result) { |
SCpnt | 199 | drivers/scsi/scsi_ioctl.c | result = verify_area(VERIFY_WRITE, cmd_in, sizeof(SCpnt->sense_buffer)); |
SCpnt | 202 | drivers/scsi/scsi_ioctl.c | memcpy_tofs((void *) cmd_in, SCpnt->sense_buffer, sizeof(SCpnt->sense_buffer)); |
SCpnt | 210 | drivers/scsi/scsi_ioctl.c | result = SCpnt->result; |
SCpnt | 211 | drivers/scsi/scsi_ioctl.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 214 | drivers/scsi/scsi_ioctl.c | if(SCpnt->device->scsi_request_fn) |
SCpnt | 215 | drivers/scsi/scsi_ioctl.c | (*SCpnt->device->scsi_request_fn)(); |
SCpnt | 217 | drivers/scsi/scsi_ioctl.c | wake_up(&SCpnt->device->device_wait); |
SCpnt | 68 | drivers/scsi/sd.c | static void requeue_sd_request (Scsi_Cmnd * SCpnt); |
SCpnt | 181 | drivers/scsi/sd.c | static void rw_intr (Scsi_Cmnd *SCpnt) |
SCpnt | 183 | drivers/scsi/sd.c | int result = SCpnt->result; |
SCpnt | 184 | drivers/scsi/sd.c | int this_count = SCpnt->bufflen >> 9; |
SCpnt | 187 | drivers/scsi/sd.c | printk("sd%c : rw_intr(%d, %d)\n", 'a' + MINOR(SCpnt->request.dev), SCpnt->host->host_no, result); |
SCpnt | 199 | drivers/scsi/sd.c | printk("sd%c : %d sectors remain.\n", 'a' + MINOR(SCpnt->request.dev), SCpnt->request.nr_sectors); |
SCpnt | 200 | drivers/scsi/sd.c | printk("use_sg is %d\n ",SCpnt->use_sg); |
SCpnt | 202 | drivers/scsi/sd.c | if (SCpnt->use_sg) { |
SCpnt | 205 | drivers/scsi/sd.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 206 | drivers/scsi/sd.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 211 | drivers/scsi/sd.c | if (SCpnt->request.cmd == READ) |
SCpnt | 216 | drivers/scsi/sd.c | scsi_free(SCpnt->buffer, SCpnt->sglist_len); /* Free list of scatter-gather pointers */ |
SCpnt | 218 | drivers/scsi/sd.c | if (SCpnt->buffer != SCpnt->request.buffer) { |
SCpnt | 220 | drivers/scsi/sd.c | printk("nosg: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 221 | drivers/scsi/sd.c | SCpnt->bufflen); |
SCpnt | 223 | drivers/scsi/sd.c | if (SCpnt->request.cmd == READ) |
SCpnt | 224 | drivers/scsi/sd.c | memcpy(SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 225 | drivers/scsi/sd.c | SCpnt->bufflen); |
SCpnt | 226 | drivers/scsi/sd.c | scsi_free(SCpnt->buffer, SCpnt->bufflen); |
SCpnt | 234 | drivers/scsi/sd.c | if (SCpnt->request.nr_sectors > this_count) |
SCpnt | 236 | drivers/scsi/sd.c | SCpnt->request.errors = 0; |
SCpnt | 238 | drivers/scsi/sd.c | if (!SCpnt->request.bh) |
SCpnt | 242 | drivers/scsi/sd.c | 'a' + MINOR(SCpnt->request.dev)); |
SCpnt | 249 | drivers/scsi/sd.c | SCpnt->request.sector, this_count); |
SCpnt | 252 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 1, this_count); |
SCpnt | 253 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 258 | drivers/scsi/sd.c | if (SCpnt->use_sg) { |
SCpnt | 261 | drivers/scsi/sd.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 262 | drivers/scsi/sd.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 264 | drivers/scsi/sd.c | printk("err: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 265 | drivers/scsi/sd.c | SCpnt->bufflen); |
SCpnt | 271 | drivers/scsi/sd.c | scsi_free(SCpnt->buffer, SCpnt->sglist_len); /* Free list of scatter-gather pointers */ |
SCpnt | 274 | drivers/scsi/sd.c | printk("nosgerr: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 275 | drivers/scsi/sd.c | SCpnt->bufflen); |
SCpnt | 277 | drivers/scsi/sd.c | if (SCpnt->buffer != SCpnt->request.buffer) |
SCpnt | 278 | drivers/scsi/sd.c | scsi_free(SCpnt->buffer, SCpnt->bufflen); |
SCpnt | 294 | drivers/scsi/sd.c | if rscsi_disks[DEVICE_NR(SCpnt->request.dev)].remap |
SCpnt | 303 | drivers/scsi/sd.c | if ((SCpnt->sense_buffer[0] & 0x7f) == 0x70) { |
SCpnt | 304 | drivers/scsi/sd.c | if ((SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) { |
SCpnt | 305 | drivers/scsi/sd.c | if(rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->removable) { |
SCpnt | 309 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->changed = 1; |
SCpnt | 310 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, this_count); |
SCpnt | 311 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 325 | drivers/scsi/sd.c | if (SCpnt->sense_buffer[2] == ILLEGAL_REQUEST) { |
SCpnt | 326 | drivers/scsi/sd.c | if (rscsi_disks[DEVICE_NR(SCpnt->request.dev)].ten) { |
SCpnt | 327 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].ten = 0; |
SCpnt | 328 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 336 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->host->host_no, |
SCpnt | 337 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->id, |
SCpnt | 338 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->lun, result); |
SCpnt | 341 | drivers/scsi/sd.c | print_sense("sd", SCpnt); |
SCpnt | 342 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.current_nr_sectors); |
SCpnt | 343 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 356 | drivers/scsi/sd.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 384 | drivers/scsi/sd.c | SCpnt = allocate_device(&CURRENT, |
SCpnt | 386 | drivers/scsi/sd.c | else SCpnt = NULL; |
SCpnt | 402 | drivers/scsi/sd.c | if (!SCpnt && sd_template.nr_dev > 1){ |
SCpnt | 408 | drivers/scsi/sd.c | SCpnt = request_queueable(req, |
SCpnt | 410 | drivers/scsi/sd.c | if(SCpnt) break; |
SCpnt | 414 | drivers/scsi/sd.c | if (SCpnt && req->dev == -1) { |
SCpnt | 423 | drivers/scsi/sd.c | if (!SCpnt) return; /* Could not find anything to do */ |
SCpnt | 426 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 430 | drivers/scsi/sd.c | static void requeue_sd_request (Scsi_Cmnd * SCpnt) |
SCpnt | 441 | drivers/scsi/sd.c | if(!SCpnt || SCpnt->request.dev <= 0) { |
SCpnt | 446 | drivers/scsi/sd.c | dev = MINOR(SCpnt->request.dev); |
SCpnt | 447 | drivers/scsi/sd.c | block = SCpnt->request.sector; |
SCpnt | 456 | drivers/scsi/sd.c | block + SCpnt->request.nr_sectors > sd[dev].nr_sects) |
SCpnt | 458 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 471 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 476 | drivers/scsi/sd.c | printk("sd%c : real dev = /dev/sd%c, block = %d\n", 'a' + MINOR(SCpnt->request.dev), dev, block); |
SCpnt | 491 | drivers/scsi/sd.c | if((block & 1) || (SCpnt->request.nr_sectors & 1)) { |
SCpnt | 493 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 497 | drivers/scsi/sd.c | switch (SCpnt->request.cmd) |
SCpnt | 502 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 511 | drivers/scsi/sd.c | panic ("Unknown sd command %d\n", SCpnt->request.cmd); |
SCpnt | 514 | drivers/scsi/sd.c | SCpnt->this_count = 0; |
SCpnt | 518 | drivers/scsi/sd.c | contiguous = (!CLUSTERABLE_DEVICE(SCpnt) ? 0 :1); |
SCpnt | 520 | drivers/scsi/sd.c | bounce_size = (SCpnt->request.nr_sectors << 9); |
SCpnt | 527 | drivers/scsi/sd.c | if (contiguous && SCpnt->request.bh && |
SCpnt | 528 | drivers/scsi/sd.c | ((long) SCpnt->request.bh->b_data) + (SCpnt->request.nr_sectors << 9) - 1 > |
SCpnt | 529 | drivers/scsi/sd.c | ISA_DMA_THRESHOLD && SCpnt->host->unchecked_isa_dma) { |
SCpnt | 530 | drivers/scsi/sd.c | if(((long) SCpnt->request.bh->b_data) > ISA_DMA_THRESHOLD) |
SCpnt | 535 | drivers/scsi/sd.c | if(contiguous && SCpnt->request.bh && SCpnt->request.bh->b_reqnext) |
SCpnt | 536 | drivers/scsi/sd.c | for(bh = SCpnt->request.bh, bhp = bh->b_reqnext; bhp; bh = bhp, |
SCpnt | 544 | drivers/scsi/sd.c | if (!SCpnt->request.bh || contiguous) { |
SCpnt | 547 | drivers/scsi/sd.c | this_count = SCpnt->request.nr_sectors; |
SCpnt | 548 | drivers/scsi/sd.c | buff = SCpnt->request.buffer; |
SCpnt | 549 | drivers/scsi/sd.c | SCpnt->use_sg = 0; |
SCpnt | 551 | drivers/scsi/sd.c | } else if (SCpnt->host->sg_tablesize == 0 || |
SCpnt | 562 | drivers/scsi/sd.c | if (SCpnt->host->sg_tablesize != 0 && |
SCpnt | 567 | drivers/scsi/sd.c | this_count = SCpnt->request.current_nr_sectors; |
SCpnt | 568 | drivers/scsi/sd.c | buff = SCpnt->request.buffer; |
SCpnt | 569 | drivers/scsi/sd.c | SCpnt->use_sg = 0; |
SCpnt | 578 | drivers/scsi/sd.c | bh = SCpnt->request.bh; |
SCpnt | 586 | drivers/scsi/sd.c | !CLUSTERABLE_DEVICE(SCpnt) || |
SCpnt | 587 | drivers/scsi/sd.c | (SCpnt->host->unchecked_isa_dma && |
SCpnt | 589 | drivers/scsi/sd.c | if (count < SCpnt->host->sg_tablesize) count++; |
SCpnt | 597 | drivers/scsi/sd.c | if(SCpnt->host->unchecked_isa_dma && |
SCpnt | 598 | drivers/scsi/sd.c | ((unsigned int) SCpnt->request.bh->b_data-1) == ISA_DMA_THRESHOLD) count--; |
SCpnt | 600 | drivers/scsi/sd.c | SCpnt->use_sg = count; /* Number of chains */ |
SCpnt | 602 | drivers/scsi/sd.c | while( count < (SCpnt->use_sg * sizeof(struct scatterlist))) |
SCpnt | 604 | drivers/scsi/sd.c | SCpnt->sglist_len = count; |
SCpnt | 606 | drivers/scsi/sd.c | if(SCpnt->host->sg_tablesize < max_sg) max_sg = SCpnt->host->sg_tablesize; |
SCpnt | 611 | drivers/scsi/sd.c | SCpnt->use_sg = 0; /* No memory left - bail out */ |
SCpnt | 612 | drivers/scsi/sd.c | this_count = SCpnt->request.current_nr_sectors; |
SCpnt | 613 | drivers/scsi/sd.c | buff = SCpnt->request.buffer; |
SCpnt | 617 | drivers/scsi/sd.c | for(count = 0, bh = SCpnt->request.bh, bhp = bh->b_reqnext; |
SCpnt | 618 | drivers/scsi/sd.c | count < SCpnt->use_sg && bh; |
SCpnt | 628 | drivers/scsi/sd.c | ISA_DMA_THRESHOLD && (SCpnt->host->unchecked_isa_dma) && |
SCpnt | 651 | drivers/scsi/sd.c | this_count = SCpnt->request.current_nr_sectors; |
SCpnt | 652 | drivers/scsi/sd.c | buff = SCpnt->request.buffer; |
SCpnt | 653 | drivers/scsi/sd.c | SCpnt->use_sg = 0; |
SCpnt | 654 | drivers/scsi/sd.c | scsi_free(sgpnt, SCpnt->sglist_len); |
SCpnt | 656 | drivers/scsi/sd.c | SCpnt->use_sg = count; |
SCpnt | 667 | drivers/scsi/sd.c | if(bhp && CONTIGUOUS_BUFFERS(bh,bhp) && CLUSTERABLE_DEVICE(SCpnt)) { |
SCpnt | 672 | drivers/scsi/sd.c | (SCpnt->host->unchecked_isa_dma) && |
SCpnt | 680 | drivers/scsi/sd.c | max_sg = SCpnt->use_sg; |
SCpnt | 692 | drivers/scsi/sd.c | if (SCpnt->use_sg < max_sg) SCpnt->use_sg++; |
SCpnt | 698 | drivers/scsi/sd.c | if(count < SCpnt->use_sg || SCpnt->use_sg > SCpnt->host->sg_tablesize){ |
SCpnt | 699 | drivers/scsi/sd.c | bh = SCpnt->request.bh; |
SCpnt | 700 | drivers/scsi/sd.c | printk("Use sg, count %d %x %d\n", SCpnt->use_sg, count, dma_free_sectors); |
SCpnt | 706 | drivers/scsi/sd.c | if(SCpnt->use_sg < 16) |
SCpnt | 707 | drivers/scsi/sd.c | for(count=0; count<SCpnt->use_sg; count++) |
SCpnt | 715 | drivers/scsi/sd.c | if (SCpnt->request.cmd == WRITE) |
SCpnt | 716 | drivers/scsi/sd.c | for(count=0; count<SCpnt->use_sg; count++) |
SCpnt | 725 | drivers/scsi/sd.c | if(SCpnt->use_sg == 0){ |
SCpnt | 727 | drivers/scsi/sd.c | (SCpnt->host->unchecked_isa_dma)) { |
SCpnt | 733 | drivers/scsi/sd.c | this_count = SCpnt->request.current_nr_sectors; |
SCpnt | 737 | drivers/scsi/sd.c | if (SCpnt->request.cmd == WRITE) |
SCpnt | 738 | drivers/scsi/sd.c | memcpy(buff, (char *)SCpnt->request.buffer, this_count << 9); |
SCpnt | 742 | drivers/scsi/sd.c | printk("sd%c : %s %d/%d 512 byte blocks.\n", 'a' + MINOR(SCpnt->request.dev), |
SCpnt | 743 | drivers/scsi/sd.c | (SCpnt->request.cmd == WRITE) ? "writing" : "reading", |
SCpnt | 744 | drivers/scsi/sd.c | this_count, SCpnt->request.nr_sectors); |
SCpnt | 747 | drivers/scsi/sd.c | cmd[1] = (SCpnt->lun << 5) & 0xe0; |
SCpnt | 793 | drivers/scsi/sd.c | SCpnt->transfersize = rscsi_disks[dev].sector_size; |
SCpnt | 794 | drivers/scsi/sd.c | SCpnt->underflow = this_count << 9; |
SCpnt | 795 | drivers/scsi/sd.c | scsi_do_cmd (SCpnt, (void *) cmd, buff, |
SCpnt | 798 | drivers/scsi/sd.c | (SCpnt->device->type == TYPE_DISK ? |
SCpnt | 837 | drivers/scsi/sd.c | static void sd_init_done (Scsi_Cmnd * SCpnt) |
SCpnt | 841 | drivers/scsi/sd.c | req = &SCpnt->request; |
SCpnt | 855 | drivers/scsi/sd.c | Scsi_Cmnd * SCpnt; |
SCpnt | 861 | drivers/scsi/sd.c | SCpnt = allocate_device(NULL, rscsi_disks[i].device, 1); |
SCpnt | 872 | drivers/scsi/sd.c | SCpnt->request.dev = 0xffff; /* Mark as really busy again */ |
SCpnt | 873 | drivers/scsi/sd.c | SCpnt->cmd_len = 0; |
SCpnt | 874 | drivers/scsi/sd.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 875 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] = 0; |
SCpnt | 877 | drivers/scsi/sd.c | scsi_do_cmd (SCpnt, |
SCpnt | 882 | drivers/scsi/sd.c | while(SCpnt->request.dev != 0xfffe); |
SCpnt | 884 | drivers/scsi/sd.c | the_result = SCpnt->result; |
SCpnt | 889 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] == NOT_READY) { |
SCpnt | 898 | drivers/scsi/sd.c | SCpnt->request.dev = 0xffff; /* Mark as really busy again */ |
SCpnt | 899 | drivers/scsi/sd.c | SCpnt->cmd_len = 0; |
SCpnt | 900 | drivers/scsi/sd.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 901 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] = 0; |
SCpnt | 903 | drivers/scsi/sd.c | scsi_do_cmd (SCpnt, |
SCpnt | 908 | drivers/scsi/sd.c | while(SCpnt->request.dev != 0xfffe); |
SCpnt | 933 | drivers/scsi/sd.c | SCpnt->request.dev = 0xffff; /* Mark as really busy again */ |
SCpnt | 934 | drivers/scsi/sd.c | SCpnt->cmd_len = 0; |
SCpnt | 935 | drivers/scsi/sd.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 936 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] = 0; |
SCpnt | 938 | drivers/scsi/sd.c | scsi_do_cmd (SCpnt, |
SCpnt | 944 | drivers/scsi/sd.c | while(SCpnt->request.dev != 0xfffe); |
SCpnt | 946 | drivers/scsi/sd.c | if (SCpnt->request.dev != 0xfffe){ |
SCpnt | 948 | drivers/scsi/sd.c | SCpnt->request.sem = &sem; |
SCpnt | 951 | drivers/scsi/sd.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 954 | drivers/scsi/sd.c | the_result = SCpnt->result; |
SCpnt | 959 | drivers/scsi/sd.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 961 | drivers/scsi/sd.c | wake_up(&SCpnt->device->device_wait); |
SCpnt | 989 | drivers/scsi/sd.c | printk("sd%c : extended sense code = %1x \n", 'a' + i, SCpnt->sense_buffer[2] & 0xf); |
SCpnt | 1000 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] == NOT_READY) |
SCpnt | 514 | drivers/scsi/seagate.c | int seagate_st0x_queue_command (Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 520 | drivers/scsi/seagate.c | current_target = SCpnt->target; |
SCpnt | 521 | drivers/scsi/seagate.c | current_lun = SCpnt->lun; |
SCpnt | 522 | drivers/scsi/seagate.c | (const void *) current_cmnd = SCpnt->cmnd; |
SCpnt | 523 | drivers/scsi/seagate.c | current_data = (unsigned char *) SCpnt->request_buffer; |
SCpnt | 524 | drivers/scsi/seagate.c | current_bufflen = SCpnt->request_bufflen; |
SCpnt | 525 | drivers/scsi/seagate.c | SCint = SCpnt; |
SCpnt | 536 | drivers/scsi/seagate.c | current_cmnd[SCpnt->cmd_len] |= 0x01; |
SCpnt | 575 | drivers/scsi/seagate.c | int seagate_st0x_command (Scsi_Cmnd * SCpnt) { |
SCpnt | 576 | drivers/scsi/seagate.c | return internal_command (SCpnt->target, SCpnt->lun, SCpnt->cmnd, SCpnt->request_buffer, |
SCpnt | 577 | drivers/scsi/seagate.c | SCpnt->request_bufflen, |
SCpnt | 1551 | drivers/scsi/seagate.c | int seagate_st0x_abort (Scsi_Cmnd * SCpnt) |
SCpnt | 1562 | drivers/scsi/seagate.c | int seagate_st0x_reset (Scsi_Cmnd * SCpnt) |
SCpnt | 206 | drivers/scsi/sg.c | static void sg_command_done(Scsi_Cmnd * SCpnt) |
SCpnt | 208 | drivers/scsi/sg.c | int dev=SCpnt->request.dev; |
SCpnt | 213 | drivers/scsi/sg.c | SCpnt->request.dev=-1; |
SCpnt | 216 | drivers/scsi/sg.c | memcpy(device->header.sense_buffer, SCpnt->sense_buffer, sizeof(SCpnt->sense_buffer)); |
SCpnt | 217 | drivers/scsi/sg.c | if (SCpnt->sense_buffer[0]) |
SCpnt | 222 | drivers/scsi/sg.c | device->header.result=SCpnt->result; |
SCpnt | 224 | drivers/scsi/sg.c | SCpnt->request.dev=-1; |
SCpnt | 231 | drivers/scsi/sg.c | Scsi_Cmnd *SCpnt; |
SCpnt | 278 | drivers/scsi/sg.c | if (!(SCpnt=allocate_device(NULL,device->device, !(filp->f_flags & O_NONBLOCK)))) |
SCpnt | 290 | drivers/scsi/sg.c | SCpnt->request.dev=dev; |
SCpnt | 291 | drivers/scsi/sg.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 295 | drivers/scsi/sg.c | SCpnt->cmd_len = size; |
SCpnt | 315 | drivers/scsi/sg.c | scsi_do_cmd (SCpnt,(void *) cmnd, |
SCpnt | 61 | drivers/scsi/sr.c | void requeue_sr_request (Scsi_Cmnd * SCpnt); |
SCpnt | 140 | drivers/scsi/sr.c | static void rw_intr (Scsi_Cmnd * SCpnt) |
SCpnt | 142 | drivers/scsi/sr.c | int result = SCpnt->result; |
SCpnt | 143 | drivers/scsi/sr.c | int this_count = SCpnt->this_count; |
SCpnt | 146 | drivers/scsi/sr.c | printk("sr.c done: %x %x\n",result, SCpnt->request.bh->b_data); |
SCpnt | 150 | drivers/scsi/sr.c | if (SCpnt->use_sg == 0) { |
SCpnt | 151 | drivers/scsi/sr.c | if (SCpnt->buffer != SCpnt->request.buffer) |
SCpnt | 154 | drivers/scsi/sr.c | offset = (SCpnt->request.sector % 4) << 9; |
SCpnt | 155 | drivers/scsi/sr.c | memcpy((char *)SCpnt->request.buffer, |
SCpnt | 156 | drivers/scsi/sr.c | (char *)SCpnt->buffer + offset, |
SCpnt | 163 | drivers/scsi/sr.c | SCpnt->request.nr_sectors > this_count && |
SCpnt | 164 | drivers/scsi/sr.c | SCpnt->request.bh && |
SCpnt | 165 | drivers/scsi/sr.c | SCpnt->request.bh->b_reqnext && |
SCpnt | 166 | drivers/scsi/sr.c | SCpnt->request.bh->b_reqnext->b_size == 1024) { |
SCpnt | 167 | drivers/scsi/sr.c | memcpy((char *)SCpnt->request.bh->b_reqnext->b_data, |
SCpnt | 168 | drivers/scsi/sr.c | (char *)SCpnt->buffer + 1024, |
SCpnt | 173 | drivers/scsi/sr.c | scsi_free(SCpnt->buffer, 2048); |
SCpnt | 178 | drivers/scsi/sr.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 179 | drivers/scsi/sr.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 187 | drivers/scsi/sr.c | scsi_free(SCpnt->buffer, SCpnt->sglist_len); /* Free list of scatter-gather pointers */ |
SCpnt | 188 | drivers/scsi/sr.c | if(SCpnt->request.sector % 4) this_count -= 2; |
SCpnt | 190 | drivers/scsi/sr.c | if(this_count > SCpnt->request.nr_sectors) |
SCpnt | 195 | drivers/scsi/sr.c | printk("(%x %x %x) ",SCpnt->request.bh, SCpnt->request.nr_sectors, |
SCpnt | 198 | drivers/scsi/sr.c | if (SCpnt->request.nr_sectors > this_count) |
SCpnt | 200 | drivers/scsi/sr.c | SCpnt->request.errors = 0; |
SCpnt | 201 | drivers/scsi/sr.c | if (!SCpnt->request.bh) |
SCpnt | 203 | drivers/scsi/sr.c | SCpnt->request.sector, this_count); |
SCpnt | 206 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 1, this_count); /* All done */ |
SCpnt | 207 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 214 | drivers/scsi/sr.c | if (SCpnt->use_sg) { |
SCpnt | 217 | drivers/scsi/sr.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 218 | drivers/scsi/sr.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 223 | drivers/scsi/sr.c | scsi_free(SCpnt->buffer, SCpnt->sglist_len); /* Free list of scatter-gather pointers */ |
SCpnt | 225 | drivers/scsi/sr.c | if (SCpnt->buffer != SCpnt->request.buffer) |
SCpnt | 226 | drivers/scsi/sr.c | scsi_free(SCpnt->buffer, SCpnt->bufflen); |
SCpnt | 230 | drivers/scsi/sr.c | if ((SCpnt->sense_buffer[0] & 0x7f) == 0x70) { |
SCpnt | 231 | drivers/scsi/sr.c | if ((SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) { |
SCpnt | 235 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->changed = 1; |
SCpnt | 236 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, this_count); |
SCpnt | 237 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 242 | drivers/scsi/sr.c | if (SCpnt->sense_buffer[2] == ILLEGAL_REQUEST) { |
SCpnt | 244 | drivers/scsi/sr.c | print_sense("sr", SCpnt); |
SCpnt | 246 | drivers/scsi/sr.c | print_command(SCpnt->cmnd); |
SCpnt | 247 | drivers/scsi/sr.c | if (scsi_CDs[DEVICE_NR(SCpnt->request.dev)].ten) { |
SCpnt | 248 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].ten = 0; |
SCpnt | 249 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 253 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, this_count); |
SCpnt | 254 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); /* Do next request */ |
SCpnt | 260 | drivers/scsi/sr.c | if (SCpnt->sense_buffer[2] == NOT_READY) { |
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 | 271 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->host->host_no, |
SCpnt | 272 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->id, |
SCpnt | 273 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->lun, |
SCpnt | 277 | drivers/scsi/sr.c | print_sense("sr", SCpnt); |
SCpnt | 279 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.current_nr_sectors); |
SCpnt | 280 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 508 | drivers/scsi/sr.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 524 | drivers/scsi/sr.c | SCpnt = allocate_device(&CURRENT, |
SCpnt | 526 | drivers/scsi/sr.c | else SCpnt = NULL; |
SCpnt | 536 | drivers/scsi/sr.c | if (!SCpnt && sr_template.nr_dev > 1){ |
SCpnt | 543 | drivers/scsi/sr.c | SCpnt = request_queueable(req, |
SCpnt | 545 | drivers/scsi/sr.c | if(SCpnt) break; |
SCpnt | 549 | drivers/scsi/sr.c | if (SCpnt && req->dev == -1) { |
SCpnt | 558 | drivers/scsi/sr.c | if (!SCpnt) |
SCpnt | 564 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 568 | drivers/scsi/sr.c | void requeue_sr_request (Scsi_Cmnd * SCpnt) |
SCpnt | 577 | drivers/scsi/sr.c | if(!SCpnt || SCpnt->request.dev <= 0) { |
SCpnt | 582 | drivers/scsi/sr.c | dev = MINOR(SCpnt->request.dev); |
SCpnt | 583 | drivers/scsi/sr.c | block = SCpnt->request.sector; |
SCpnt | 590 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 598 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 609 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 614 | drivers/scsi/sr.c | switch (SCpnt->request.cmd) |
SCpnt | 617 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 624 | drivers/scsi/sr.c | panic ("Unknown sr command %d\n", SCpnt->request.cmd); |
SCpnt | 627 | drivers/scsi/sr.c | cmd[1] = (SCpnt->lun << 5) & 0xe0; |
SCpnt | 645 | drivers/scsi/sr.c | SCpnt->use_sg = 0; |
SCpnt | 647 | drivers/scsi/sr.c | if (SCpnt->host->sg_tablesize > 0 && |
SCpnt | 653 | drivers/scsi/sr.c | bh = SCpnt->request.bh; |
SCpnt | 659 | drivers/scsi/sr.c | this_count = SCpnt->request.sector % 4; |
SCpnt | 661 | drivers/scsi/sr.c | while(bh && count < SCpnt->host->sg_tablesize) { |
SCpnt | 670 | drivers/scsi/sr.c | if (count < SCpnt->host->sg_tablesize) { |
SCpnt | 679 | drivers/scsi/sr.c | SCpnt->use_sg = count; /* Number of chains */ |
SCpnt | 681 | drivers/scsi/sr.c | while( count < (SCpnt->use_sg * sizeof(struct scatterlist))) |
SCpnt | 683 | drivers/scsi/sr.c | SCpnt->sglist_len = count; |
SCpnt | 687 | drivers/scsi/sr.c | SCpnt->use_sg = 0; /* No memory left - bail out */ |
SCpnt | 691 | drivers/scsi/sr.c | bh = SCpnt->request.bh; |
SCpnt | 692 | drivers/scsi/sr.c | if(SCpnt->request.sector % 4) { |
SCpnt | 693 | drivers/scsi/sr.c | sgpnt[count].length = (SCpnt->request.sector % 4) << 9; |
SCpnt | 700 | drivers/scsi/sr.c | for(bh = SCpnt->request.bh; count < SCpnt->use_sg; |
SCpnt | 711 | drivers/scsi/sr.c | if (count+1 != SCpnt->use_sg) panic("Bad sr request list"); |
SCpnt | 715 | drivers/scsi/sr.c | ISA_DMA_THRESHOLD & (SCpnt->host->unchecked_isa_dma)) { |
SCpnt | 736 | drivers/scsi/sr.c | SCpnt->use_sg = 0; |
SCpnt | 737 | drivers/scsi/sr.c | scsi_free(buffer, SCpnt->sglist_len); |
SCpnt | 743 | drivers/scsi/sr.c | printk("SR: %d %d %d %d %d *** ",SCpnt->use_sg, SCpnt->request.sector, |
SCpnt | 745 | drivers/scsi/sr.c | SCpnt->request.current_nr_sectors, |
SCpnt | 746 | drivers/scsi/sr.c | SCpnt->request.nr_sectors); |
SCpnt | 747 | drivers/scsi/sr.c | for(count=0; count<SCpnt->use_sg; count++) |
SCpnt | 756 | drivers/scsi/sr.c | if (SCpnt->use_sg == 0){ |
SCpnt | 758 | drivers/scsi/sr.c | if (!SCpnt->request.bh) |
SCpnt | 759 | drivers/scsi/sr.c | this_count = SCpnt->request.nr_sectors; |
SCpnt | 761 | drivers/scsi/sr.c | this_count = (SCpnt->request.bh->b_size >> 9); |
SCpnt | 777 | drivers/scsi/sr.c | buffer = (unsigned char *) SCpnt->request.buffer; |
SCpnt | 779 | drivers/scsi/sr.c | (SCpnt->host->unchecked_isa_dma)) |
SCpnt | 829 | drivers/scsi/sr.c | printk("Use sg: %d\n", SCpnt->use_sg); |
SCpnt | 846 | drivers/scsi/sr.c | SCpnt->transfersize = (scsi_CDs[dev].sector_size > 1024) ? |
SCpnt | 849 | drivers/scsi/sr.c | SCpnt->this_count = this_count; |
SCpnt | 850 | drivers/scsi/sr.c | scsi_do_cmd (SCpnt, (void *) cmd, buffer, |
SCpnt | 892 | drivers/scsi/sr.c | static void sr_init_done (Scsi_Cmnd * SCpnt) |
SCpnt | 896 | drivers/scsi/sr.c | req = &SCpnt->request; |
SCpnt | 908 | drivers/scsi/sr.c | Scsi_Cmnd * SCpnt; |
SCpnt | 911 | drivers/scsi/sr.c | SCpnt = allocate_device(NULL, scsi_CDs[i].device, 1); |
SCpnt | 918 | drivers/scsi/sr.c | SCpnt->request.dev = 0xffff; /* Mark as really busy */ |
SCpnt | 919 | drivers/scsi/sr.c | SCpnt->cmd_len = 0; |
SCpnt | 923 | drivers/scsi/sr.c | scsi_do_cmd (SCpnt, |
SCpnt | 929 | drivers/scsi/sr.c | while(SCpnt->request.dev != 0xfffe); |
SCpnt | 931 | drivers/scsi/sr.c | if (SCpnt->request.dev != 0xfffe){ |
SCpnt | 933 | drivers/scsi/sr.c | SCpnt->request.sem = &sem; |
SCpnt | 936 | drivers/scsi/sr.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 939 | drivers/scsi/sr.c | the_result = SCpnt->result; |
SCpnt | 944 | drivers/scsi/sr.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 946 | drivers/scsi/sr.c | wake_up(&SCpnt->device->device_wait); |
SCpnt | 23 | drivers/scsi/sr_ioctl.c | static void sr_ioctl_done(Scsi_Cmnd * SCpnt) |
SCpnt | 27 | drivers/scsi/sr_ioctl.c | req = &SCpnt->request; |
SCpnt | 41 | drivers/scsi/sr_ioctl.c | Scsi_Cmnd * SCpnt; |
SCpnt | 44 | drivers/scsi/sr_ioctl.c | SCpnt = allocate_device(NULL, scsi_CDs[target].device, 1); |
SCpnt | 45 | drivers/scsi/sr_ioctl.c | scsi_do_cmd(SCpnt, |
SCpnt | 50 | drivers/scsi/sr_ioctl.c | if (SCpnt->request.dev != 0xfffe){ |
SCpnt | 52 | drivers/scsi/sr_ioctl.c | SCpnt->request.sem = &sem; |
SCpnt | 55 | drivers/scsi/sr_ioctl.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 58 | drivers/scsi/sr_ioctl.c | result = SCpnt->result; |
SCpnt | 62 | drivers/scsi/sr_ioctl.c | switch(SCpnt->sense_buffer[2] & 0xf) { |
SCpnt | 80 | drivers/scsi/sr_ioctl.c | sense_class(SCpnt->sense_buffer[0]), |
SCpnt | 81 | drivers/scsi/sr_ioctl.c | sense_error(SCpnt->sense_buffer[0]), |
SCpnt | 82 | drivers/scsi/sr_ioctl.c | SCpnt->sense_buffer[2] & 0xf); |
SCpnt | 86 | drivers/scsi/sr_ioctl.c | result = SCpnt->result; |
SCpnt | 87 | drivers/scsi/sr_ioctl.c | SCpnt->request.dev = -1; /* Deallocate */ |
SCpnt | 88 | drivers/scsi/sr_ioctl.c | wake_up(&SCpnt->device->device_wait); |
SCpnt | 110 | drivers/scsi/st.c | st_chk_result(Scsi_Cmnd * SCpnt) |
SCpnt | 112 | drivers/scsi/st.c | int dev = SCpnt->request.dev; |
SCpnt | 113 | drivers/scsi/st.c | int result = SCpnt->result; |
SCpnt | 114 | drivers/scsi/st.c | unsigned char * sense = SCpnt->sense_buffer, scode; |
SCpnt | 122 | drivers/scsi/st.c | SCpnt->cmnd[0], SCpnt->cmnd[1], SCpnt->cmnd[2], |
SCpnt | 123 | drivers/scsi/st.c | SCpnt->cmnd[3], SCpnt->cmnd[4], SCpnt->cmnd[5], |
SCpnt | 124 | drivers/scsi/st.c | SCpnt->request_bufflen); |
SCpnt | 126 | drivers/scsi/st.c | print_sense("st", SCpnt); |
SCpnt | 139 | drivers/scsi/st.c | print_sense("st", SCpnt); |
SCpnt | 147 | drivers/scsi/st.c | && SCpnt->cmnd[0] != WRITE_6 |
SCpnt | 148 | drivers/scsi/st.c | && SCpnt->cmnd[0] != WRITE_FILEMARKS |
SCpnt | 153 | drivers/scsi/st.c | if (SCpnt->cmnd[0] == READ_6) |
SCpnt | 155 | drivers/scsi/st.c | else if (SCpnt->cmnd[0] == WRITE_6) |
SCpnt | 169 | drivers/scsi/st.c | st_sleep_done (Scsi_Cmnd * SCpnt) |
SCpnt | 174 | drivers/scsi/st.c | if ((st_nbr = SCpnt->request.dev) < st_template.nr_dev && st_nbr >= 0) { |
SCpnt | 177 | drivers/scsi/st.c | (SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 178 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x40)) { |
SCpnt | 180 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x80) != 0) |
SCpnt | 181 | drivers/scsi/st.c | remainder = (SCpnt->sense_buffer[3] << 24) | |
SCpnt | 182 | drivers/scsi/st.c | (SCpnt->sense_buffer[4] << 16) | |
SCpnt | 183 | drivers/scsi/st.c | (SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6]; |
SCpnt | 186 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW || |
SCpnt | 188 | drivers/scsi/st.c | (STp->buffer)->last_result = SCpnt->result; /* Error */ |
SCpnt | 193 | drivers/scsi/st.c | (STp->buffer)->last_result = SCpnt->result; |
SCpnt | 194 | drivers/scsi/st.c | (STp->buffer)->last_result_fatal = st_chk_result(SCpnt); |
SCpnt | 196 | drivers/scsi/st.c | SCpnt->request.dev = -1; |
SCpnt | 198 | drivers/scsi/st.c | SCpnt->request.dev = 0xffff; |
SCpnt | 251 | drivers/scsi/st.c | Scsi_Cmnd *SCpnt; |
SCpnt | 261 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 262 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 263 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 264 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 271 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 274 | drivers/scsi/st.c | SCpnt->request.dev = -1; |
SCpnt | 294 | drivers/scsi/st.c | Scsi_Cmnd *SCpnt; |
SCpnt | 313 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 324 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 332 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 333 | drivers/scsi/st.c | scsi_do_cmd (SCpnt, |
SCpnt | 340 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 345 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 346 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x40) && |
SCpnt | 347 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) != VOLUME_OVERFLOW) { |
SCpnt | 362 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 423 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt; |
SCpnt | 459 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 460 | drivers/scsi/st.c | if (!SCpnt) { |
SCpnt | 465 | drivers/scsi/st.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 468 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 469 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 478 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 481 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 482 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == UNIT_ATTENTION) { /* New media? */ |
SCpnt | 484 | drivers/scsi/st.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 487 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 488 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 497 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 505 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 506 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == NO_TAPE) { |
SCpnt | 514 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 527 | drivers/scsi/st.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 530 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 531 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 539 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 542 | drivers/scsi/st.c | if (!SCpnt->result && !SCpnt->sense_buffer[0]) { |
SCpnt | 561 | drivers/scsi/st.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 565 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 566 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 574 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 585 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 660 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt; |
SCpnt | 679 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 681 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 685 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 686 | drivers/scsi/st.c | scsi_do_cmd( SCpnt, |
SCpnt | 694 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 699 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 703 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 751 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt; |
SCpnt | 815 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 851 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 852 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 853 | drivers/scsi/st.c | scsi_do_cmd (SCpnt, |
SCpnt | 861 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 869 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 870 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x40)) { |
SCpnt | 871 | drivers/scsi/st.c | if (STp->block_size != 0 && (SCpnt->sense_buffer[0] & 0x80) != 0) |
SCpnt | 872 | drivers/scsi/st.c | transfer = (SCpnt->sense_buffer[3] << 24) | |
SCpnt | 873 | drivers/scsi/st.c | (SCpnt->sense_buffer[4] << 16) | |
SCpnt | 874 | drivers/scsi/st.c | (SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6]; |
SCpnt | 876 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW) |
SCpnt | 914 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 944 | drivers/scsi/st.c | SCpnt->request.dev = -1; |
SCpnt | 967 | drivers/scsi/st.c | SCpnt->result = (STp->buffer)->last_result = -1; |
SCpnt | 968 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 969 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 970 | drivers/scsi/st.c | scsi_do_cmd (SCpnt, |
SCpnt | 976 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 991 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt; |
SCpnt | 1033 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 1062 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 1063 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 1064 | drivers/scsi/st.c | scsi_do_cmd (SCpnt, |
SCpnt | 1072 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 1083 | drivers/scsi/st.c | SCpnt->sense_buffer[0], SCpnt->sense_buffer[1], |
SCpnt | 1084 | drivers/scsi/st.c | SCpnt->sense_buffer[2], SCpnt->sense_buffer[3], |
SCpnt | 1085 | drivers/scsi/st.c | SCpnt->sense_buffer[4], SCpnt->sense_buffer[5], |
SCpnt | 1086 | drivers/scsi/st.c | SCpnt->sense_buffer[6], SCpnt->sense_buffer[7]); |
SCpnt | 1088 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70) { /* extended sense */ |
SCpnt | 1090 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[2] & 0xe0) != 0) { /* EOF, EOM, or ILI */ |
SCpnt | 1092 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x80) != 0) |
SCpnt | 1093 | drivers/scsi/st.c | transfer = (SCpnt->sense_buffer[3] << 24) | |
SCpnt | 1094 | drivers/scsi/st.c | (SCpnt->sense_buffer[4] << 16) | |
SCpnt | 1095 | drivers/scsi/st.c | (SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6]; |
SCpnt | 1099 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == MEDIUM_ERROR) |
SCpnt | 1102 | drivers/scsi/st.c | if (SCpnt->sense_buffer[2] & 0x20) { |
SCpnt | 1110 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 1114 | drivers/scsi/st.c | else if (SCpnt->sense_buffer[2] & 0x40) { |
SCpnt | 1127 | drivers/scsi/st.c | else if (SCpnt->sense_buffer[2] & 0x80) { |
SCpnt | 1147 | drivers/scsi/st.c | SCpnt->request.dev = -1; |
SCpnt | 1152 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == BLANK_CHECK) { |
SCpnt | 1167 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 1202 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 1221 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 1283 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt; |
SCpnt | 1599 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 1600 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 1601 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 1602 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 1610 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 1616 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 1664 | drivers/scsi/st.c | if (SCpnt->sense_buffer[2] & 0x40) { |
SCpnt | 1672 | drivers/scsi/st.c | (SCpnt->sense_buffer[3] << 24) + |
SCpnt | 1673 | drivers/scsi/st.c | (SCpnt->sense_buffer[4] << 16) + |
SCpnt | 1674 | drivers/scsi/st.c | (SCpnt->sense_buffer[5] << 8) + |
SCpnt | 1675 | drivers/scsi/st.c | SCpnt->sense_buffer[6] ); |
SCpnt | 1688 | drivers/scsi/st.c | if (SCpnt->sense_buffer[2] & 0x80) { /* Hit filemark */ |
SCpnt | 1700 | drivers/scsi/st.c | if (SCpnt->sense_buffer[2] & 0x80) { /* Hit filemark */ |
SCpnt | 1716 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == BLANK_CHECK) |
SCpnt | 1735 | drivers/scsi/st.c | Scsi_Cmnd *SCpnt; |
SCpnt | 1847 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 1849 | drivers/scsi/st.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 1859 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 1860 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 1861 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 1869 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 1895 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 53 | drivers/scsi/st.h | Scsi_Cmnd SCpnt; |
SCpnt | 238 | drivers/scsi/u14-34f.c | Scsi_Cmnd *SCpnt; |
SCpnt | 527 | drivers/scsi/u14-34f.c | static inline void build_sg_list(struct mscp *cpp, Scsi_Cmnd *SCpnt) { |
SCpnt | 531 | drivers/scsi/u14-34f.c | sgpnt = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 533 | drivers/scsi/u14-34f.c | for (k = 0; k < SCpnt->use_sg; k++) { |
SCpnt | 539 | drivers/scsi/u14-34f.c | cpp->use_sg = SCpnt->use_sg; |
SCpnt | 544 | drivers/scsi/u14-34f.c | int u14_34f_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) { |
SCpnt | 551 | drivers/scsi/u14-34f.c | j = ((struct hostdata *) SCpnt->host->hostdata)->board_number; |
SCpnt | 553 | drivers/scsi/u14-34f.c | if (!done) panic("%s: qcomm, pid %ld, null done.\n", BN(j), SCpnt->pid); |
SCpnt | 574 | drivers/scsi/u14-34f.c | else if (u14_34f_reset(SCpnt) == SCSI_RESET_SUCCESS) |
SCpnt | 577 | drivers/scsi/u14-34f.c | SCpnt->result = DID_BUS_BUSY << 16; |
SCpnt | 578 | drivers/scsi/u14-34f.c | SCpnt->host_scribble = NULL; |
SCpnt | 579 | drivers/scsi/u14-34f.c | printk("%s: qcomm, pid %ld, DID_BUS_BUSY, done.\n", BN(j), SCpnt->pid); |
SCpnt | 581 | drivers/scsi/u14-34f.c | done(SCpnt); |
SCpnt | 589 | drivers/scsi/u14-34f.c | SCpnt->scsi_done = done; |
SCpnt | 591 | drivers/scsi/u14-34f.c | SCpnt->host_scribble = (unsigned char *) &cpp->index; |
SCpnt | 594 | drivers/scsi/u14-34f.c | BN(j), i, SCpnt->target, SCpnt->pid); |
SCpnt | 598 | drivers/scsi/u14-34f.c | cpp->target = SCpnt->target; |
SCpnt | 599 | drivers/scsi/u14-34f.c | cpp->lun = SCpnt->lun; |
SCpnt | 600 | drivers/scsi/u14-34f.c | cpp->SCpnt = SCpnt; |
SCpnt | 601 | drivers/scsi/u14-34f.c | cpp->sense_addr = (unsigned int) SCpnt->sense_buffer; |
SCpnt | 602 | drivers/scsi/u14-34f.c | cpp->sense_len = sizeof SCpnt->sense_buffer; |
SCpnt | 604 | drivers/scsi/u14-34f.c | if (SCpnt->use_sg) { |
SCpnt | 606 | drivers/scsi/u14-34f.c | build_sg_list(cpp, SCpnt); |
SCpnt | 609 | drivers/scsi/u14-34f.c | cpp->data_address = (unsigned int)SCpnt->request_buffer; |
SCpnt | 610 | drivers/scsi/u14-34f.c | cpp->data_len = SCpnt->request_bufflen; |
SCpnt | 613 | drivers/scsi/u14-34f.c | cpp->scsi_cdbs_len = SCpnt->cmd_len; |
SCpnt | 614 | drivers/scsi/u14-34f.c | memcpy(cpp->scsi_cdbs, SCpnt->cmnd, cpp->scsi_cdbs_len); |
SCpnt | 617 | drivers/scsi/u14-34f.c | SCpnt->result = DID_ERROR << 16; |
SCpnt | 618 | drivers/scsi/u14-34f.c | SCpnt->host_scribble = NULL; |
SCpnt | 620 | drivers/scsi/u14-34f.c | BN(j), SCpnt->target, SCpnt->pid); |
SCpnt | 622 | drivers/scsi/u14-34f.c | done(SCpnt); |
SCpnt | 672 | drivers/scsi/u14-34f.c | if (SCarg != HD(j)->cp[i].SCpnt) |
SCpnt | 674 | drivers/scsi/u14-34f.c | BN(j), i, SCarg, HD(j)->cp[i].SCpnt); |
SCpnt | 698 | drivers/scsi/u14-34f.c | Scsi_Cmnd *SCpnt; |
SCpnt | 735 | drivers/scsi/u14-34f.c | SCpnt = HD(j)->cp[i].SCpnt; |
SCpnt | 738 | drivers/scsi/u14-34f.c | BN(j), i, SCpnt->pid); |
SCpnt | 740 | drivers/scsi/u14-34f.c | if (SCpnt == NULL) |
SCpnt | 743 | drivers/scsi/u14-34f.c | if (SCpnt->host_scribble == NULL) |
SCpnt | 746 | drivers/scsi/u14-34f.c | if (*(unsigned int *)SCpnt->host_scribble != i) |
SCpnt | 749 | drivers/scsi/u14-34f.c | if (SCpnt->scsi_done == NULL) |
SCpnt | 752 | drivers/scsi/u14-34f.c | if (SCpnt == SCarg) arg_done = TRUE; |
SCpnt | 780 | drivers/scsi/u14-34f.c | SCpnt = HD(j)->cp[i].SCpnt; |
SCpnt | 781 | drivers/scsi/u14-34f.c | SCpnt->result = DID_RESET << 16; |
SCpnt | 782 | drivers/scsi/u14-34f.c | SCpnt->host_scribble = NULL; |
SCpnt | 788 | drivers/scsi/u14-34f.c | BN(j), i, SCpnt->pid); |
SCpnt | 790 | drivers/scsi/u14-34f.c | SCpnt->scsi_done(SCpnt); |
SCpnt | 819 | drivers/scsi/u14-34f.c | Scsi_Cmnd *SCpnt; |
SCpnt | 881 | drivers/scsi/u14-34f.c | SCpnt = spp->SCpnt; |
SCpnt | 883 | drivers/scsi/u14-34f.c | if (SCpnt == NULL) |
SCpnt | 886 | drivers/scsi/u14-34f.c | if (SCpnt->host_scribble == NULL) |
SCpnt | 888 | drivers/scsi/u14-34f.c | BN(j), i, SCpnt->pid, SCpnt); |
SCpnt | 890 | drivers/scsi/u14-34f.c | if (*(unsigned int *)SCpnt->host_scribble != i) |
SCpnt | 892 | drivers/scsi/u14-34f.c | " irq %d.\n", BN(j), i, SCpnt->pid, |
SCpnt | 893 | drivers/scsi/u14-34f.c | *(unsigned int *)SCpnt->host_scribble, irq); |
SCpnt | 901 | drivers/scsi/u14-34f.c | if (tstatus == BUSY && SCpnt->device->type != TYPE_TAPE) |
SCpnt | 906 | drivers/scsi/u14-34f.c | && SCpnt->device->type == TYPE_DISK |
SCpnt | 907 | drivers/scsi/u14-34f.c | && HD(j)->target_reset[SCpnt->target]) |
SCpnt | 912 | drivers/scsi/u14-34f.c | && SCpnt->device->type == TYPE_DISK |
SCpnt | 913 | drivers/scsi/u14-34f.c | && (SCpnt->sense_buffer[2] & 0xf) == RECOVERED_ERROR) |
SCpnt | 920 | drivers/scsi/u14-34f.c | HD(j)->target_reset[SCpnt->target] = FALSE; |
SCpnt | 922 | drivers/scsi/u14-34f.c | if (spp->target_status && SCpnt->device->type == TYPE_DISK) |
SCpnt | 925 | drivers/scsi/u14-34f.c | SCpnt->target, SCpnt->lun, SCpnt->pid, |
SCpnt | 926 | drivers/scsi/u14-34f.c | spp->target_status, SCpnt->sense_buffer[2]); |
SCpnt | 928 | drivers/scsi/u14-34f.c | HD(j)->target_time_out[SCpnt->target] = 0; |
SCpnt | 933 | drivers/scsi/u14-34f.c | if (HD(j)->target_time_out[SCpnt->target] > 1) |
SCpnt | 937 | drivers/scsi/u14-34f.c | HD(j)->target_time_out[SCpnt->target]++; |
SCpnt | 947 | drivers/scsi/u14-34f.c | if (SCpnt->device->type != TYPE_TAPE) |
SCpnt | 968 | drivers/scsi/u14-34f.c | SCpnt->result = status | spp->target_status; |
SCpnt | 974 | drivers/scsi/u14-34f.c | if (SCpnt->result || do_trace) |
SCpnt | 984 | drivers/scsi/u14-34f.c | SCpnt->target, SCpnt->lun, SCpnt->pid, HD(j)->iocount); |
SCpnt | 987 | drivers/scsi/u14-34f.c | SCpnt->host_scribble = NULL; |
SCpnt | 990 | drivers/scsi/u14-34f.c | SCpnt->scsi_done(SCpnt); |
SCpnt | 287 | drivers/scsi/ultrastor.c | static inline void build_sg_list(struct mscp *, Scsi_Cmnd *SCpnt); |
SCpnt | 645 | drivers/scsi/ultrastor.c | static inline void build_sg_list(register struct mscp *mscp, Scsi_Cmnd *SCpnt) |
SCpnt | 651 | drivers/scsi/ultrastor.c | sl = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 652 | drivers/scsi/ultrastor.c | max = SCpnt->use_sg; |
SCpnt | 666 | drivers/scsi/ultrastor.c | int ultrastor_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 704 | drivers/scsi/ultrastor.c | my_mscp->ca = SCpnt->device->type != TYPE_TAPE; |
SCpnt | 705 | drivers/scsi/ultrastor.c | my_mscp->target_id = SCpnt->target; |
SCpnt | 707 | drivers/scsi/ultrastor.c | my_mscp->lun = SCpnt->lun; |
SCpnt | 708 | drivers/scsi/ultrastor.c | if (SCpnt->use_sg) { |
SCpnt | 711 | drivers/scsi/ultrastor.c | build_sg_list(my_mscp, SCpnt); |
SCpnt | 715 | drivers/scsi/ultrastor.c | my_mscp->transfer_data = (unsigned int)SCpnt->request_buffer; |
SCpnt | 716 | drivers/scsi/ultrastor.c | my_mscp->transfer_data_length = SCpnt->request_bufflen; |
SCpnt | 720 | drivers/scsi/ultrastor.c | my_mscp->length_of_sense_byte = sizeof SCpnt->sense_buffer; |
SCpnt | 721 | drivers/scsi/ultrastor.c | my_mscp->length_of_scsi_cdbs = SCpnt->cmd_len; |
SCpnt | 722 | drivers/scsi/ultrastor.c | memcpy(my_mscp->scsi_cdbs, SCpnt->cmnd, my_mscp->length_of_scsi_cdbs); |
SCpnt | 725 | drivers/scsi/ultrastor.c | my_mscp->sense_data = (unsigned int)&SCpnt->sense_buffer; |
SCpnt | 727 | drivers/scsi/ultrastor.c | my_mscp->SCint = SCpnt; |
SCpnt | 728 | drivers/scsi/ultrastor.c | SCpnt->host_scribble = (unsigned char *)my_mscp; |
SCpnt | 774 | drivers/scsi/ultrastor.c | SCpnt->result = status; |
SCpnt | 775 | drivers/scsi/ultrastor.c | done(SCpnt); |
SCpnt | 818 | drivers/scsi/ultrastor.c | int ultrastor_abort(Scsi_Cmnd *SCpnt) |
SCpnt | 833 | drivers/scsi/ultrastor.c | if(!SCpnt->host_scribble) |
SCpnt | 836 | drivers/scsi/ultrastor.c | mscp_index = ((struct mscp *)SCpnt->host_scribble) - config.mscp; |
SCpnt | 924 | drivers/scsi/ultrastor.c | if (config.mscp[mscp_index].SCint != SCpnt) |
SCpnt | 926 | drivers/scsi/ultrastor.c | config.mscp[mscp_index].SCint, SCpnt); |
SCpnt | 931 | drivers/scsi/ultrastor.c | if (config.mscp[mscp_index].SCint != SCpnt) panic("Bad abort"); |
SCpnt | 935 | drivers/scsi/ultrastor.c | SCpnt->result = DID_ABORT << 16; |
SCpnt | 937 | drivers/scsi/ultrastor.c | done(SCpnt); |
SCpnt | 943 | drivers/scsi/ultrastor.c | int ultrastor_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 340 | drivers/scsi/wd7000.c | Scsi_Cmnd *SCpnt; /* Scsi_Cmnd using this SCB */ |
SCpnt | 671 | drivers/scsi/wd7000.c | scbs[i].next = &(scbs[i+1]); scbs[i].SCpnt = NULL; |
SCpnt | 674 | drivers/scsi/wd7000.c | scbs[MAX_SCBS-1].SCpnt = NULL; |
SCpnt | 789 | drivers/scsi/wd7000.c | static void wd7000_scsi_done(Scsi_Cmnd * SCpnt) |
SCpnt | 792 | drivers/scsi/wd7000.c | printk("wd7000_scsi_done: %06x\n",(unsigned int) SCpnt); |
SCpnt | 794 | drivers/scsi/wd7000.c | SCpnt->SCp.phase = 0; |
SCpnt | 806 | drivers/scsi/wd7000.c | register Scsi_Cmnd *SCpnt; |
SCpnt | 863 | drivers/scsi/wd7000.c | SCpnt = scb->SCpnt; |
SCpnt | 864 | drivers/scsi/wd7000.c | if (--(SCpnt->SCp.phase) <= 0) { /* all scbs are done */ |
SCpnt | 868 | drivers/scsi/wd7000.c | SCpnt->result = errstatus; |
SCpnt | 872 | drivers/scsi/wd7000.c | SCpnt->scsi_done(SCpnt); |
SCpnt | 887 | drivers/scsi/wd7000.c | int wd7000_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 891 | drivers/scsi/wd7000.c | register unchar *cdb = (unchar *) SCpnt->cmnd; |
SCpnt | 894 | drivers/scsi/wd7000.c | Adapter *host = (Adapter *) SCpnt->host->hostdata; |
SCpnt | 896 | drivers/scsi/wd7000.c | cdblen = SCpnt->cmd_len; |
SCpnt | 897 | drivers/scsi/wd7000.c | idlun = ((SCpnt->target << 5) & 0xe0) | (SCpnt->lun & 7); |
SCpnt | 898 | drivers/scsi/wd7000.c | SCpnt->scsi_done = done; |
SCpnt | 899 | drivers/scsi/wd7000.c | SCpnt->SCp.phase = 1; |
SCpnt | 905 | drivers/scsi/wd7000.c | scb->SCpnt = SCpnt; /* so we can find stuff later */ |
SCpnt | 906 | drivers/scsi/wd7000.c | SCpnt->host_scribble = (unchar *) scb; |
SCpnt | 909 | drivers/scsi/wd7000.c | if (SCpnt->use_sg) { |
SCpnt | 910 | drivers/scsi/wd7000.c | struct scatterlist *sg = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 913 | drivers/scsi/wd7000.c | if (SCpnt->host->sg_tablesize == SG_NONE) { |
SCpnt | 917 | drivers/scsi/wd7000.c | printk("Using scatter/gather with %d elements.\n",SCpnt->use_sg); |
SCpnt | 923 | drivers/scsi/wd7000.c | any2scsi(scb->maxlen, SCpnt->use_sg * sizeof (Sgb) ); |
SCpnt | 925 | drivers/scsi/wd7000.c | for (i = 0; i < SCpnt->use_sg; i++) { |
SCpnt | 931 | drivers/scsi/wd7000.c | any2scsi(scb->dataptr, (int) SCpnt->request_buffer); |
SCpnt | 932 | drivers/scsi/wd7000.c | any2scsi(scb->maxlen, SCpnt->request_bufflen); |
SCpnt | 940 | drivers/scsi/wd7000.c | int wd7000_command(Scsi_Cmnd *SCpnt) |
SCpnt | 942 | drivers/scsi/wd7000.c | wd7000_queuecommand(SCpnt, wd7000_scsi_done); |
SCpnt | 944 | drivers/scsi/wd7000.c | while (SCpnt->SCp.phase > 0); /* phase counts scbs down to 0 */ |
SCpnt | 946 | drivers/scsi/wd7000.c | return SCpnt->result; |
SCpnt | 1179 | drivers/scsi/wd7000.c | int wd7000_abort(Scsi_Cmnd * SCpnt) |
SCpnt | 1181 | drivers/scsi/wd7000.c | Adapter *host = (Adapter *) SCpnt->host->hostdata; |
SCpnt | 1196 | drivers/scsi/wd7000.c | int wd7000_reset(Scsi_Cmnd * SCpnt) |