tag | line | file | source code |
SCpnt | 778 | drivers/scsi/aha152x.c | int aha152x_queue( Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 794 | drivers/scsi/aha152x.c | printk( "SCpnt (target = %d lun = %d cmnd = ", SCpnt->target, SCpnt->lun); |
SCpnt | 795 | drivers/scsi/aha152x.c | print_command(SCpnt->cmnd); |
SCpnt | 797 | drivers/scsi/aha152x.c | SCpnt->cmd_len, SCpnt->use_sg, SCpnt->request_bufflen ); |
SCpnt | 802 | drivers/scsi/aha152x.c | SCpnt->scsi_done = done; |
SCpnt | 810 | drivers/scsi/aha152x.c | SCpnt->SCp.phase = not_issued; |
SCpnt | 811 | drivers/scsi/aha152x.c | if (SCpnt->use_sg) |
SCpnt | 813 | drivers/scsi/aha152x.c | SCpnt->SCp.buffer = (struct scatterlist *)SCpnt->request_buffer; |
SCpnt | 814 | drivers/scsi/aha152x.c | SCpnt->SCp.ptr = SCpnt->SCp.buffer->address; |
SCpnt | 815 | drivers/scsi/aha152x.c | SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length; |
SCpnt | 816 | drivers/scsi/aha152x.c | SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1; |
SCpnt | 820 | drivers/scsi/aha152x.c | SCpnt->SCp.ptr = (char *)SCpnt->request_buffer; |
SCpnt | 821 | drivers/scsi/aha152x.c | SCpnt->SCp.this_residual = SCpnt->request_bufflen; |
SCpnt | 822 | drivers/scsi/aha152x.c | SCpnt->SCp.buffer = NULL; |
SCpnt | 823 | drivers/scsi/aha152x.c | SCpnt->SCp.buffers_residual = 0; |
SCpnt | 826 | drivers/scsi/aha152x.c | SCpnt->SCp.Status = CHECK_CONDITION; |
SCpnt | 827 | drivers/scsi/aha152x.c | SCpnt->SCp.Message = 0; |
SCpnt | 828 | drivers/scsi/aha152x.c | SCpnt->SCp.have_data_in = 0; |
SCpnt | 829 | drivers/scsi/aha152x.c | SCpnt->SCp.sent_command = 0; |
SCpnt | 842 | drivers/scsi/aha152x.c | append_SC( &issue_SC, SCpnt); |
SCpnt | 862 | drivers/scsi/aha152x.c | int aha152x_command( Scsi_Cmnd *SCpnt ) |
SCpnt | 872 | drivers/scsi/aha152x.c | int aha152x_abort( Scsi_Cmnd *SCpnt) |
SCpnt | 883 | drivers/scsi/aha152x.c | printk("aha152x: abort(), SCpnt=0x%08x, ", (unsigned int) SCpnt ); |
SCpnt | 891 | drivers/scsi/aha152x.c | ptr && ptr!=SCpnt; |
SCpnt | 912 | drivers/scsi/aha152x.c | if ( TESTLO(SSTAT1, BUSFREE) || (current_SC && current_SC!=SCpnt)) |
SCpnt | 937 | 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 | 686 | drivers/scsi/aha1542.c | return SCpnt->result; |
SCpnt | 1098 | drivers/scsi/aha1542.c | int aha1542_abort(Scsi_Cmnd * SCpnt) |
SCpnt | 1107 | drivers/scsi/aha1542.c | inb(STATUS(SCpnt->host->io_port)), |
SCpnt | 1108 | drivers/scsi/aha1542.c | inb(INTRFLAGS(SCpnt->host->io_port))); |
SCpnt | 1112 | drivers/scsi/aha1542.c | mb = HOSTDATA(SCpnt->host)->mb; |
SCpnt | 1113 | drivers/scsi/aha1542.c | mbi = HOSTDATA(SCpnt->host)->aha1542_last_mbi_used + 1; |
SCpnt | 1120 | drivers/scsi/aha1542.c | } while (mbi != HOSTDATA(SCpnt->host)->aha1542_last_mbi_used); |
SCpnt | 1125 | drivers/scsi/aha1542.c | SCpnt->host->irq); |
SCpnt | 1126 | drivers/scsi/aha1542.c | aha1542_intr_handle(SCpnt->host->irq, NULL); |
SCpnt | 1134 | drivers/scsi/aha1542.c | if(HOSTDATA(SCpnt->host)->SCint[i]) |
SCpnt | 1136 | drivers/scsi/aha1542.c | if(HOSTDATA(SCpnt->host)->SCint[i] == SCpnt) { |
SCpnt | 1137 | drivers/scsi/aha1542.c | printk("Timed out command pending for %4.4x\n", SCpnt->request.dev); |
SCpnt | 1138 | drivers/scsi/aha1542.c | if (HOSTDATA(SCpnt->host)->mb[i].status) { |
SCpnt | 1140 | drivers/scsi/aha1542.c | aha1542_out(SCpnt->host->io_port, &ahacmd, 1); |
SCpnt | 1143 | drivers/scsi/aha1542.c | printk("Other pending command %4.4x\n", SCpnt->request.dev); |
SCpnt | 1153 | drivers/scsi/aha1542.c | if (SCpnt == HOSTDATA(SCpnt->host)->SCint[mbo]){ |
SCpnt | 1155 | drivers/scsi/aha1542.c | aha1542_out(SCpnt->host->io_port, &ahacmd, 1); /* start scsi command */ |
SCpnt | 1169 | drivers/scsi/aha1542.c | int aha1542_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 1177 | drivers/scsi/aha1542.c | outb(SCRST, CONTROL(SCpnt->host->io_port)); |
SCpnt | 1182 | drivers/scsi/aha1542.c | if(HOSTDATA(SCpnt->host)->SCint[i] == SCpnt) |
SCpnt | 1184 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->ccb[i].op = 0x81; /* BUS DEVICE RESET */ |
SCpnt | 1186 | drivers/scsi/aha1542.c | aha1542_out(SCpnt->host->io_port, &ahacmd, 1); |
SCpnt | 1192 | drivers/scsi/aha1542.c | printk("Sent BUS DEVICE RESET to target %d\n", SCpnt->target); |
SCpnt | 1199 | drivers/scsi/aha1542.c | if(HOSTDATA(SCpnt->host)->SCint[i] && |
SCpnt | 1200 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->SCint[i]->target == SCpnt->target) |
SCpnt | 1203 | drivers/scsi/aha1542.c | SCtmp = HOSTDATA(SCpnt->host)->SCint[i]; |
SCpnt | 1206 | drivers/scsi/aha1542.c | printk("Sending DID_RESET for target %d\n", SCpnt->target); |
SCpnt | 1207 | drivers/scsi/aha1542.c | SCtmp->scsi_done(SCpnt); |
SCpnt | 1209 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->SCint[i] = NULL; |
SCpnt | 1210 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->mb[i].status = 0; |
SCpnt | 200 | drivers/scsi/aha1740.c | SCtmp = ecbptr->SCpnt; |
SCpnt | 246 | drivers/scsi/aha1740.c | int aha1740_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 249 | drivers/scsi/aha1740.c | unchar *cmd = (unchar *) SCpnt->cmnd; |
SCpnt | 250 | drivers/scsi/aha1740.c | unchar target = SCpnt->target; |
SCpnt | 252 | drivers/scsi/aha1740.c | void *buff = SCpnt->request_buffer; |
SCpnt | 253 | drivers/scsi/aha1740.c | int bufflen = SCpnt->request_bufflen; |
SCpnt | 260 | drivers/scsi/aha1740.c | if (bufflen != sizeof(SCpnt->sense_buffer)) |
SCpnt | 264 | drivers/scsi/aha1740.c | SCpnt->result = 0; |
SCpnt | 265 | drivers/scsi/aha1740.c | done(SCpnt); |
SCpnt | 278 | drivers/scsi/aha1740.c | for (i = 0; i < SCpnt->cmd_len; i++) printk("%02x ", cmd[i]); |
SCpnt | 308 | drivers/scsi/aha1740.c | ecb[ecbno].cdblen = SCpnt->cmd_len; /* SCSI Command Descriptor Block Length */ |
SCpnt | 318 | drivers/scsi/aha1740.c | if (SCpnt->use_sg) |
SCpnt | 327 | drivers/scsi/aha1740.c | SCpnt->host_scribble = (unsigned char *) scsi_malloc(512); |
SCpnt | 328 | drivers/scsi/aha1740.c | sgpnt = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 329 | drivers/scsi/aha1740.c | cptr = (struct aha1740_chain *) SCpnt->host_scribble; |
SCpnt | 331 | drivers/scsi/aha1740.c | for(i=0; i<SCpnt->use_sg; i++) |
SCpnt | 336 | drivers/scsi/aha1740.c | ecb[ecbno].datalen = SCpnt->use_sg * sizeof(struct aha1740_chain); |
SCpnt | 346 | drivers/scsi/aha1740.c | SCpnt->host_scribble = NULL; |
SCpnt | 350 | drivers/scsi/aha1740.c | ecb[ecbno].lun = SCpnt->lun; |
SCpnt | 358 | drivers/scsi/aha1740.c | ecb[ecbno].SCpnt = SCpnt; |
SCpnt | 409 | drivers/scsi/aha1740.c | static void internal_done(Scsi_Cmnd * SCpnt) |
SCpnt | 411 | drivers/scsi/aha1740.c | internal_done_errcode = SCpnt->result; |
SCpnt | 415 | drivers/scsi/aha1740.c | int aha1740_command(Scsi_Cmnd * SCpnt) |
SCpnt | 417 | drivers/scsi/aha1740.c | aha1740_queuecommand(SCpnt, internal_done); |
SCpnt | 484 | drivers/scsi/aha1740.c | int aha1740_abort(Scsi_Cmnd * SCpnt) |
SCpnt | 494 | 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 | 379 | drivers/scsi/constants.c | void print_sense(char * devclass, Scsi_Cmnd * SCpnt) |
SCpnt | 383 | drivers/scsi/constants.c | unsigned char * sense_buffer = SCpnt->sense_buffer; |
SCpnt | 385 | drivers/scsi/constants.c | int dev = SCpnt->request.dev; |
SCpnt | 393 | drivers/scsi/constants.c | if(s > sizeof(SCpnt->sense_buffer)) s = sizeof(SCpnt->sense_buffer); |
SCpnt | 255 | drivers/scsi/eata.c | Scsi_Cmnd *SCpnt; /* Address set in cp */ |
SCpnt | 282 | drivers/scsi/eata.c | Scsi_Cmnd *SCpnt; /* Address to be returned is sp */ |
SCpnt | 582 | drivers/scsi/eata.c | static inline void build_sg_list(struct mscp *cpp, Scsi_Cmnd *SCpnt) { |
SCpnt | 586 | drivers/scsi/eata.c | sgpnt = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 588 | drivers/scsi/eata.c | for (k = 0; k < SCpnt->use_sg; k++) { |
SCpnt | 594 | drivers/scsi/eata.c | cpp->data_len = htonl((SCpnt->use_sg * sizeof(struct sg_list))); |
SCpnt | 597 | drivers/scsi/eata.c | int eata2x_queuecommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) { |
SCpnt | 611 | drivers/scsi/eata.c | j = ((struct hostdata *) SCpnt->host->hostdata)->board_number; |
SCpnt | 613 | drivers/scsi/eata.c | if (!done) panic("%s: qcomm, pid %ld, null done.\n", BN(j), SCpnt->pid); |
SCpnt | 634 | drivers/scsi/eata.c | else if (eata2x_reset(SCpnt) == SCSI_RESET_SUCCESS) |
SCpnt | 637 | drivers/scsi/eata.c | SCpnt->result = DID_BUS_BUSY << 16; |
SCpnt | 638 | drivers/scsi/eata.c | SCpnt->host_scribble = NULL; |
SCpnt | 639 | drivers/scsi/eata.c | printk("%s: qcomm, pid %ld, DID_BUS_BUSY, done.\n", BN(j), SCpnt->pid); |
SCpnt | 641 | drivers/scsi/eata.c | done(SCpnt); |
SCpnt | 658 | drivers/scsi/eata.c | SCpnt->scsi_done = done; |
SCpnt | 660 | drivers/scsi/eata.c | SCpnt->host_scribble = (unsigned char *) &cpp->index; |
SCpnt | 663 | drivers/scsi/eata.c | BN(j), i, SCpnt->target, SCpnt->pid); |
SCpnt | 666 | drivers/scsi/eata.c | if (SCpnt->cmnd[0] == data_out_cmds[k]) { |
SCpnt | 675 | drivers/scsi/eata.c | cpp->target = SCpnt->target; |
SCpnt | 676 | drivers/scsi/eata.c | cpp->lun = SCpnt->lun; |
SCpnt | 677 | drivers/scsi/eata.c | cpp->SCpnt = SCpnt; |
SCpnt | 678 | drivers/scsi/eata.c | cpp->sense_addr = htonl((unsigned int) SCpnt->sense_buffer); |
SCpnt | 679 | drivers/scsi/eata.c | cpp->sense_len = sizeof SCpnt->sense_buffer; |
SCpnt | 681 | drivers/scsi/eata.c | if (SCpnt->use_sg) { |
SCpnt | 683 | drivers/scsi/eata.c | build_sg_list(cpp, SCpnt); |
SCpnt | 686 | drivers/scsi/eata.c | cpp->data_address = htonl((unsigned int) SCpnt->request_buffer); |
SCpnt | 687 | drivers/scsi/eata.c | cpp->data_len = htonl(SCpnt->request_bufflen); |
SCpnt | 690 | drivers/scsi/eata.c | memcpy(cpp->cdb, SCpnt->cmnd, SCpnt->cmd_len); |
SCpnt | 694 | drivers/scsi/eata.c | SCpnt->result = DID_ERROR << 16; |
SCpnt | 695 | drivers/scsi/eata.c | SCpnt->host_scribble = NULL; |
SCpnt | 697 | drivers/scsi/eata.c | BN(j), SCpnt->target, SCpnt->pid); |
SCpnt | 699 | drivers/scsi/eata.c | done(SCpnt); |
SCpnt | 743 | drivers/scsi/eata.c | if (SCarg != HD(j)->cp[i].SCpnt) |
SCpnt | 745 | drivers/scsi/eata.c | BN(j), i, SCarg, HD(j)->cp[i].SCpnt); |
SCpnt | 769 | drivers/scsi/eata.c | Scsi_Cmnd *SCpnt; |
SCpnt | 806 | drivers/scsi/eata.c | SCpnt = HD(j)->cp[i].SCpnt; |
SCpnt | 809 | drivers/scsi/eata.c | BN(j), i, SCpnt->pid); |
SCpnt | 811 | drivers/scsi/eata.c | if (SCpnt == NULL) |
SCpnt | 814 | drivers/scsi/eata.c | if (SCpnt->host_scribble == NULL) |
SCpnt | 817 | drivers/scsi/eata.c | if (*(unsigned int *)SCpnt->host_scribble != i) |
SCpnt | 820 | drivers/scsi/eata.c | if (SCpnt->scsi_done == NULL) |
SCpnt | 823 | drivers/scsi/eata.c | if (SCpnt == SCarg) arg_done = TRUE; |
SCpnt | 850 | drivers/scsi/eata.c | SCpnt = HD(j)->cp[i].SCpnt; |
SCpnt | 851 | drivers/scsi/eata.c | SCpnt->result = DID_RESET << 16; |
SCpnt | 852 | drivers/scsi/eata.c | SCpnt->host_scribble = NULL; |
SCpnt | 858 | drivers/scsi/eata.c | BN(j), i, SCpnt->pid); |
SCpnt | 860 | drivers/scsi/eata.c | SCpnt->scsi_done(SCpnt); |
SCpnt | 879 | drivers/scsi/eata.c | Scsi_Cmnd *SCpnt; |
SCpnt | 945 | drivers/scsi/eata.c | SCpnt = spp->SCpnt; |
SCpnt | 947 | drivers/scsi/eata.c | if (SCpnt == NULL) |
SCpnt | 950 | drivers/scsi/eata.c | if (SCpnt != cpp->SCpnt) |
SCpnt | 952 | drivers/scsi/eata.c | BN(j), i, SCpnt, cpp->SCpnt); |
SCpnt | 954 | drivers/scsi/eata.c | if (SCpnt->host_scribble == NULL) |
SCpnt | 956 | drivers/scsi/eata.c | BN(j), i, SCpnt->pid, SCpnt); |
SCpnt | 958 | drivers/scsi/eata.c | if (*(unsigned int *)SCpnt->host_scribble != i) |
SCpnt | 960 | drivers/scsi/eata.c | " irq %d.\n", BN(j), i, SCpnt->pid, |
SCpnt | 961 | drivers/scsi/eata.c | *(unsigned int *)SCpnt->host_scribble, irq); |
SCpnt | 969 | drivers/scsi/eata.c | if (tstatus == BUSY && SCpnt->device->type != TYPE_TAPE) |
SCpnt | 974 | drivers/scsi/eata.c | && SCpnt->device->type == TYPE_DISK |
SCpnt | 975 | drivers/scsi/eata.c | && HD(j)->target_reset[SCpnt->target]) |
SCpnt | 980 | drivers/scsi/eata.c | && SCpnt->device->type == TYPE_DISK |
SCpnt | 981 | drivers/scsi/eata.c | && (SCpnt->sense_buffer[2] & 0xf) == RECOVERED_ERROR) |
SCpnt | 988 | drivers/scsi/eata.c | HD(j)->target_reset[SCpnt->target] = FALSE; |
SCpnt | 990 | drivers/scsi/eata.c | if (spp->target_status && SCpnt->device->type == TYPE_DISK) |
SCpnt | 993 | drivers/scsi/eata.c | SCpnt->target, SCpnt->lun, SCpnt->pid, |
SCpnt | 994 | drivers/scsi/eata.c | spp->target_status, SCpnt->sense_buffer[2]); |
SCpnt | 996 | drivers/scsi/eata.c | HD(j)->target_time_out[SCpnt->target] = 0; |
SCpnt | 1002 | drivers/scsi/eata.c | if (HD(j)->target_time_out[SCpnt->target] > 1) |
SCpnt | 1006 | drivers/scsi/eata.c | HD(j)->target_time_out[SCpnt->target]++; |
SCpnt | 1013 | drivers/scsi/eata.c | if (SCpnt->device->type != TYPE_TAPE) |
SCpnt | 1035 | drivers/scsi/eata.c | SCpnt->result = status | spp->target_status; |
SCpnt | 1041 | drivers/scsi/eata.c | if (SCpnt->result || do_trace) |
SCpnt | 1051 | drivers/scsi/eata.c | SCpnt->target, SCpnt->lun, SCpnt->pid, HD(j)->iocount); |
SCpnt | 1054 | drivers/scsi/eata.c | SCpnt->host_scribble = NULL; |
SCpnt | 1057 | drivers/scsi/eata.c | SCpnt->scsi_done(SCpnt); |
SCpnt | 105 | drivers/scsi/eata_dma.c | void eata_scsi_done (Scsi_Cmnd * SCpnt) |
SCpnt | 93 | drivers/scsi/eata_pio.c | void eata_pio_scsi_done (Scsi_Cmnd * SCpnt) |
SCpnt | 1540 | drivers/scsi/fdomain.c | int fdomain_16x0_queue( Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 1547 | drivers/scsi/fdomain.c | SCpnt->target, |
SCpnt | 1548 | drivers/scsi/fdomain.c | *(unsigned char *)SCpnt->cmnd, |
SCpnt | 1549 | drivers/scsi/fdomain.c | SCpnt->use_sg, |
SCpnt | 1550 | drivers/scsi/fdomain.c | SCpnt->request_bufflen ); |
SCpnt | 1555 | drivers/scsi/fdomain.c | current_SC = SCpnt; /* Save this for the done function */ |
SCpnt | 1598 | drivers/scsi/fdomain.c | static void internal_done( Scsi_Cmnd *SCpnt ) |
SCpnt | 1600 | drivers/scsi/fdomain.c | internal_done_errcode = SCpnt->result; |
SCpnt | 1604 | drivers/scsi/fdomain.c | int fdomain_16x0_command( Scsi_Cmnd *SCpnt ) |
SCpnt | 1606 | drivers/scsi/fdomain.c | fdomain_16x0_queue( SCpnt, internal_done ); |
SCpnt | 1616 | drivers/scsi/fdomain.c | void print_info( Scsi_Cmnd *SCpnt ) |
SCpnt | 1622 | drivers/scsi/fdomain.c | if (!SCpnt || !SCpnt->host) { |
SCpnt | 1626 | drivers/scsi/fdomain.c | printk( "%s\n", fdomain_16x0_info( SCpnt->host ) ); |
SCpnt | 1627 | drivers/scsi/fdomain.c | print_banner( SCpnt->host ); |
SCpnt | 1628 | drivers/scsi/fdomain.c | switch (SCpnt->SCp.phase) { |
SCpnt | 1636 | drivers/scsi/fdomain.c | SCpnt->SCp.phase, |
SCpnt | 1637 | drivers/scsi/fdomain.c | SCpnt->target, |
SCpnt | 1638 | drivers/scsi/fdomain.c | *(unsigned char *)SCpnt->cmnd, |
SCpnt | 1639 | drivers/scsi/fdomain.c | SCpnt->use_sg, |
SCpnt | 1640 | drivers/scsi/fdomain.c | SCpnt->request_bufflen ); |
SCpnt | 1642 | drivers/scsi/fdomain.c | SCpnt->SCp.sent_command, |
SCpnt | 1643 | drivers/scsi/fdomain.c | SCpnt->SCp.have_data_in, |
SCpnt | 1644 | drivers/scsi/fdomain.c | SCpnt->timeout ); |
SCpnt | 1685 | drivers/scsi/fdomain.c | int fdomain_16x0_abort( Scsi_Cmnd *SCpnt) |
SCpnt | 1703 | drivers/scsi/fdomain.c | print_info( SCpnt ); |
SCpnt | 1720 | drivers/scsi/fdomain.c | int fdomain_16x0_reset( Scsi_Cmnd *SCpnt ) |
SCpnt | 1727 | drivers/scsi/fdomain.c | if (SCpnt) printk( "fdomain: SCSI Bus Reset\n" ); |
SCpnt | 412 | drivers/scsi/in2000.c | int in2000_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 415 | drivers/scsi/in2000.c | unchar *cmd = (unchar *) SCpnt->cmnd; |
SCpnt | 416 | drivers/scsi/in2000.c | unchar target = SCpnt->target; |
SCpnt | 417 | drivers/scsi/in2000.c | void *buff = SCpnt->request_buffer; |
SCpnt | 419 | drivers/scsi/in2000.c | int bufflen = SCpnt->request_bufflen; |
SCpnt | 446 | drivers/scsi/in2000.c | for (i = 0; i < SCpnt->cmd_len; i++) printk("%02x ", cmd[i]); |
SCpnt | 452 | drivers/scsi/in2000.c | size = SCpnt->cmd_len; /* CDB length */ |
SCpnt | 491 | drivers/scsi/in2000.c | SCpnt->result = DID_TIME_OUT << 16; |
SCpnt | 492 | drivers/scsi/in2000.c | (*done)(SCpnt); |
SCpnt | 496 | drivers/scsi/in2000.c | in2000_nsegment = SCpnt->use_sg; |
SCpnt | 498 | drivers/scsi/in2000.c | if(SCpnt->use_sg){ |
SCpnt | 508 | drivers/scsi/in2000.c | in2000_SCptr = SCpnt; |
SCpnt | 516 | drivers/scsi/in2000.c | outb(SCpnt->lun & 7,INDATA); |
SCpnt | 517 | drivers/scsi/in2000.c | SCpnt->host_scribble = NULL; |
SCpnt | 561 | drivers/scsi/in2000.c | static void internal_done(Scsi_Cmnd * SCpnt) |
SCpnt | 563 | drivers/scsi/in2000.c | internal_done_errcode = SCpnt->result; |
SCpnt | 567 | drivers/scsi/in2000.c | int in2000_command(Scsi_Cmnd * SCpnt) |
SCpnt | 569 | drivers/scsi/in2000.c | in2000_queuecommand(SCpnt, internal_done); |
SCpnt | 648 | drivers/scsi/in2000.c | int in2000_abort(Scsi_Cmnd * SCpnt) |
SCpnt | 665 | drivers/scsi/in2000.c | int in2000_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 682 | drivers/scsi/in2000.c | if(SCpnt) SCpnt->flags |= NEEDS_JUMPSTART; |
SCpnt | 63 | drivers/scsi/scsi.c | static void scsi_done (Scsi_Cmnd *SCpnt); |
SCpnt | 66 | drivers/scsi/scsi.c | static void scsi_times_out (Scsi_Cmnd * SCpnt, int pid); |
SCpnt | 327 | drivers/scsi/scsi.c | static void scan_scsis_done (Scsi_Cmnd * SCpnt) |
SCpnt | 331 | drivers/scsi/scsi.c | printk ("scan_scsis_done(%p, %06x)\n", SCpnt->host, SCpnt->result); |
SCpnt | 333 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xfffe; |
SCpnt | 335 | drivers/scsi/scsi.c | if (SCpnt->request.sem != NULL) |
SCpnt | 336 | drivers/scsi/scsi.c | up(SCpnt->request.sem); |
SCpnt | 371 | drivers/scsi/scsi.c | Scsi_Cmnd *SCpnt; |
SCpnt | 376 | drivers/scsi/scsi.c | SCpnt = (Scsi_Cmnd *) scsi_init_malloc(sizeof(Scsi_Cmnd), GFP_ATOMIC|GFP_DMA); |
SCpnt | 391 | drivers/scsi/scsi.c | shpnt->host_queue = SCpnt; /* We need this so that commands can time out */ |
SCpnt | 435 | drivers/scsi/scsi.c | memset(SCpnt, 0, sizeof(Scsi_Cmnd)); |
SCpnt | 436 | drivers/scsi/scsi.c | SCpnt->host = SDpnt->host; |
SCpnt | 437 | drivers/scsi/scsi.c | SCpnt->device = SDpnt; |
SCpnt | 438 | drivers/scsi/scsi.c | SCpnt->target = SDpnt->id; |
SCpnt | 439 | drivers/scsi/scsi.c | SCpnt->lun = SDpnt->lun; |
SCpnt | 440 | drivers/scsi/scsi.c | SCpnt->channel = SDpnt->channel; |
SCpnt | 443 | drivers/scsi/scsi.c | SCpnt->request.sem = NULL; |
SCpnt | 445 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xffff; /* Mark not busy */ |
SCpnt | 447 | drivers/scsi/scsi.c | scsi_do_cmd (SCpnt, (void *) scsi_cmd, |
SCpnt | 457 | drivers/scsi/scsi.c | while (SCpnt->request.dev != 0xfffe) |
SCpnt | 459 | drivers/scsi/scsi.c | else if (SCpnt->request.dev != 0xfffe) { |
SCpnt | 462 | drivers/scsi/scsi.c | SCpnt->request.sem = &sem; |
SCpnt | 466 | drivers/scsi/scsi.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 471 | drivers/scsi/scsi.c | printk("scsi: return code %08x\n", SCpnt->result); |
SCpnt | 474 | drivers/scsi/scsi.c | if(SCpnt->result) { |
SCpnt | 475 | drivers/scsi/scsi.c | if (((driver_byte(SCpnt->result) & DRIVER_SENSE) || |
SCpnt | 476 | drivers/scsi/scsi.c | (status_byte(SCpnt->result) & CHECK_CONDITION)) && |
SCpnt | 477 | drivers/scsi/scsi.c | ((SCpnt->sense_buffer[0] & 0x70) >> 4) == 7) { |
SCpnt | 478 | drivers/scsi/scsi.c | if (SCpnt->sense_buffer[2] &0xe0) |
SCpnt | 480 | drivers/scsi/scsi.c | if(((SCpnt->sense_buffer[2] & 0xf) != NOT_READY) && |
SCpnt | 481 | drivers/scsi/scsi.c | ((SCpnt->sense_buffer[2] & 0xf) != UNIT_ATTENTION)) |
SCpnt | 502 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xffff; /* Mark not busy */ |
SCpnt | 503 | drivers/scsi/scsi.c | SCpnt->cmd_len = 0; |
SCpnt | 505 | drivers/scsi/scsi.c | scsi_do_cmd (SCpnt, (void *) scsi_cmd, |
SCpnt | 510 | drivers/scsi/scsi.c | while (SCpnt->request.dev != 0xfffe) |
SCpnt | 512 | drivers/scsi/scsi.c | else if (SCpnt->request.dev != 0xfffe) { |
SCpnt | 515 | drivers/scsi/scsi.c | SCpnt->request.sem = &sem; |
SCpnt | 519 | drivers/scsi/scsi.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 522 | drivers/scsi/scsi.c | the_result = SCpnt->result; |
SCpnt | 673 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xffff; /* Mark not busy */ |
SCpnt | 674 | drivers/scsi/scsi.c | SCpnt->cmd_len = 0; |
SCpnt | 676 | drivers/scsi/scsi.c | scsi_do_cmd (SCpnt, (void *) scsi_cmd, |
SCpnt | 681 | drivers/scsi/scsi.c | while (SCpnt->request.dev != 0xfffe); |
SCpnt | 682 | drivers/scsi/scsi.c | else if (SCpnt->request.dev != 0xfffe) { |
SCpnt | 685 | drivers/scsi/scsi.c | SCpnt->request.sem = &sem; |
SCpnt | 689 | drivers/scsi/scsi.c | while (SCpnt->request.dev != 0xfffe) |
SCpnt | 760 | drivers/scsi/scsi.c | if(SCpnt != NULL) |
SCpnt | 761 | drivers/scsi/scsi.c | scsi_init_free((char *) SCpnt, sizeof(Scsi_Cmnd)); |
SCpnt | 784 | drivers/scsi/scsi.c | static void scsi_times_out (Scsi_Cmnd * SCpnt, int pid) |
SCpnt | 787 | drivers/scsi/scsi.c | switch (SCpnt->internal_timeout & (IN_ABORT | IN_RESET)) |
SCpnt | 796 | drivers/scsi/scsi.c | if (!scsi_abort (SCpnt, DID_TIME_OUT, pid)) |
SCpnt | 800 | drivers/scsi/scsi.c | SCpnt->host->host_no); |
SCpnt | 801 | drivers/scsi/scsi.c | if (!scsi_reset (SCpnt)) |
SCpnt | 809 | drivers/scsi/scsi.c | printk("Unable to reset scsi host %d - ", SCpnt->host->host_no); |
SCpnt | 829 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 840 | drivers/scsi/scsi.c | SCpnt = device->host->host_queue; |
SCpnt | 848 | drivers/scsi/scsi.c | SCpnt = device->host->host_queue; |
SCpnt | 850 | drivers/scsi/scsi.c | while(SCpnt){ |
SCpnt | 851 | drivers/scsi/scsi.c | if(SCpnt->target == device->id && |
SCpnt | 852 | drivers/scsi/scsi.c | SCpnt->lun == device->lun) { |
SCpnt | 853 | drivers/scsi/scsi.c | if(SCpnt->request.dev < 0) break; |
SCpnt | 855 | drivers/scsi/scsi.c | SCpnt = SCpnt->next; |
SCpnt | 858 | drivers/scsi/scsi.c | while(SCpnt){ |
SCpnt | 859 | drivers/scsi/scsi.c | if(SCpnt->target == device->id) { |
SCpnt | 860 | drivers/scsi/scsi.c | if (SCpnt->lun == device->lun) { |
SCpnt | 862 | drivers/scsi/scsi.c | && SCpnt->request.dev < 0) |
SCpnt | 864 | drivers/scsi/scsi.c | found=SCpnt; |
SCpnt | 867 | drivers/scsi/scsi.c | if(SCpnt->request.dev >= 0) { |
SCpnt | 876 | drivers/scsi/scsi.c | SCpnt = SCpnt->next; |
SCpnt | 878 | drivers/scsi/scsi.c | SCpnt = found; |
SCpnt | 881 | drivers/scsi/scsi.c | if (!SCpnt) return NULL; |
SCpnt | 886 | drivers/scsi/scsi.c | memcpy(&SCpnt->request, req, sizeof(struct request)); |
SCpnt | 903 | drivers/scsi/scsi.c | SCpnt->request.bhtail = bh; |
SCpnt | 909 | drivers/scsi/scsi.c | SCpnt->request.nr_sectors -= req->nr_sectors; |
SCpnt | 912 | drivers/scsi/scsi.c | SCpnt->request.sem = NULL; /* Wait until whole thing done */ |
SCpnt | 918 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xffff; /* Busy, but no request */ |
SCpnt | 919 | drivers/scsi/scsi.c | SCpnt->request.sem = NULL; /* And no one is waiting for the device |
SCpnt | 923 | drivers/scsi/scsi.c | SCpnt->use_sg = 0; /* Reset the scatter-gather flag */ |
SCpnt | 924 | drivers/scsi/scsi.c | SCpnt->old_use_sg = 0; |
SCpnt | 925 | drivers/scsi/scsi.c | SCpnt->transfersize = 0; |
SCpnt | 926 | drivers/scsi/scsi.c | SCpnt->underflow = 0; |
SCpnt | 927 | drivers/scsi/scsi.c | SCpnt->cmd_len = 0; |
SCpnt | 932 | drivers/scsi/scsi.c | SCpnt->channel = device->channel; |
SCpnt | 933 | drivers/scsi/scsi.c | SCpnt->lun = device->lun; |
SCpnt | 934 | drivers/scsi/scsi.c | SCpnt->target = device->id; |
SCpnt | 936 | drivers/scsi/scsi.c | return SCpnt; |
SCpnt | 958 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 975 | drivers/scsi/scsi.c | SCpnt = device->host->host_queue; |
SCpnt | 977 | drivers/scsi/scsi.c | while(SCpnt){ |
SCpnt | 978 | drivers/scsi/scsi.c | if(SCpnt->target == device->id && |
SCpnt | 979 | drivers/scsi/scsi.c | SCpnt->lun == device->lun) { |
SCpnt | 980 | drivers/scsi/scsi.c | if(SCpnt->request.dev < 0) break; |
SCpnt | 982 | drivers/scsi/scsi.c | SCpnt = SCpnt->next; |
SCpnt | 985 | drivers/scsi/scsi.c | while(SCpnt){ |
SCpnt | 986 | drivers/scsi/scsi.c | if(SCpnt->target == device->id) { |
SCpnt | 987 | drivers/scsi/scsi.c | if (SCpnt->lun == device->lun) { |
SCpnt | 989 | drivers/scsi/scsi.c | && SCpnt->request.dev < 0) |
SCpnt | 991 | drivers/scsi/scsi.c | found=SCpnt; |
SCpnt | 994 | drivers/scsi/scsi.c | if(SCpnt->request.dev >= 0) { |
SCpnt | 1004 | drivers/scsi/scsi.c | SCpnt = SCpnt->next; |
SCpnt | 1006 | drivers/scsi/scsi.c | SCpnt = found; |
SCpnt | 1017 | drivers/scsi/scsi.c | if (!SCpnt || SCpnt->request.dev >= 0) /* Might have changed */ |
SCpnt | 1030 | drivers/scsi/scsi.c | memcpy(&SCpnt->request, req, sizeof(struct request)); |
SCpnt | 1047 | drivers/scsi/scsi.c | SCpnt->request.bhtail = bh; |
SCpnt | 1052 | drivers/scsi/scsi.c | SCpnt->request.nr_sectors -= req->nr_sectors; |
SCpnt | 1055 | drivers/scsi/scsi.c | SCpnt->request.sem = NULL; /* Wait until whole thing done*/ |
SCpnt | 1064 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xffff; /* Busy */ |
SCpnt | 1065 | drivers/scsi/scsi.c | SCpnt->request.sem = NULL; /* And no one is waiting for this |
SCpnt | 1073 | drivers/scsi/scsi.c | SCpnt->use_sg = 0; /* Reset the scatter-gather flag */ |
SCpnt | 1074 | drivers/scsi/scsi.c | SCpnt->old_use_sg = 0; |
SCpnt | 1075 | drivers/scsi/scsi.c | SCpnt->transfersize = 0; /* No default transfer size */ |
SCpnt | 1076 | drivers/scsi/scsi.c | SCpnt->cmd_len = 0; |
SCpnt | 1078 | drivers/scsi/scsi.c | SCpnt->underflow = 0; /* Do not flag underflow conditions */ |
SCpnt | 1083 | drivers/scsi/scsi.c | SCpnt->channel = device->channel; |
SCpnt | 1084 | drivers/scsi/scsi.c | SCpnt->lun = device->lun; |
SCpnt | 1085 | drivers/scsi/scsi.c | SCpnt->target = device->id; |
SCpnt | 1087 | drivers/scsi/scsi.c | return SCpnt; |
SCpnt | 1094 | drivers/scsi/scsi.c | inline void internal_cmnd (Scsi_Cmnd * SCpnt) |
SCpnt | 1103 | drivers/scsi/scsi.c | host = SCpnt->host; |
SCpnt | 1115 | drivers/scsi/scsi.c | update_timeout(SCpnt, SCpnt->timeout_per_command); |
SCpnt | 1124 | drivers/scsi/scsi.c | SCpnt->host->host_no, SCpnt->channel, SCpnt->target, SCpnt->cmnd, |
SCpnt | 1125 | drivers/scsi/scsi.c | SCpnt->buffer, SCpnt->bufflen, SCpnt->done); |
SCpnt | 1143 | drivers/scsi/scsi.c | if(!intr_count && SCpnt->host->irq) |
SCpnt | 1144 | drivers/scsi/scsi.c | disable_irq(SCpnt->host->irq); |
SCpnt | 1146 | drivers/scsi/scsi.c | host->hostt->queuecommand (SCpnt, scsi_done); |
SCpnt | 1148 | drivers/scsi/scsi.c | if(!intr_count && SCpnt->host->irq) |
SCpnt | 1149 | drivers/scsi/scsi.c | enable_irq(SCpnt->host->irq); |
SCpnt | 1157 | drivers/scsi/scsi.c | temp=host->hostt->command (SCpnt); |
SCpnt | 1158 | drivers/scsi/scsi.c | SCpnt->result = temp; |
SCpnt | 1165 | drivers/scsi/scsi.c | scsi_done(SCpnt); |
SCpnt | 1172 | drivers/scsi/scsi.c | static void scsi_request_sense (Scsi_Cmnd * SCpnt) |
SCpnt | 1178 | drivers/scsi/scsi.c | SCpnt->flags |= WAS_SENSE | ASKED_FOR_SENSE; |
SCpnt | 1179 | drivers/scsi/scsi.c | update_timeout(SCpnt, SENSE_TIMEOUT); |
SCpnt | 1183 | drivers/scsi/scsi.c | memcpy ((void *) SCpnt->cmnd , (void *) generic_sense, |
SCpnt | 1186 | drivers/scsi/scsi.c | SCpnt->cmnd[1] = SCpnt->lun << 5; |
SCpnt | 1187 | drivers/scsi/scsi.c | SCpnt->cmnd[4] = sizeof(SCpnt->sense_buffer); |
SCpnt | 1189 | drivers/scsi/scsi.c | SCpnt->request_buffer = &SCpnt->sense_buffer; |
SCpnt | 1190 | drivers/scsi/scsi.c | SCpnt->request_bufflen = sizeof(SCpnt->sense_buffer); |
SCpnt | 1191 | drivers/scsi/scsi.c | SCpnt->use_sg = 0; |
SCpnt | 1192 | drivers/scsi/scsi.c | SCpnt->cmd_len = COMMAND_SIZE(SCpnt->cmnd[0]); |
SCpnt | 1193 | drivers/scsi/scsi.c | internal_cmnd (SCpnt); |
SCpnt | 1205 | drivers/scsi/scsi.c | void scsi_do_cmd (Scsi_Cmnd * SCpnt, const void *cmnd , |
SCpnt | 1210 | drivers/scsi/scsi.c | struct Scsi_Host * host = SCpnt->host; |
SCpnt | 1215 | drivers/scsi/scsi.c | int target = SCpnt->target; |
SCpnt | 1219 | drivers/scsi/scsi.c | "command : " , host->host_no, SCpnt->channel, target, buffer, |
SCpnt | 1243 | drivers/scsi/scsi.c | SCpnt->pid = scsi_pid++; |
SCpnt | 1263 | drivers/scsi/scsi.c | memcpy ((void *) SCpnt->data_cmnd , (void *) cmnd, 12); |
SCpnt | 1265 | drivers/scsi/scsi.c | SCpnt->host = host; |
SCpnt | 1266 | drivers/scsi/scsi.c | SCpnt->channel = channel; |
SCpnt | 1267 | drivers/scsi/scsi.c | SCpnt->target = target; |
SCpnt | 1268 | drivers/scsi/scsi.c | SCpnt->lun = (SCpnt->data_cmnd[1] >> 5); |
SCpnt | 1270 | drivers/scsi/scsi.c | SCpnt->bufflen = bufflen; |
SCpnt | 1271 | drivers/scsi/scsi.c | SCpnt->buffer = buffer; |
SCpnt | 1272 | drivers/scsi/scsi.c | SCpnt->flags=0; |
SCpnt | 1273 | drivers/scsi/scsi.c | SCpnt->retries=0; |
SCpnt | 1274 | drivers/scsi/scsi.c | SCpnt->allowed=retries; |
SCpnt | 1275 | drivers/scsi/scsi.c | SCpnt->done = done; |
SCpnt | 1276 | drivers/scsi/scsi.c | SCpnt->timeout_per_command = timeout; |
SCpnt | 1278 | drivers/scsi/scsi.c | memcpy ((void *) SCpnt->cmnd , (void *) cmnd, 12); |
SCpnt | 1282 | drivers/scsi/scsi.c | memset ((void *) SCpnt->sense_buffer, 0, sizeof SCpnt->sense_buffer); |
SCpnt | 1283 | drivers/scsi/scsi.c | SCpnt->request_buffer = buffer; |
SCpnt | 1284 | drivers/scsi/scsi.c | SCpnt->request_bufflen = bufflen; |
SCpnt | 1285 | drivers/scsi/scsi.c | SCpnt->old_use_sg = SCpnt->use_sg; |
SCpnt | 1286 | drivers/scsi/scsi.c | if (SCpnt->cmd_len == 0) |
SCpnt | 1287 | drivers/scsi/scsi.c | SCpnt->cmd_len = COMMAND_SIZE(SCpnt->cmnd[0]); |
SCpnt | 1288 | drivers/scsi/scsi.c | SCpnt->old_cmd_len = SCpnt->cmd_len; |
SCpnt | 1292 | drivers/scsi/scsi.c | SCpnt->internal_timeout = 0; |
SCpnt | 1293 | drivers/scsi/scsi.c | SCpnt->abort_reason = 0; |
SCpnt | 1294 | drivers/scsi/scsi.c | internal_cmnd (SCpnt); |
SCpnt | 1309 | drivers/scsi/scsi.c | static void reset (Scsi_Cmnd * SCpnt) |
SCpnt | 1312 | drivers/scsi/scsi.c | printk("scsi: reset(%d, channel %d)\n", SCpnt->host->host_no, |
SCpnt | 1313 | drivers/scsi/scsi.c | SCpnt->channel); |
SCpnt | 1316 | drivers/scsi/scsi.c | SCpnt->flags |= (WAS_RESET | IS_RESETTING); |
SCpnt | 1317 | drivers/scsi/scsi.c | scsi_reset(SCpnt); |
SCpnt | 1324 | drivers/scsi/scsi.c | if(SCpnt->flags & NEEDS_JUMPSTART) { |
SCpnt | 1325 | drivers/scsi/scsi.c | SCpnt->flags &= ~NEEDS_JUMPSTART; |
SCpnt | 1326 | drivers/scsi/scsi.c | scsi_request_sense (SCpnt); |
SCpnt | 1333 | drivers/scsi/scsi.c | static int check_sense (Scsi_Cmnd * SCpnt) |
SCpnt | 1339 | drivers/scsi/scsi.c | if (((SCpnt->sense_buffer[0] & 0x70) >> 4) != 7) { |
SCpnt | 1340 | drivers/scsi/scsi.c | if(!(SCpnt->flags & ASKED_FOR_SENSE)) |
SCpnt | 1346 | drivers/scsi/scsi.c | SCpnt->flags &= ~ASKED_FOR_SENSE; |
SCpnt | 1349 | drivers/scsi/scsi.c | printk("scsi%d, channel%d : ", SCpnt->host->host_no, SCpnt->channel); |
SCpnt | 1350 | drivers/scsi/scsi.c | print_sense("", SCpnt); |
SCpnt | 1353 | drivers/scsi/scsi.c | if (SCpnt->sense_buffer[2] & 0xe0) |
SCpnt | 1356 | drivers/scsi/scsi.c | switch (SCpnt->sense_buffer[2] & 0xf) |
SCpnt | 1406 | drivers/scsi/scsi.c | static void scsi_done (Scsi_Cmnd * SCpnt) |
SCpnt | 1412 | drivers/scsi/scsi.c | struct Scsi_Host * host = SCpnt->host; |
SCpnt | 1413 | drivers/scsi/scsi.c | int result = SCpnt->result; |
SCpnt | 1414 | drivers/scsi/scsi.c | oldto = update_timeout(SCpnt, 0); |
SCpnt | 1418 | drivers/scsi/scsi.c | result, SCpnt->target, SCpnt->lun); |
SCpnt | 1424 | drivers/scsi/scsi.c | if(host_byte(result) == DID_ABORT && SCpnt->abort_reason) |
SCpnt | 1425 | drivers/scsi/scsi.c | SCpnt->result = result = (result & 0xff00ffff) | |
SCpnt | 1426 | drivers/scsi/scsi.c | (SCpnt->abort_reason << 16); |
SCpnt | 1438 | drivers/scsi/scsi.c | if(SCpnt->flags & WAS_SENSE) |
SCpnt | 1440 | drivers/scsi/scsi.c | SCpnt->use_sg = SCpnt->old_use_sg; |
SCpnt | 1441 | drivers/scsi/scsi.c | SCpnt->cmd_len = SCpnt->old_cmd_len; |
SCpnt | 1447 | drivers/scsi/scsi.c | if (status_byte(result) && (SCpnt->flags & WAS_SENSE)) |
SCpnt | 1450 | drivers/scsi/scsi.c | SCpnt->flags &= ~WAS_SENSE; |
SCpnt | 1451 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~SENSE_TIMEOUT; |
SCpnt | 1453 | drivers/scsi/scsi.c | if (!(SCpnt->flags & WAS_RESET)) |
SCpnt | 1457 | drivers/scsi/scsi.c | SCpnt->host->host_no, SCpnt->channel, SCpnt->target, |
SCpnt | 1458 | drivers/scsi/scsi.c | SCpnt->lun); |
SCpnt | 1459 | drivers/scsi/scsi.c | reset(SCpnt); |
SCpnt | 1474 | drivers/scsi/scsi.c | if (SCpnt->flags & WAS_SENSE) |
SCpnt | 1479 | drivers/scsi/scsi.c | SCpnt->flags &= ~WAS_SENSE; |
SCpnt | 1480 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~SENSE_TIMEOUT; |
SCpnt | 1482 | drivers/scsi/scsi.c | switch (checked = check_sense(SCpnt)) |
SCpnt | 1489 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1525 | drivers/scsi/scsi.c | switch (check_sense(SCpnt)) |
SCpnt | 1528 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1541 | drivers/scsi/scsi.c | scsi_request_sense (SCpnt); |
SCpnt | 1553 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1559 | drivers/scsi/scsi.c | " reset.\n", SCpnt->host->host_no, SCpnt->channel); |
SCpnt | 1560 | drivers/scsi/scsi.c | reset(SCpnt); |
SCpnt | 1584 | drivers/scsi/scsi.c | if (SCpnt->flags & WAS_TIMEDOUT) |
SCpnt | 1596 | drivers/scsi/scsi.c | SCpnt->flags |= WAS_TIMEDOUT; |
SCpnt | 1597 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_ABORT; |
SCpnt | 1620 | drivers/scsi/scsi.c | if (SCpnt->flags & IS_RESETTING) |
SCpnt | 1622 | drivers/scsi/scsi.c | SCpnt->flags &= ~IS_RESETTING; |
SCpnt | 1629 | drivers/scsi/scsi.c | switch (check_sense(SCpnt)) { |
SCpnt | 1631 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1644 | drivers/scsi/scsi.c | scsi_request_sense (SCpnt); |
SCpnt | 1665 | drivers/scsi/scsi.c | SCpnt->allowed, SCpnt->retries); |
SCpnt | 1667 | drivers/scsi/scsi.c | if ((++SCpnt->retries) < SCpnt->allowed) |
SCpnt | 1669 | drivers/scsi/scsi.c | if ((SCpnt->retries >= (SCpnt->allowed >> 1)) |
SCpnt | 1670 | drivers/scsi/scsi.c | && !(jiffies < SCpnt->host->last_reset + MIN_RESET_PERIOD) |
SCpnt | 1671 | drivers/scsi/scsi.c | && !(SCpnt->flags & WAS_RESET)) |
SCpnt | 1674 | drivers/scsi/scsi.c | SCpnt->host->host_no, SCpnt->channel); |
SCpnt | 1675 | drivers/scsi/scsi.c | reset(SCpnt); |
SCpnt | 1689 | drivers/scsi/scsi.c | if (SCpnt->flags & WAS_SENSE) |
SCpnt | 1690 | drivers/scsi/scsi.c | scsi_request_sense(SCpnt); |
SCpnt | 1693 | drivers/scsi/scsi.c | memcpy ((void *) SCpnt->cmnd, |
SCpnt | 1694 | drivers/scsi/scsi.c | (void*) SCpnt->data_cmnd, |
SCpnt | 1695 | drivers/scsi/scsi.c | sizeof(SCpnt->data_cmnd)); |
SCpnt | 1696 | drivers/scsi/scsi.c | SCpnt->request_buffer = SCpnt->buffer; |
SCpnt | 1697 | drivers/scsi/scsi.c | SCpnt->request_bufflen = SCpnt->bufflen; |
SCpnt | 1698 | drivers/scsi/scsi.c | SCpnt->use_sg = SCpnt->old_use_sg; |
SCpnt | 1699 | drivers/scsi/scsi.c | SCpnt->cmd_len = SCpnt->old_cmd_len; |
SCpnt | 1700 | drivers/scsi/scsi.c | internal_cmnd (SCpnt); |
SCpnt | 1709 | drivers/scsi/scsi.c | printk("Calling done function - at address %p\n", SCpnt->done); |
SCpnt | 1717 | drivers/scsi/scsi.c | if (MAJOR(SCpnt->request.dev) != SCSI_DISK_MAJOR && |
SCpnt | 1718 | drivers/scsi/scsi.c | MAJOR(SCpnt->request.dev) != SCSI_CDROM_MAJOR) { |
SCpnt | 1728 | drivers/scsi/scsi.c | SCpnt->result = result | ((exit & 0xff) << 24); |
SCpnt | 1729 | drivers/scsi/scsi.c | SCpnt->use_sg = SCpnt->old_use_sg; |
SCpnt | 1730 | drivers/scsi/scsi.c | SCpnt->cmd_len = SCpnt->old_cmd_len; |
SCpnt | 1731 | drivers/scsi/scsi.c | SCpnt->done (SCpnt); |
SCpnt | 1756 | drivers/scsi/scsi.c | int scsi_abort (Scsi_Cmnd * SCpnt, int why, int pid) |
SCpnt | 1760 | drivers/scsi/scsi.c | struct Scsi_Host * host = SCpnt->host; |
SCpnt | 1771 | drivers/scsi/scsi.c | if (SCpnt->request.dev == -1 || pid != SCpnt->pid) { |
SCpnt | 1776 | drivers/scsi/scsi.c | if (SCpnt->internal_timeout & IN_ABORT) |
SCpnt | 1779 | drivers/scsi/scsi.c | while (SCpnt->internal_timeout & IN_ABORT) |
SCpnt | 1784 | drivers/scsi/scsi.c | SCpnt->internal_timeout |= IN_ABORT; |
SCpnt | 1785 | drivers/scsi/scsi.c | oldto = update_timeout(SCpnt, ABORT_TIMEOUT); |
SCpnt | 1787 | drivers/scsi/scsi.c | if ((SCpnt->flags & IS_RESETTING) && |
SCpnt | 1788 | drivers/scsi/scsi.c | SCpnt->device->soft_reset) { |
SCpnt | 1794 | drivers/scsi/scsi.c | SCpnt->channel, SCpnt->target, SCpnt->lun); |
SCpnt | 1799 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_ABORT; |
SCpnt | 1800 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1805 | drivers/scsi/scsi.c | SCpnt->pid, SCpnt->host->host_no, (int) SCpnt->channel, |
SCpnt | 1806 | drivers/scsi/scsi.c | (int) SCpnt->target, (int) SCpnt->lun); |
SCpnt | 1807 | drivers/scsi/scsi.c | print_command (SCpnt->cmnd); |
SCpnt | 1808 | drivers/scsi/scsi.c | if (SCpnt->request.dev == -1 || pid != SCpnt->pid) |
SCpnt | 1810 | drivers/scsi/scsi.c | SCpnt->abort_reason = why; |
SCpnt | 1811 | drivers/scsi/scsi.c | switch(host->hostt->abort(SCpnt)) { |
SCpnt | 1823 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_ABORT; |
SCpnt | 1824 | drivers/scsi/scsi.c | if(SCpnt->flags & WAS_TIMEDOUT) { |
SCpnt | 1831 | drivers/scsi/scsi.c | SCpnt->flags |= WAS_TIMEDOUT; |
SCpnt | 1832 | drivers/scsi/scsi.c | oldto = SCpnt->timeout_per_command; |
SCpnt | 1833 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1842 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1851 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_ABORT; |
SCpnt | 1852 | drivers/scsi/scsi.c | update_timeout(SCpnt, 0); |
SCpnt | 1856 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_ABORT; |
SCpnt | 1863 | drivers/scsi/scsi.c | int scsi_reset (Scsi_Cmnd * SCpnt) |
SCpnt | 1868 | drivers/scsi/scsi.c | struct Scsi_Host * host = SCpnt->host; |
SCpnt | 1877 | drivers/scsi/scsi.c | if (SCpnt->internal_timeout & IN_RESET) |
SCpnt | 1880 | drivers/scsi/scsi.c | while (SCpnt->internal_timeout & IN_RESET) |
SCpnt | 1885 | drivers/scsi/scsi.c | SCpnt->internal_timeout |= IN_RESET; |
SCpnt | 1886 | drivers/scsi/scsi.c | oldto = update_timeout(SCpnt, RESET_TIMEOUT); |
SCpnt | 1897 | drivers/scsi/scsi.c | scsi_abort(SCpnt1, DID_RESET, SCpnt->pid); |
SCpnt | 1905 | drivers/scsi/scsi.c | temp = host->hostt->reset(SCpnt); |
SCpnt | 1913 | drivers/scsi/scsi.c | temp = host->hostt->reset(SCpnt); |
SCpnt | 1925 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_RESET; |
SCpnt | 1926 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1933 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_RESET; |
SCpnt | 1934 | drivers/scsi/scsi.c | scsi_request_sense (SCpnt); |
SCpnt | 1944 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_RESET; |
SCpnt | 1945 | drivers/scsi/scsi.c | update_timeout(SCpnt, 0); |
SCpnt | 1968 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 1982 | drivers/scsi/scsi.c | for(SCpnt = host->host_queue; SCpnt; SCpnt = SCpnt->next) |
SCpnt | 1983 | drivers/scsi/scsi.c | if (SCpnt->timeout == -1) |
SCpnt | 1985 | drivers/scsi/scsi.c | SCpnt->timeout = 0; |
SCpnt | 1986 | drivers/scsi/scsi.c | pid = SCpnt->pid; |
SCpnt | 1988 | drivers/scsi/scsi.c | scsi_times_out(SCpnt, pid); |
SCpnt | 2012 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 2039 | drivers/scsi/scsi.c | for(SCpnt = host->host_queue; SCpnt; SCpnt = SCpnt->next) |
SCpnt | 2040 | drivers/scsi/scsi.c | if (SCpnt->timeout > 0) { |
SCpnt | 2041 | drivers/scsi/scsi.c | SCpnt->timeout -= used; |
SCpnt | 2042 | drivers/scsi/scsi.c | if(SCpnt->timeout <= 0) SCpnt->timeout = -1; |
SCpnt | 2043 | drivers/scsi/scsi.c | if(SCpnt->timeout > 0 && SCpnt->timeout < least) |
SCpnt | 2044 | drivers/scsi/scsi.c | least = SCpnt->timeout; |
SCpnt | 2228 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt; |
SCpnt | 2232 | drivers/scsi/scsi.c | SCpnt = (Scsi_Cmnd *) scsi_init_malloc(sizeof(Scsi_Cmnd), GFP_ATOMIC); |
SCpnt | 2233 | drivers/scsi/scsi.c | SCpnt->host = SDpnt->host; |
SCpnt | 2234 | drivers/scsi/scsi.c | SCpnt->device = SDpnt; |
SCpnt | 2235 | drivers/scsi/scsi.c | SCpnt->target = SDpnt->id; |
SCpnt | 2236 | drivers/scsi/scsi.c | SCpnt->lun = SDpnt->lun; |
SCpnt | 2237 | drivers/scsi/scsi.c | SCpnt->channel = SDpnt->channel; |
SCpnt | 2238 | drivers/scsi/scsi.c | SCpnt->request.dev = -1; /* Mark not busy */ |
SCpnt | 2239 | drivers/scsi/scsi.c | SCpnt->use_sg = 0; |
SCpnt | 2240 | drivers/scsi/scsi.c | SCpnt->old_use_sg = 0; |
SCpnt | 2241 | drivers/scsi/scsi.c | SCpnt->old_cmd_len = 0; |
SCpnt | 2242 | drivers/scsi/scsi.c | SCpnt->timeout = 0; |
SCpnt | 2243 | drivers/scsi/scsi.c | SCpnt->underflow = 0; |
SCpnt | 2244 | drivers/scsi/scsi.c | SCpnt->transfersize = 0; |
SCpnt | 2245 | drivers/scsi/scsi.c | SCpnt->host_scribble = NULL; |
SCpnt | 2248 | drivers/scsi/scsi.c | host->host_queue->prev = SCpnt; |
SCpnt | 2249 | drivers/scsi/scsi.c | SCpnt->next = host->host_queue; |
SCpnt | 2250 | drivers/scsi/scsi.c | SCpnt->prev = NULL; |
SCpnt | 2251 | drivers/scsi/scsi.c | host->host_queue = SCpnt; |
SCpnt | 2646 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt; |
SCpnt | 2662 | drivers/scsi/scsi.c | for(SCpnt = shpnt->host_queue; SCpnt; SCpnt = SCpnt->next) |
SCpnt | 2666 | drivers/scsi/scsi.c | if(SCpnt->request.dev != -1) { |
SCpnt | 2668 | drivers/scsi/scsi.c | for(SCpnt = shpnt->host_queue; SCpnt; SCpnt = SCpnt->next) |
SCpnt | 2669 | drivers/scsi/scsi.c | if(SCpnt->request.dev == 0xffe0) SCpnt->request.dev = -1; |
SCpnt | 2673 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xffe0; /* Mark as busy */ |
SCpnt | 2696 | drivers/scsi/scsi.c | SCpnt = sdpnt->host->host_queue->next; |
SCpnt | 2698 | drivers/scsi/scsi.c | sdpnt->host->host_queue = SCpnt; |
SCpnt | 2699 | drivers/scsi/scsi.c | if (SCpnt) SCpnt->prev = NULL; |
SCpnt | 2831 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt; |
SCpnt | 2852 | drivers/scsi/scsi.c | for(SCpnt = SDpnt->host->host_queue; SCpnt; SCpnt = SCpnt->next) |
SCpnt | 2854 | drivers/scsi/scsi.c | if(SCpnt->device == SDpnt) |
SCpnt | 2856 | drivers/scsi/scsi.c | if(SCpnt->prev != NULL) |
SCpnt | 2857 | drivers/scsi/scsi.c | SCpnt->prev->next = SCpnt->next; |
SCpnt | 2858 | drivers/scsi/scsi.c | if(SCpnt->next != NULL) |
SCpnt | 2859 | drivers/scsi/scsi.c | SCpnt->next->prev = SCpnt->prev; |
SCpnt | 2860 | drivers/scsi/scsi.c | if(SCpnt == SDpnt->host->host_queue) |
SCpnt | 2861 | drivers/scsi/scsi.c | SDpnt->host->host_queue = SCpnt->next; |
SCpnt | 2862 | drivers/scsi/scsi.c | scsi_init_free((char *) SCpnt, sizeof(*SCpnt)); |
SCpnt | 2939 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt; |
SCpnt | 2943 | drivers/scsi/scsi.c | for(SCpnt=shpnt->host_queue; SCpnt; SCpnt = SCpnt->next) |
SCpnt | 2947 | drivers/scsi/scsi.c | i++, SCpnt->host->host_no, |
SCpnt | 2948 | drivers/scsi/scsi.c | SCpnt->channel, |
SCpnt | 2949 | drivers/scsi/scsi.c | SCpnt->target, |
SCpnt | 2950 | drivers/scsi/scsi.c | SCpnt->lun, |
SCpnt | 2951 | drivers/scsi/scsi.c | SCpnt->request.dev, |
SCpnt | 2952 | drivers/scsi/scsi.c | SCpnt->request.sector, |
SCpnt | 2953 | drivers/scsi/scsi.c | SCpnt->request.nr_sectors, |
SCpnt | 2954 | drivers/scsi/scsi.c | SCpnt->request.current_nr_sectors, |
SCpnt | 2955 | drivers/scsi/scsi.c | SCpnt->use_sg, |
SCpnt | 2956 | drivers/scsi/scsi.c | SCpnt->retries, |
SCpnt | 2957 | drivers/scsi/scsi.c | SCpnt->allowed, |
SCpnt | 2958 | drivers/scsi/scsi.c | SCpnt->flags, |
SCpnt | 2959 | drivers/scsi/scsi.c | SCpnt->timeout_per_command, |
SCpnt | 2960 | drivers/scsi/scsi.c | SCpnt->timeout, |
SCpnt | 2961 | drivers/scsi/scsi.c | SCpnt->internal_timeout, |
SCpnt | 2962 | drivers/scsi/scsi.c | SCpnt->cmnd[0], |
SCpnt | 2963 | drivers/scsi/scsi.c | SCpnt->sense_buffer[2], |
SCpnt | 2964 | drivers/scsi/scsi.c | SCpnt->result); |
SCpnt | 565 | drivers/scsi/scsi.h | static Scsi_Cmnd * end_scsi_request(Scsi_Cmnd * SCpnt, int uptodate, int sectors) |
SCpnt | 570 | drivers/scsi/scsi.h | req = &SCpnt->request; |
SCpnt | 597 | drivers/scsi/scsi.h | return SCpnt; |
SCpnt | 604 | drivers/scsi/scsi.h | if (SCpnt->host->block) { |
SCpnt | 607 | drivers/scsi/scsi.h | for (next = SCpnt->host->block; next != SCpnt->host; |
SCpnt | 614 | drivers/scsi/scsi.h | wake_up(&SCpnt->device->device_wait); |
SCpnt | 79 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xf) != 0) start = starts[(SCpnt->request.dev & 0xf) - 1]; \ |
SCpnt | 86 | drivers/scsi/scsi_debug.c | if (bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\ |
SCpnt | 92 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xfff0) != ((target + NR_REAL) << 4) +(MAJOR_NR << 8)){ \ |
SCpnt | 93 | drivers/scsi/scsi_debug.c | printk("Dev #s %x %x ",SCpnt->request.dev, target); \ |
SCpnt | 100 | drivers/scsi/scsi_debug.c | if (bufflen != 1024 && (!SCpnt->use_sg)) {printk("%x %d\n ",bufflen, SCpnt->use_sg); panic("Bad bufflen");}; \ |
SCpnt | 102 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xf) > npart) panic ("Bad partition"); \ |
SCpnt | 103 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xf) != 0) start = starts[(SCpnt->request.dev & 0xf) - 1]; \ |
SCpnt | 104 | drivers/scsi/scsi_debug.c | if (SCpnt->request.cmd != RW) panic ("Wrong operation"); \ |
SCpnt | 105 | drivers/scsi/scsi_debug.c | if (SCpnt->request.sector + start != block) panic("Wrong block."); \ |
SCpnt | 106 | drivers/scsi/scsi_debug.c | if (SCpnt->request.current_nr_sectors != 2 && (!SCpnt->use_sg)) panic ("Wrong # blocks"); \ |
SCpnt | 107 | drivers/scsi/scsi_debug.c | if (SCpnt->request.bh){ \ |
SCpnt | 108 | drivers/scsi/scsi_debug.c | if (SCpnt->request.bh->b_size != 1024) panic ("Wrong bh size"); \ |
SCpnt | 109 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.bh->b_blocknr << 1) + start != block) \ |
SCpnt | 110 | drivers/scsi/scsi_debug.c | { printk("Wrong bh block# %d %d ",SCpnt->request.bh->b_blocknr, block); \ |
SCpnt | 113 | drivers/scsi/scsi_debug.c | if (SCpnt->request.bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\ |
SCpnt | 130 | drivers/scsi/scsi_debug.c | static void scsi_dump(Scsi_Cmnd * SCpnt, int flag){ |
SCpnt | 137 | drivers/scsi/scsi_debug.c | printk("use_sg: %d",SCpnt->use_sg); |
SCpnt | 138 | drivers/scsi/scsi_debug.c | if (SCpnt->use_sg){ |
SCpnt | 139 | drivers/scsi/scsi_debug.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 140 | drivers/scsi/scsi_debug.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 146 | drivers/scsi/scsi_debug.c | printk("nosg: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 147 | drivers/scsi/scsi_debug.c | SCpnt->bufflen); |
SCpnt | 148 | drivers/scsi/scsi_debug.c | lpnt = (int *) SCpnt->request.buffer; |
SCpnt | 151 | drivers/scsi/scsi_debug.c | lpnt = (unsigned int *) SCpnt; |
SCpnt | 175 | drivers/scsi/scsi_debug.c | int scsi_debug_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 177 | drivers/scsi/scsi_debug.c | unchar *cmd = (unchar *) SCpnt->cmnd; |
SCpnt | 185 | drivers/scsi/scsi_debug.c | int target = SCpnt->target; |
SCpnt | 186 | drivers/scsi/scsi_debug.c | int bufflen = SCpnt->request_bufflen; |
SCpnt | 192 | drivers/scsi/scsi_debug.c | DEB(if (target > 1) { SCpnt->result = DID_TIME_OUT << 16;done(SCpnt);return 0;}); |
SCpnt | 194 | drivers/scsi/scsi_debug.c | buff = (unsigned char *) SCpnt->request_buffer; |
SCpnt | 196 | drivers/scsi/scsi_debug.c | if(target>=1 || SCpnt->lun != 0) { |
SCpnt | 197 | drivers/scsi/scsi_debug.c | SCpnt->result = DID_NO_CONNECT << 16; |
SCpnt | 198 | drivers/scsi/scsi_debug.c | done(SCpnt); |
SCpnt | 208 | drivers/scsi/scsi_debug.c | printk("scsi_debug: Requesting sense buffer (%x %x %x %d):", SCpnt, buff, done, bufflen); |
SCpnt | 216 | drivers/scsi/scsi_debug.c | SCpnt->result = 0; |
SCpnt | 217 | drivers/scsi/scsi_debug.c | done(SCpnt); |
SCpnt | 244 | drivers/scsi/scsi_debug.c | if(NR_REAL < 0) NR_REAL = (SCpnt->request.dev >> 4) & 0x0f; |
SCpnt | 269 | drivers/scsi/scsi_debug.c | usec = (SCpnt->request.nr_sectors << 9) * 1.0e6 / SCSI_DATARATE; |
SCpnt | 276 | drivers/scsi/scsi_debug.c | printk("(r%d)",SCpnt->request.nr_sectors); |
SCpnt | 279 | drivers/scsi/scsi_debug.c | if(SCpnt->use_sg){ |
SCpnt | 284 | drivers/scsi/scsi_debug.c | bh = SCpnt->request.bh; |
SCpnt | 311 | drivers/scsi/scsi_debug.c | if (SCpnt->use_sg) printk("Block %x (%d %d)\n",block, SCpnt->request.nr_sectors, |
SCpnt | 312 | drivers/scsi/scsi_debug.c | SCpnt->request.current_nr_sectors); |
SCpnt | 341 | drivers/scsi/scsi_debug.c | memcpy(buff+64, SCpnt, sizeof(Scsi_Cmnd)); |
SCpnt | 344 | drivers/scsi/scsi_debug.c | if(SCpnt->use_sg){ |
SCpnt | 359 | drivers/scsi/scsi_debug.c | SCpnt->result = 0; |
SCpnt | 360 | drivers/scsi/scsi_debug.c | (done)(SCpnt); |
SCpnt | 363 | drivers/scsi/scsi_debug.c | if (SCpnt->use_sg && !scsi_debug_errsts) |
SCpnt | 364 | drivers/scsi/scsi_debug.c | if(bh) scsi_dump(SCpnt, 0); |
SCpnt | 377 | drivers/scsi/scsi_debug.c | if (SCpnt->use_sg){ |
SCpnt | 378 | drivers/scsi/scsi_debug.c | if ((bufflen >> 9) != SCpnt->request.nr_sectors) |
SCpnt | 386 | drivers/scsi/scsi_debug.c | scsi_dump(SCpnt,1); |
SCpnt | 394 | drivers/scsi/scsi_debug.c | SCpnt->result = DID_NO_CONNECT << 16; |
SCpnt | 395 | drivers/scsi/scsi_debug.c | done(SCpnt); |
SCpnt | 408 | drivers/scsi/scsi_debug.c | SCint[i] = SCpnt; |
SCpnt | 423 | drivers/scsi/scsi_debug.c | SCpnt->result = scsi_debug_errsts; |
SCpnt | 436 | drivers/scsi/scsi_debug.c | SCpnt->result = scsi_debug_errsts; |
SCpnt | 449 | drivers/scsi/scsi_debug.c | static void internal_done(Scsi_Cmnd * SCpnt) |
SCpnt | 451 | drivers/scsi/scsi_debug.c | internal_done_errcode = SCpnt->result; |
SCpnt | 455 | drivers/scsi/scsi_debug.c | int scsi_debug_command(Scsi_Cmnd * SCpnt) |
SCpnt | 458 | drivers/scsi/scsi_debug.c | scsi_debug_queuecommand(SCpnt, internal_done); |
SCpnt | 555 | drivers/scsi/scsi_debug.c | int scsi_debug_abort(Scsi_Cmnd * SCpnt) |
SCpnt | 562 | drivers/scsi/scsi_debug.c | SCpnt->result = SCpnt->abort_reason << 16; |
SCpnt | 564 | drivers/scsi/scsi_debug.c | if(SCpnt == SCint[j]) { |
SCpnt | 566 | drivers/scsi/scsi_debug.c | my_done(SCpnt); |
SCpnt | 587 | drivers/scsi/scsi_debug.c | int scsi_debug_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 98 | drivers/scsi/scsi_ioctl.c | static void scsi_ioctl_done (Scsi_Cmnd * SCpnt) |
SCpnt | 102 | drivers/scsi/scsi_ioctl.c | req = &SCpnt->request; |
SCpnt | 113 | drivers/scsi/scsi_ioctl.c | Scsi_Cmnd * SCpnt; |
SCpnt | 115 | drivers/scsi/scsi_ioctl.c | SCpnt = allocate_device(NULL, dev, 1); |
SCpnt | 116 | drivers/scsi/scsi_ioctl.c | scsi_do_cmd(SCpnt, cmd, NULL, 0, |
SCpnt | 120 | drivers/scsi/scsi_ioctl.c | if (SCpnt->request.dev != 0xfffe){ |
SCpnt | 122 | drivers/scsi/scsi_ioctl.c | SCpnt->request.sem = &sem; |
SCpnt | 125 | drivers/scsi/scsi_ioctl.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 128 | drivers/scsi/scsi_ioctl.c | if(driver_byte(SCpnt->result) != 0) |
SCpnt | 129 | drivers/scsi/scsi_ioctl.c | switch(SCpnt->sense_buffer[2] & 0xf) { |
SCpnt | 142 | drivers/scsi/scsi_ioctl.c | SCpnt->result = 0; /* This is no longer considered an error */ |
SCpnt | 151 | drivers/scsi/scsi_ioctl.c | SCpnt->result); |
SCpnt | 153 | drivers/scsi/scsi_ioctl.c | sense_class(SCpnt->sense_buffer[0]), |
SCpnt | 154 | drivers/scsi/scsi_ioctl.c | sense_error(SCpnt->sense_buffer[0]), |
SCpnt | 155 | drivers/scsi/scsi_ioctl.c | SCpnt->sense_buffer[2] & 0xf); |
SCpnt | 159 | drivers/scsi/scsi_ioctl.c | result = SCpnt->result; |
SCpnt | 160 | drivers/scsi/scsi_ioctl.c | SCpnt->request.dev = -1; |
SCpnt | 161 | drivers/scsi/scsi_ioctl.c | wake_up(&SCpnt->device->device_wait); |
SCpnt | 175 | drivers/scsi/scsi_ioctl.c | Scsi_Cmnd * SCpnt; |
SCpnt | 249 | drivers/scsi/scsi_ioctl.c | SCpnt = allocate_device(NULL, dev, 1); |
SCpnt | 251 | drivers/scsi/scsi_ioctl.c | scsi_do_cmd(SCpnt, cmd, buf, needed, scsi_ioctl_done, MAX_TIMEOUT, |
SCpnt | 254 | drivers/scsi/scsi_ioctl.c | if (SCpnt->request.dev != 0xfffe){ |
SCpnt | 256 | drivers/scsi/scsi_ioctl.c | SCpnt->request.sem = &sem; |
SCpnt | 259 | drivers/scsi/scsi_ioctl.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 266 | drivers/scsi/scsi_ioctl.c | if(SCpnt->result) { |
SCpnt | 269 | drivers/scsi/scsi_ioctl.c | sizeof(SCpnt->sense_buffer)); |
SCpnt | 272 | drivers/scsi/scsi_ioctl.c | SCpnt->sense_buffer, |
SCpnt | 273 | drivers/scsi/scsi_ioctl.c | sizeof(SCpnt->sense_buffer)); |
SCpnt | 279 | drivers/scsi/scsi_ioctl.c | result = SCpnt->result; |
SCpnt | 280 | drivers/scsi/scsi_ioctl.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 283 | drivers/scsi/scsi_ioctl.c | if(SCpnt->device->scsi_request_fn) |
SCpnt | 284 | drivers/scsi/scsi_ioctl.c | (*SCpnt->device->scsi_request_fn)(); |
SCpnt | 286 | drivers/scsi/scsi_ioctl.c | wake_up(&SCpnt->device->device_wait); |
SCpnt | 44 | drivers/scsi/scsi_syms.c | extern void print_sense(char * devclass, Scsi_Cmnd * SCpnt); |
SCpnt | 82 | drivers/scsi/sd.c | static void requeue_sd_request (Scsi_Cmnd * SCpnt); |
SCpnt | 203 | drivers/scsi/sd.c | static void rw_intr (Scsi_Cmnd *SCpnt) |
SCpnt | 205 | drivers/scsi/sd.c | int result = SCpnt->result; |
SCpnt | 206 | drivers/scsi/sd.c | int this_count = SCpnt->bufflen >> 9; |
SCpnt | 209 | drivers/scsi/sd.c | printk("sd%c : rw_intr(%d, %d)\n", 'a' + MINOR(SCpnt->request.dev), |
SCpnt | 210 | drivers/scsi/sd.c | SCpnt->host->host_no, result); |
SCpnt | 222 | drivers/scsi/sd.c | printk("sd%c : %d sectors remain.\n", 'a' + MINOR(SCpnt->request.dev), |
SCpnt | 223 | drivers/scsi/sd.c | SCpnt->request.nr_sectors); |
SCpnt | 224 | drivers/scsi/sd.c | printk("use_sg is %d\n ",SCpnt->use_sg); |
SCpnt | 226 | drivers/scsi/sd.c | if (SCpnt->use_sg) { |
SCpnt | 229 | drivers/scsi/sd.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 230 | drivers/scsi/sd.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 236 | drivers/scsi/sd.c | if (SCpnt->request.cmd == READ) |
SCpnt | 244 | drivers/scsi/sd.c | scsi_free(SCpnt->buffer, SCpnt->sglist_len); |
SCpnt | 246 | drivers/scsi/sd.c | if (SCpnt->buffer != SCpnt->request.buffer) { |
SCpnt | 248 | drivers/scsi/sd.c | printk("nosg: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 249 | drivers/scsi/sd.c | SCpnt->bufflen); |
SCpnt | 251 | drivers/scsi/sd.c | if (SCpnt->request.cmd == READ) |
SCpnt | 252 | drivers/scsi/sd.c | memcpy(SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 253 | drivers/scsi/sd.c | SCpnt->bufflen); |
SCpnt | 254 | drivers/scsi/sd.c | scsi_free(SCpnt->buffer, SCpnt->bufflen); |
SCpnt | 262 | drivers/scsi/sd.c | if (SCpnt->request.nr_sectors > this_count) |
SCpnt | 264 | drivers/scsi/sd.c | SCpnt->request.errors = 0; |
SCpnt | 266 | drivers/scsi/sd.c | if (!SCpnt->request.bh) |
SCpnt | 270 | drivers/scsi/sd.c | 'a' + MINOR(SCpnt->request.dev)); |
SCpnt | 277 | drivers/scsi/sd.c | SCpnt->request.sector, this_count); |
SCpnt | 280 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 1, this_count); |
SCpnt | 281 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 286 | drivers/scsi/sd.c | if (SCpnt->use_sg) { |
SCpnt | 289 | drivers/scsi/sd.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 290 | drivers/scsi/sd.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 292 | drivers/scsi/sd.c | printk("err: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 293 | drivers/scsi/sd.c | SCpnt->bufflen); |
SCpnt | 299 | drivers/scsi/sd.c | scsi_free(SCpnt->buffer, SCpnt->sglist_len); /* Free list of scatter-gather pointers */ |
SCpnt | 302 | drivers/scsi/sd.c | printk("nosgerr: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 303 | drivers/scsi/sd.c | SCpnt->bufflen); |
SCpnt | 305 | drivers/scsi/sd.c | if (SCpnt->buffer != SCpnt->request.buffer) |
SCpnt | 306 | drivers/scsi/sd.c | scsi_free(SCpnt->buffer, SCpnt->bufflen); |
SCpnt | 322 | drivers/scsi/sd.c | if rscsi_disks[DEVICE_NR(SCpnt->request.dev)].remap |
SCpnt | 330 | drivers/scsi/sd.c | if ((SCpnt->sense_buffer[0] & 0x7f) == 0x70) { |
SCpnt | 331 | drivers/scsi/sd.c | if ((SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) { |
SCpnt | 332 | drivers/scsi/sd.c | if(rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->removable) { |
SCpnt | 336 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->changed = 1; |
SCpnt | 337 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, this_count); |
SCpnt | 338 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 352 | drivers/scsi/sd.c | if (SCpnt->sense_buffer[2] == ILLEGAL_REQUEST) { |
SCpnt | 353 | drivers/scsi/sd.c | if (rscsi_disks[DEVICE_NR(SCpnt->request.dev)].ten) { |
SCpnt | 354 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].ten = 0; |
SCpnt | 355 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 364 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->host->host_no, |
SCpnt | 365 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->channel, |
SCpnt | 366 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->id, |
SCpnt | 367 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->lun, result); |
SCpnt | 370 | drivers/scsi/sd.c | print_sense("sd", SCpnt); |
SCpnt | 371 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.current_nr_sectors); |
SCpnt | 372 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 385 | drivers/scsi/sd.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 414 | drivers/scsi/sd.c | SCpnt = allocate_device(&CURRENT, |
SCpnt | 416 | drivers/scsi/sd.c | else SCpnt = NULL; |
SCpnt | 434 | drivers/scsi/sd.c | if (!SCpnt && sd_template.nr_dev > 1){ |
SCpnt | 440 | drivers/scsi/sd.c | SCpnt = request_queueable(req, rscsi_disks[DEVICE_NR(MINOR(req->dev))].device); |
SCpnt | 441 | drivers/scsi/sd.c | if(SCpnt) break; |
SCpnt | 445 | drivers/scsi/sd.c | if (SCpnt && req->dev == -1) { |
SCpnt | 454 | drivers/scsi/sd.c | if (!SCpnt) return; /* Could not find anything to do */ |
SCpnt | 457 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 461 | drivers/scsi/sd.c | static void requeue_sd_request (Scsi_Cmnd * SCpnt) |
SCpnt | 472 | drivers/scsi/sd.c | if(!SCpnt || SCpnt->request.dev <= 0) { |
SCpnt | 477 | drivers/scsi/sd.c | dev = MINOR(SCpnt->request.dev); |
SCpnt | 478 | drivers/scsi/sd.c | block = SCpnt->request.sector; |
SCpnt | 487 | drivers/scsi/sd.c | block + SCpnt->request.nr_sectors > sd[dev].nr_sects) |
SCpnt | 489 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 503 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 509 | drivers/scsi/sd.c | 'a' + MINOR(SCpnt->request.dev), dev, block); |
SCpnt | 524 | drivers/scsi/sd.c | if((block & 1) || (SCpnt->request.nr_sectors & 1)) { |
SCpnt | 526 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 530 | drivers/scsi/sd.c | switch (SCpnt->request.cmd) |
SCpnt | 535 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 544 | drivers/scsi/sd.c | panic ("Unknown sd command %d\n", SCpnt->request.cmd); |
SCpnt | 547 | drivers/scsi/sd.c | SCpnt->this_count = 0; |
SCpnt | 552 | drivers/scsi/sd.c | contiguous = (!CLUSTERABLE_DEVICE(SCpnt) ? 0 :1); |
SCpnt | 554 | drivers/scsi/sd.c | bounce_size = (SCpnt->request.nr_sectors << 9); |
SCpnt | 560 | drivers/scsi/sd.c | if (contiguous && SCpnt->request.bh && |
SCpnt | 561 | drivers/scsi/sd.c | ((long) SCpnt->request.bh->b_data) |
SCpnt | 562 | drivers/scsi/sd.c | + (SCpnt->request.nr_sectors << 9) - 1 > ISA_DMA_THRESHOLD |
SCpnt | 563 | drivers/scsi/sd.c | && SCpnt->host->unchecked_isa_dma) { |
SCpnt | 564 | drivers/scsi/sd.c | if(((long) SCpnt->request.bh->b_data) > ISA_DMA_THRESHOLD) |
SCpnt | 569 | drivers/scsi/sd.c | if(contiguous && SCpnt->request.bh && SCpnt->request.bh->b_reqnext) |
SCpnt | 570 | drivers/scsi/sd.c | for(bh = SCpnt->request.bh, bhp = bh->b_reqnext; bhp; bh = bhp, |
SCpnt | 578 | drivers/scsi/sd.c | if (!SCpnt->request.bh || contiguous) { |
SCpnt | 581 | drivers/scsi/sd.c | this_count = SCpnt->request.nr_sectors; |
SCpnt | 582 | drivers/scsi/sd.c | buff = SCpnt->request.buffer; |
SCpnt | 583 | drivers/scsi/sd.c | SCpnt->use_sg = 0; |
SCpnt | 585 | drivers/scsi/sd.c | } else if (SCpnt->host->sg_tablesize == 0 || |
SCpnt | 595 | drivers/scsi/sd.c | if (SCpnt->host->sg_tablesize != 0 && |
SCpnt | 600 | drivers/scsi/sd.c | this_count = SCpnt->request.current_nr_sectors; |
SCpnt | 601 | drivers/scsi/sd.c | buff = SCpnt->request.buffer; |
SCpnt | 602 | drivers/scsi/sd.c | SCpnt->use_sg = 0; |
SCpnt | 611 | drivers/scsi/sd.c | bh = SCpnt->request.bh; |
SCpnt | 619 | drivers/scsi/sd.c | !CLUSTERABLE_DEVICE(SCpnt) || |
SCpnt | 620 | drivers/scsi/sd.c | (SCpnt->host->unchecked_isa_dma && |
SCpnt | 622 | drivers/scsi/sd.c | if (count < SCpnt->host->sg_tablesize) count++; |
SCpnt | 630 | drivers/scsi/sd.c | if(SCpnt->host->unchecked_isa_dma && |
SCpnt | 631 | drivers/scsi/sd.c | ((unsigned int) SCpnt->request.bh->b_data-1) == ISA_DMA_THRESHOLD) count--; |
SCpnt | 633 | drivers/scsi/sd.c | SCpnt->use_sg = count; /* Number of chains */ |
SCpnt | 635 | drivers/scsi/sd.c | while( count < (SCpnt->use_sg * sizeof(struct scatterlist))) |
SCpnt | 637 | drivers/scsi/sd.c | SCpnt->sglist_len = count; |
SCpnt | 639 | drivers/scsi/sd.c | if(SCpnt->host->sg_tablesize < max_sg) |
SCpnt | 640 | drivers/scsi/sd.c | max_sg = SCpnt->host->sg_tablesize; |
SCpnt | 644 | drivers/scsi/sd.c | SCpnt->use_sg = 0; /* No memory left - bail out */ |
SCpnt | 645 | drivers/scsi/sd.c | this_count = SCpnt->request.current_nr_sectors; |
SCpnt | 646 | drivers/scsi/sd.c | buff = SCpnt->request.buffer; |
SCpnt | 653 | drivers/scsi/sd.c | for(count = 0, bh = SCpnt->request.bh, bhp = bh->b_reqnext; |
SCpnt | 654 | drivers/scsi/sd.c | count < SCpnt->use_sg && bh; |
SCpnt | 664 | drivers/scsi/sd.c | ISA_DMA_THRESHOLD && (SCpnt->host->unchecked_isa_dma) && |
SCpnt | 691 | drivers/scsi/sd.c | this_count = SCpnt->request.current_nr_sectors; |
SCpnt | 692 | drivers/scsi/sd.c | buff = SCpnt->request.buffer; |
SCpnt | 693 | drivers/scsi/sd.c | SCpnt->use_sg = 0; |
SCpnt | 694 | drivers/scsi/sd.c | scsi_free(sgpnt, SCpnt->sglist_len); |
SCpnt | 696 | drivers/scsi/sd.c | SCpnt->use_sg = count; |
SCpnt | 708 | drivers/scsi/sd.c | && CLUSTERABLE_DEVICE(SCpnt)) { |
SCpnt | 713 | drivers/scsi/sd.c | (SCpnt->host->unchecked_isa_dma) && |
SCpnt | 722 | drivers/scsi/sd.c | max_sg = SCpnt->use_sg; |
SCpnt | 735 | drivers/scsi/sd.c | if (SCpnt->use_sg < max_sg) SCpnt->use_sg++; |
SCpnt | 742 | drivers/scsi/sd.c | if(count < SCpnt->use_sg || SCpnt->use_sg |
SCpnt | 743 | drivers/scsi/sd.c | > SCpnt->host->sg_tablesize){ |
SCpnt | 744 | drivers/scsi/sd.c | bh = SCpnt->request.bh; |
SCpnt | 746 | drivers/scsi/sd.c | SCpnt->use_sg, count, dma_free_sectors); |
SCpnt | 753 | drivers/scsi/sd.c | if(SCpnt->use_sg < 16) |
SCpnt | 754 | drivers/scsi/sd.c | for(count=0; count<SCpnt->use_sg; count++) |
SCpnt | 762 | drivers/scsi/sd.c | if (SCpnt->request.cmd == WRITE) |
SCpnt | 763 | drivers/scsi/sd.c | for(count=0; count<SCpnt->use_sg; count++) |
SCpnt | 772 | drivers/scsi/sd.c | if(SCpnt->use_sg == 0){ |
SCpnt | 774 | drivers/scsi/sd.c | (SCpnt->host->unchecked_isa_dma)) { |
SCpnt | 780 | drivers/scsi/sd.c | this_count = SCpnt->request.current_nr_sectors; |
SCpnt | 784 | drivers/scsi/sd.c | if (SCpnt->request.cmd == WRITE) |
SCpnt | 785 | drivers/scsi/sd.c | memcpy(buff, (char *)SCpnt->request.buffer, this_count << 9); |
SCpnt | 790 | drivers/scsi/sd.c | 'a' + MINOR(SCpnt->request.dev), |
SCpnt | 791 | drivers/scsi/sd.c | (SCpnt->request.cmd == WRITE) ? "writing" : "reading", |
SCpnt | 792 | drivers/scsi/sd.c | this_count, SCpnt->request.nr_sectors); |
SCpnt | 795 | drivers/scsi/sd.c | cmd[1] = (SCpnt->lun << 5) & 0xe0; |
SCpnt | 841 | drivers/scsi/sd.c | SCpnt->transfersize = rscsi_disks[dev].sector_size; |
SCpnt | 842 | drivers/scsi/sd.c | SCpnt->underflow = this_count << 9; |
SCpnt | 843 | drivers/scsi/sd.c | scsi_do_cmd (SCpnt, (void *) cmd, buff, |
SCpnt | 846 | drivers/scsi/sd.c | (SCpnt->device->type == TYPE_DISK ? |
SCpnt | 885 | drivers/scsi/sd.c | static void sd_init_done (Scsi_Cmnd * SCpnt) |
SCpnt | 889 | drivers/scsi/sd.c | req = &SCpnt->request; |
SCpnt | 903 | drivers/scsi/sd.c | Scsi_Cmnd * SCpnt; |
SCpnt | 910 | drivers/scsi/sd.c | SCpnt = allocate_device(NULL, rscsi_disks[i].device, 1); |
SCpnt | 924 | drivers/scsi/sd.c | SCpnt->request.dev = 0xffff; /* Mark as really busy again */ |
SCpnt | 925 | drivers/scsi/sd.c | SCpnt->cmd_len = 0; |
SCpnt | 926 | drivers/scsi/sd.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 927 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] = 0; |
SCpnt | 929 | drivers/scsi/sd.c | scsi_do_cmd (SCpnt, |
SCpnt | 934 | drivers/scsi/sd.c | while(SCpnt->request.dev != 0xfffe) barrier(); |
SCpnt | 936 | drivers/scsi/sd.c | the_result = SCpnt->result; |
SCpnt | 939 | drivers/scsi/sd.c | || SCpnt->sense_buffer[2] != UNIT_ATTENTION) |
SCpnt | 946 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] == NOT_READY) { |
SCpnt | 956 | drivers/scsi/sd.c | SCpnt->request.dev = 0xffff; |
SCpnt | 957 | drivers/scsi/sd.c | SCpnt->cmd_len = 0; |
SCpnt | 958 | drivers/scsi/sd.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 959 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] = 0; |
SCpnt | 961 | drivers/scsi/sd.c | scsi_do_cmd (SCpnt, |
SCpnt | 966 | drivers/scsi/sd.c | while(SCpnt->request.dev != 0xfffe) |
SCpnt | 992 | drivers/scsi/sd.c | SCpnt->request.dev = 0xffff; /* Mark as really busy again */ |
SCpnt | 993 | drivers/scsi/sd.c | SCpnt->cmd_len = 0; |
SCpnt | 994 | drivers/scsi/sd.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 995 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] = 0; |
SCpnt | 997 | drivers/scsi/sd.c | scsi_do_cmd (SCpnt, |
SCpnt | 1003 | drivers/scsi/sd.c | while(SCpnt->request.dev != 0xfffe) |
SCpnt | 1006 | drivers/scsi/sd.c | if (SCpnt->request.dev != 0xfffe){ |
SCpnt | 1008 | drivers/scsi/sd.c | SCpnt->request.sem = &sem; |
SCpnt | 1011 | drivers/scsi/sd.c | while (SCpnt->request.dev != 0xfffe) |
SCpnt | 1015 | drivers/scsi/sd.c | the_result = SCpnt->result; |
SCpnt | 1020 | drivers/scsi/sd.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 1022 | drivers/scsi/sd.c | wake_up(&SCpnt->device->device_wait); |
SCpnt | 1052 | drivers/scsi/sd.c | 'a' + i, SCpnt->sense_buffer[2] & 0xf); |
SCpnt | 1064 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] == NOT_READY) |
SCpnt | 518 | drivers/scsi/seagate.c | int seagate_st0x_queue_command (Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 524 | drivers/scsi/seagate.c | current_target = SCpnt->target; |
SCpnt | 525 | drivers/scsi/seagate.c | current_lun = SCpnt->lun; |
SCpnt | 526 | drivers/scsi/seagate.c | (const void *) current_cmnd = SCpnt->cmnd; |
SCpnt | 527 | drivers/scsi/seagate.c | current_data = (unsigned char *) SCpnt->request_buffer; |
SCpnt | 528 | drivers/scsi/seagate.c | current_bufflen = SCpnt->request_bufflen; |
SCpnt | 529 | drivers/scsi/seagate.c | SCint = SCpnt; |
SCpnt | 540 | drivers/scsi/seagate.c | current_cmnd[SCpnt->cmd_len] |= 0x01; |
SCpnt | 579 | drivers/scsi/seagate.c | int seagate_st0x_command (Scsi_Cmnd * SCpnt) { |
SCpnt | 580 | drivers/scsi/seagate.c | return internal_command (SCpnt->target, SCpnt->lun, SCpnt->cmnd, SCpnt->request_buffer, |
SCpnt | 581 | drivers/scsi/seagate.c | SCpnt->request_bufflen, |
SCpnt | 1555 | drivers/scsi/seagate.c | int seagate_st0x_abort (Scsi_Cmnd * SCpnt) |
SCpnt | 1566 | drivers/scsi/seagate.c | int seagate_st0x_reset (Scsi_Cmnd * SCpnt) |
SCpnt | 257 | drivers/scsi/sg.c | static void sg_command_done(Scsi_Cmnd * SCpnt) |
SCpnt | 259 | drivers/scsi/sg.c | int dev=SCpnt->request.dev; |
SCpnt | 264 | drivers/scsi/sg.c | SCpnt->request.dev=-1; |
SCpnt | 272 | drivers/scsi/sg.c | memcpy(device->header.sense_buffer, SCpnt->sense_buffer, sizeof(SCpnt->sense_buffer)); |
SCpnt | 273 | drivers/scsi/sg.c | if (SCpnt->sense_buffer[0]) |
SCpnt | 278 | drivers/scsi/sg.c | device->header.result=SCpnt->result; |
SCpnt | 285 | drivers/scsi/sg.c | SCpnt->request.dev=-1; |
SCpnt | 300 | drivers/scsi/sg.c | Scsi_Cmnd * SCpnt; |
SCpnt | 383 | drivers/scsi/sg.c | if (!(SCpnt=allocate_device(NULL,device->device, !(filp->f_flags & O_NONBLOCK)))) |
SCpnt | 398 | drivers/scsi/sg.c | SCpnt->request.dev=dev; |
SCpnt | 399 | drivers/scsi/sg.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 403 | drivers/scsi/sg.c | SCpnt->cmd_len = size; |
SCpnt | 452 | drivers/scsi/sg.c | scsi_do_cmd (SCpnt,(void *) cmnd, |
SCpnt | 69 | drivers/scsi/sr.c | void requeue_sr_request (Scsi_Cmnd * SCpnt); |
SCpnt | 153 | drivers/scsi/sr.c | static void rw_intr (Scsi_Cmnd * SCpnt) |
SCpnt | 155 | drivers/scsi/sr.c | int result = SCpnt->result; |
SCpnt | 156 | drivers/scsi/sr.c | int this_count = SCpnt->this_count; |
SCpnt | 159 | drivers/scsi/sr.c | printk("sr.c done: %x %x\n",result, SCpnt->request.bh->b_data); |
SCpnt | 163 | drivers/scsi/sr.c | if (SCpnt->use_sg == 0) { |
SCpnt | 164 | drivers/scsi/sr.c | if (SCpnt->buffer != SCpnt->request.buffer) |
SCpnt | 167 | drivers/scsi/sr.c | offset = (SCpnt->request.sector % 4) << 9; |
SCpnt | 168 | drivers/scsi/sr.c | memcpy((char *)SCpnt->request.buffer, |
SCpnt | 169 | drivers/scsi/sr.c | (char *)SCpnt->buffer + offset, |
SCpnt | 176 | drivers/scsi/sr.c | SCpnt->request.nr_sectors > this_count && |
SCpnt | 177 | drivers/scsi/sr.c | SCpnt->request.bh && |
SCpnt | 178 | drivers/scsi/sr.c | SCpnt->request.bh->b_reqnext && |
SCpnt | 179 | drivers/scsi/sr.c | SCpnt->request.bh->b_reqnext->b_size == 1024) { |
SCpnt | 180 | drivers/scsi/sr.c | memcpy((char *)SCpnt->request.bh->b_reqnext->b_data, |
SCpnt | 181 | drivers/scsi/sr.c | (char *)SCpnt->buffer + 1024, |
SCpnt | 186 | drivers/scsi/sr.c | scsi_free(SCpnt->buffer, 2048); |
SCpnt | 191 | drivers/scsi/sr.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 192 | drivers/scsi/sr.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 200 | drivers/scsi/sr.c | scsi_free(SCpnt->buffer, SCpnt->sglist_len); /* Free list of scatter-gather pointers */ |
SCpnt | 201 | drivers/scsi/sr.c | if(SCpnt->request.sector % 4) this_count -= 2; |
SCpnt | 203 | drivers/scsi/sr.c | if(this_count > SCpnt->request.nr_sectors) |
SCpnt | 208 | drivers/scsi/sr.c | printk("(%x %x %x) ",SCpnt->request.bh, SCpnt->request.nr_sectors, |
SCpnt | 211 | drivers/scsi/sr.c | if (SCpnt->request.nr_sectors > this_count) |
SCpnt | 213 | drivers/scsi/sr.c | SCpnt->request.errors = 0; |
SCpnt | 214 | drivers/scsi/sr.c | if (!SCpnt->request.bh) |
SCpnt | 216 | drivers/scsi/sr.c | SCpnt->request.sector, this_count); |
SCpnt | 219 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 1, this_count); /* All done */ |
SCpnt | 220 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 227 | drivers/scsi/sr.c | if (SCpnt->use_sg) { |
SCpnt | 230 | drivers/scsi/sr.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 231 | drivers/scsi/sr.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 236 | drivers/scsi/sr.c | scsi_free(SCpnt->buffer, SCpnt->sglist_len); /* Free list of scatter-gather pointers */ |
SCpnt | 238 | drivers/scsi/sr.c | if (SCpnt->buffer != SCpnt->request.buffer) |
SCpnt | 239 | drivers/scsi/sr.c | scsi_free(SCpnt->buffer, SCpnt->bufflen); |
SCpnt | 243 | drivers/scsi/sr.c | if ((SCpnt->sense_buffer[0] & 0x7f) == 0x70) { |
SCpnt | 244 | drivers/scsi/sr.c | if ((SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) { |
SCpnt | 248 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->changed = 1; |
SCpnt | 249 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, this_count); |
SCpnt | 250 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 255 | drivers/scsi/sr.c | if (SCpnt->sense_buffer[2] == ILLEGAL_REQUEST) { |
SCpnt | 257 | drivers/scsi/sr.c | print_sense("sr", SCpnt); |
SCpnt | 259 | drivers/scsi/sr.c | print_command(SCpnt->cmnd); |
SCpnt | 260 | drivers/scsi/sr.c | if (scsi_CDs[DEVICE_NR(SCpnt->request.dev)].ten) { |
SCpnt | 261 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].ten = 0; |
SCpnt | 262 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 266 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, this_count); |
SCpnt | 267 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); /* Do next request */ |
SCpnt | 273 | drivers/scsi/sr.c | if (SCpnt->sense_buffer[2] == NOT_READY) { |
SCpnt | 275 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, this_count); |
SCpnt | 276 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); /* Do next request */ |
SCpnt | 284 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->host->host_no, |
SCpnt | 285 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->id, |
SCpnt | 286 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->lun, |
SCpnt | 290 | drivers/scsi/sr.c | print_sense("sr", SCpnt); |
SCpnt | 292 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.current_nr_sectors); |
SCpnt | 293 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 552 | drivers/scsi/sr.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 568 | drivers/scsi/sr.c | SCpnt = allocate_device(&CURRENT, |
SCpnt | 570 | drivers/scsi/sr.c | else SCpnt = NULL; |
SCpnt | 580 | drivers/scsi/sr.c | if (!SCpnt && sr_template.nr_dev > 1){ |
SCpnt | 587 | drivers/scsi/sr.c | SCpnt = request_queueable(req, |
SCpnt | 589 | drivers/scsi/sr.c | if(SCpnt) break; |
SCpnt | 593 | drivers/scsi/sr.c | if (SCpnt && req->dev == -1) { |
SCpnt | 602 | drivers/scsi/sr.c | if (!SCpnt) |
SCpnt | 608 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 612 | drivers/scsi/sr.c | void requeue_sr_request (Scsi_Cmnd * SCpnt) |
SCpnt | 621 | drivers/scsi/sr.c | if(!SCpnt || SCpnt->request.dev <= 0) { |
SCpnt | 626 | drivers/scsi/sr.c | dev = MINOR(SCpnt->request.dev); |
SCpnt | 627 | drivers/scsi/sr.c | block = SCpnt->request.sector; |
SCpnt | 634 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 642 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 654 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 659 | drivers/scsi/sr.c | switch (SCpnt->request.cmd) |
SCpnt | 662 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 669 | drivers/scsi/sr.c | panic ("Unknown sr command %d\n", SCpnt->request.cmd); |
SCpnt | 672 | drivers/scsi/sr.c | cmd[1] = (SCpnt->lun << 5) & 0xe0; |
SCpnt | 690 | drivers/scsi/sr.c | SCpnt->use_sg = 0; |
SCpnt | 692 | drivers/scsi/sr.c | if (SCpnt->host->sg_tablesize > 0 && |
SCpnt | 698 | drivers/scsi/sr.c | bh = SCpnt->request.bh; |
SCpnt | 704 | drivers/scsi/sr.c | this_count = SCpnt->request.sector % 4; |
SCpnt | 706 | drivers/scsi/sr.c | while(bh && count < SCpnt->host->sg_tablesize) { |
SCpnt | 715 | drivers/scsi/sr.c | if (count < SCpnt->host->sg_tablesize) { |
SCpnt | 724 | drivers/scsi/sr.c | SCpnt->use_sg = count; /* Number of chains */ |
SCpnt | 726 | drivers/scsi/sr.c | while( count < (SCpnt->use_sg * sizeof(struct scatterlist))) |
SCpnt | 728 | drivers/scsi/sr.c | SCpnt->sglist_len = count; |
SCpnt | 732 | drivers/scsi/sr.c | SCpnt->use_sg = 0; /* No memory left - bail out */ |
SCpnt | 736 | drivers/scsi/sr.c | bh = SCpnt->request.bh; |
SCpnt | 737 | drivers/scsi/sr.c | if(SCpnt->request.sector % 4) { |
SCpnt | 738 | drivers/scsi/sr.c | sgpnt[count].length = (SCpnt->request.sector % 4) << 9; |
SCpnt | 745 | drivers/scsi/sr.c | for(bh = SCpnt->request.bh; count < SCpnt->use_sg; |
SCpnt | 756 | drivers/scsi/sr.c | if (count+1 != SCpnt->use_sg) panic("Bad sr request list"); |
SCpnt | 760 | drivers/scsi/sr.c | SCpnt->host->unchecked_isa_dma) { |
SCpnt | 781 | drivers/scsi/sr.c | SCpnt->use_sg = 0; |
SCpnt | 782 | drivers/scsi/sr.c | scsi_free(buffer, SCpnt->sglist_len); |
SCpnt | 788 | drivers/scsi/sr.c | printk("SR: %d %d %d %d %d *** ",SCpnt->use_sg, SCpnt->request.sector, |
SCpnt | 790 | drivers/scsi/sr.c | SCpnt->request.current_nr_sectors, |
SCpnt | 791 | drivers/scsi/sr.c | SCpnt->request.nr_sectors); |
SCpnt | 792 | drivers/scsi/sr.c | for(count=0; count<SCpnt->use_sg; count++) |
SCpnt | 801 | drivers/scsi/sr.c | if (SCpnt->use_sg == 0){ |
SCpnt | 803 | drivers/scsi/sr.c | if (!SCpnt->request.bh) |
SCpnt | 804 | drivers/scsi/sr.c | this_count = SCpnt->request.nr_sectors; |
SCpnt | 806 | drivers/scsi/sr.c | this_count = (SCpnt->request.bh->b_size >> 9); |
SCpnt | 822 | drivers/scsi/sr.c | buffer = (unsigned char *) SCpnt->request.buffer; |
SCpnt | 824 | drivers/scsi/sr.c | SCpnt->host->unchecked_isa_dma) |
SCpnt | 874 | drivers/scsi/sr.c | printk("Use sg: %d\n", SCpnt->use_sg); |
SCpnt | 891 | drivers/scsi/sr.c | SCpnt->transfersize = (scsi_CDs[dev].sector_size > 1024) ? |
SCpnt | 894 | drivers/scsi/sr.c | SCpnt->this_count = this_count; |
SCpnt | 895 | drivers/scsi/sr.c | scsi_do_cmd (SCpnt, (void *) cmd, buffer, |
SCpnt | 937 | drivers/scsi/sr.c | static void sr_init_done (Scsi_Cmnd * SCpnt) |
SCpnt | 941 | drivers/scsi/sr.c | req = &SCpnt->request; |
SCpnt | 953 | drivers/scsi/sr.c | Scsi_Cmnd * SCpnt; |
SCpnt | 956 | drivers/scsi/sr.c | SCpnt = allocate_device(NULL, scsi_CDs[i].device, 1); |
SCpnt | 963 | drivers/scsi/sr.c | SCpnt->request.dev = 0xffff; /* Mark as really busy */ |
SCpnt | 964 | drivers/scsi/sr.c | SCpnt->cmd_len = 0; |
SCpnt | 968 | drivers/scsi/sr.c | scsi_do_cmd (SCpnt, |
SCpnt | 974 | drivers/scsi/sr.c | while(SCpnt->request.dev != 0xfffe) |
SCpnt | 977 | drivers/scsi/sr.c | if (SCpnt->request.dev != 0xfffe){ |
SCpnt | 979 | drivers/scsi/sr.c | SCpnt->request.sem = &sem; |
SCpnt | 982 | drivers/scsi/sr.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 985 | drivers/scsi/sr.c | the_result = SCpnt->result; |
SCpnt | 990 | drivers/scsi/sr.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 992 | drivers/scsi/sr.c | wake_up(&SCpnt->device->device_wait); |
SCpnt | 29 | drivers/scsi/sr_ioctl.c | static void sr_ioctl_done(Scsi_Cmnd * SCpnt) |
SCpnt | 33 | drivers/scsi/sr_ioctl.c | req = &SCpnt->request; |
SCpnt | 47 | drivers/scsi/sr_ioctl.c | Scsi_Cmnd * SCpnt; |
SCpnt | 50 | drivers/scsi/sr_ioctl.c | SCpnt = allocate_device(NULL, scsi_CDs[target].device, 1); |
SCpnt | 51 | drivers/scsi/sr_ioctl.c | scsi_do_cmd(SCpnt, |
SCpnt | 56 | drivers/scsi/sr_ioctl.c | if (SCpnt->request.dev != 0xfffe){ |
SCpnt | 58 | drivers/scsi/sr_ioctl.c | SCpnt->request.sem = &sem; |
SCpnt | 61 | drivers/scsi/sr_ioctl.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 64 | drivers/scsi/sr_ioctl.c | result = SCpnt->result; |
SCpnt | 68 | drivers/scsi/sr_ioctl.c | switch(SCpnt->sense_buffer[2] & 0xf) { |
SCpnt | 86 | drivers/scsi/sr_ioctl.c | sense_class(SCpnt->sense_buffer[0]), |
SCpnt | 87 | drivers/scsi/sr_ioctl.c | sense_error(SCpnt->sense_buffer[0]), |
SCpnt | 88 | drivers/scsi/sr_ioctl.c | SCpnt->sense_buffer[2] & 0xf); |
SCpnt | 92 | drivers/scsi/sr_ioctl.c | result = SCpnt->result; |
SCpnt | 93 | drivers/scsi/sr_ioctl.c | SCpnt->request.dev = -1; /* Deallocate */ |
SCpnt | 94 | drivers/scsi/sr_ioctl.c | wake_up(&SCpnt->device->device_wait); |
SCpnt | 115 | drivers/scsi/st.c | st_chk_result(Scsi_Cmnd * SCpnt) |
SCpnt | 117 | drivers/scsi/st.c | int dev = SCpnt->request.dev; |
SCpnt | 118 | drivers/scsi/st.c | int result = SCpnt->result; |
SCpnt | 119 | drivers/scsi/st.c | unsigned char * sense = SCpnt->sense_buffer, scode; |
SCpnt | 127 | drivers/scsi/st.c | SCpnt->data_cmnd[0], SCpnt->data_cmnd[1], SCpnt->data_cmnd[2], |
SCpnt | 128 | drivers/scsi/st.c | SCpnt->data_cmnd[3], SCpnt->data_cmnd[4], SCpnt->data_cmnd[5], |
SCpnt | 129 | drivers/scsi/st.c | SCpnt->request_bufflen); |
SCpnt | 131 | drivers/scsi/st.c | print_sense("st", SCpnt); |
SCpnt | 144 | drivers/scsi/st.c | print_sense("st", SCpnt); |
SCpnt | 152 | drivers/scsi/st.c | && SCpnt->data_cmnd[0] != WRITE_6 |
SCpnt | 153 | drivers/scsi/st.c | && SCpnt->data_cmnd[0] != WRITE_FILEMARKS |
SCpnt | 158 | drivers/scsi/st.c | if (SCpnt->data_cmnd[0] == READ_6) |
SCpnt | 160 | drivers/scsi/st.c | else if (SCpnt->data_cmnd[0] == WRITE_6) |
SCpnt | 174 | drivers/scsi/st.c | st_sleep_done (Scsi_Cmnd * SCpnt) |
SCpnt | 179 | drivers/scsi/st.c | if ((st_nbr = SCpnt->request.dev) < st_template.nr_dev && st_nbr >= 0) { |
SCpnt | 182 | drivers/scsi/st.c | (SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 183 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x40)) { |
SCpnt | 185 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x80) != 0) |
SCpnt | 186 | drivers/scsi/st.c | remainder = (SCpnt->sense_buffer[3] << 24) | |
SCpnt | 187 | drivers/scsi/st.c | (SCpnt->sense_buffer[4] << 16) | |
SCpnt | 188 | drivers/scsi/st.c | (SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6]; |
SCpnt | 191 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW || |
SCpnt | 193 | drivers/scsi/st.c | (STp->buffer)->last_result = SCpnt->result; /* Error */ |
SCpnt | 198 | drivers/scsi/st.c | (STp->buffer)->last_result = SCpnt->result; |
SCpnt | 199 | drivers/scsi/st.c | (STp->buffer)->last_result_fatal = st_chk_result(SCpnt); |
SCpnt | 201 | drivers/scsi/st.c | SCpnt->request.dev = -1; |
SCpnt | 203 | drivers/scsi/st.c | SCpnt->request.dev = 0xffff; |
SCpnt | 256 | drivers/scsi/st.c | Scsi_Cmnd *SCpnt; |
SCpnt | 266 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 267 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 268 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 269 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 276 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 279 | drivers/scsi/st.c | SCpnt->request.dev = -1; |
SCpnt | 299 | drivers/scsi/st.c | Scsi_Cmnd *SCpnt; |
SCpnt | 318 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 329 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 337 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 338 | drivers/scsi/st.c | scsi_do_cmd (SCpnt, |
SCpnt | 345 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 350 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 351 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x40) && |
SCpnt | 352 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) != VOLUME_OVERFLOW) { |
SCpnt | 367 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 428 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt; |
SCpnt | 464 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 465 | drivers/scsi/st.c | if (!SCpnt) { |
SCpnt | 470 | drivers/scsi/st.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 473 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 474 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 483 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 486 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 487 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == UNIT_ATTENTION) { /* New media? */ |
SCpnt | 489 | drivers/scsi/st.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 492 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 493 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 502 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 510 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 511 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == NO_TAPE) { |
SCpnt | 519 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 532 | drivers/scsi/st.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 535 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 536 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 544 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 547 | drivers/scsi/st.c | if (!SCpnt->result && !SCpnt->sense_buffer[0]) { |
SCpnt | 566 | drivers/scsi/st.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 570 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 571 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 579 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 590 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 672 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt; |
SCpnt | 691 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 693 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 697 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 698 | drivers/scsi/st.c | scsi_do_cmd( SCpnt, |
SCpnt | 706 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 711 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 715 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 764 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt; |
SCpnt | 828 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 864 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 865 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 866 | drivers/scsi/st.c | scsi_do_cmd (SCpnt, |
SCpnt | 874 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 882 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 883 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x40)) { |
SCpnt | 884 | drivers/scsi/st.c | if (STp->block_size != 0 && (SCpnt->sense_buffer[0] & 0x80) != 0) |
SCpnt | 885 | drivers/scsi/st.c | transfer = (SCpnt->sense_buffer[3] << 24) | |
SCpnt | 886 | drivers/scsi/st.c | (SCpnt->sense_buffer[4] << 16) | |
SCpnt | 887 | drivers/scsi/st.c | (SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6]; |
SCpnt | 889 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW) |
SCpnt | 927 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 957 | drivers/scsi/st.c | SCpnt->request.dev = -1; |
SCpnt | 980 | drivers/scsi/st.c | SCpnt->result = (STp->buffer)->last_result = -1; |
SCpnt | 981 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 982 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 983 | drivers/scsi/st.c | scsi_do_cmd (SCpnt, |
SCpnt | 989 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 1004 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt; |
SCpnt | 1046 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 1075 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 1076 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 1077 | drivers/scsi/st.c | scsi_do_cmd (SCpnt, |
SCpnt | 1085 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 1096 | drivers/scsi/st.c | SCpnt->sense_buffer[0], SCpnt->sense_buffer[1], |
SCpnt | 1097 | drivers/scsi/st.c | SCpnt->sense_buffer[2], SCpnt->sense_buffer[3], |
SCpnt | 1098 | drivers/scsi/st.c | SCpnt->sense_buffer[4], SCpnt->sense_buffer[5], |
SCpnt | 1099 | drivers/scsi/st.c | SCpnt->sense_buffer[6], SCpnt->sense_buffer[7]); |
SCpnt | 1101 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70) { /* extended sense */ |
SCpnt | 1103 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[2] & 0xe0) != 0) { /* EOF, EOM, or ILI */ |
SCpnt | 1105 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x80) != 0) |
SCpnt | 1106 | drivers/scsi/st.c | transfer = (SCpnt->sense_buffer[3] << 24) | |
SCpnt | 1107 | drivers/scsi/st.c | (SCpnt->sense_buffer[4] << 16) | |
SCpnt | 1108 | drivers/scsi/st.c | (SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6]; |
SCpnt | 1112 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == MEDIUM_ERROR) |
SCpnt | 1115 | drivers/scsi/st.c | if (SCpnt->sense_buffer[2] & 0x20) { |
SCpnt | 1123 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 1127 | drivers/scsi/st.c | else if (SCpnt->sense_buffer[2] & 0x40) { |
SCpnt | 1140 | drivers/scsi/st.c | else if (SCpnt->sense_buffer[2] & 0x80) { |
SCpnt | 1160 | drivers/scsi/st.c | SCpnt->request.dev = -1; |
SCpnt | 1165 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == BLANK_CHECK) { |
SCpnt | 1180 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 1215 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 1234 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 1296 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt; |
SCpnt | 1612 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 1613 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 1614 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 1615 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 1623 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 1629 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 1677 | drivers/scsi/st.c | if (SCpnt->sense_buffer[2] & 0x40) { |
SCpnt | 1685 | drivers/scsi/st.c | (SCpnt->sense_buffer[3] << 24) + |
SCpnt | 1686 | drivers/scsi/st.c | (SCpnt->sense_buffer[4] << 16) + |
SCpnt | 1687 | drivers/scsi/st.c | (SCpnt->sense_buffer[5] << 8) + |
SCpnt | 1688 | drivers/scsi/st.c | SCpnt->sense_buffer[6] ); |
SCpnt | 1701 | drivers/scsi/st.c | if (SCpnt->sense_buffer[2] & 0x80) { /* Hit filemark */ |
SCpnt | 1713 | drivers/scsi/st.c | if (SCpnt->sense_buffer[2] & 0x80) { /* Hit filemark */ |
SCpnt | 1729 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == BLANK_CHECK) |
SCpnt | 1748 | drivers/scsi/st.c | Scsi_Cmnd *SCpnt; |
SCpnt | 1860 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 1862 | drivers/scsi/st.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 1872 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 1873 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 1874 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 1882 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 1908 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 53 | drivers/scsi/st.h | Scsi_Cmnd SCpnt; |
SCpnt | 247 | drivers/scsi/u14-34f.c | Scsi_Cmnd *SCpnt; |
SCpnt | 541 | drivers/scsi/u14-34f.c | static inline void build_sg_list(struct mscp *cpp, Scsi_Cmnd *SCpnt) { |
SCpnt | 545 | drivers/scsi/u14-34f.c | sgpnt = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 547 | drivers/scsi/u14-34f.c | for (k = 0; k < SCpnt->use_sg; k++) { |
SCpnt | 553 | drivers/scsi/u14-34f.c | cpp->use_sg = SCpnt->use_sg; |
SCpnt | 558 | drivers/scsi/u14-34f.c | int u14_34f_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) { |
SCpnt | 565 | drivers/scsi/u14-34f.c | j = ((struct hostdata *) SCpnt->host->hostdata)->board_number; |
SCpnt | 567 | drivers/scsi/u14-34f.c | if (!done) panic("%s: qcomm, pid %ld, null done.\n", BN(j), SCpnt->pid); |
SCpnt | 588 | drivers/scsi/u14-34f.c | else if (u14_34f_reset(SCpnt) == SCSI_RESET_SUCCESS) |
SCpnt | 591 | drivers/scsi/u14-34f.c | SCpnt->result = DID_BUS_BUSY << 16; |
SCpnt | 592 | drivers/scsi/u14-34f.c | SCpnt->host_scribble = NULL; |
SCpnt | 593 | drivers/scsi/u14-34f.c | printk("%s: qcomm, pid %ld, DID_BUS_BUSY, done.\n", BN(j), SCpnt->pid); |
SCpnt | 595 | drivers/scsi/u14-34f.c | done(SCpnt); |
SCpnt | 603 | drivers/scsi/u14-34f.c | SCpnt->scsi_done = done; |
SCpnt | 605 | drivers/scsi/u14-34f.c | SCpnt->host_scribble = (unsigned char *) &cpp->index; |
SCpnt | 608 | drivers/scsi/u14-34f.c | BN(j), i, SCpnt->target, SCpnt->pid); |
SCpnt | 612 | drivers/scsi/u14-34f.c | cpp->target = SCpnt->target; |
SCpnt | 613 | drivers/scsi/u14-34f.c | cpp->lun = SCpnt->lun; |
SCpnt | 614 | drivers/scsi/u14-34f.c | cpp->SCpnt = SCpnt; |
SCpnt | 615 | drivers/scsi/u14-34f.c | cpp->sense_addr = (unsigned int) SCpnt->sense_buffer; |
SCpnt | 616 | drivers/scsi/u14-34f.c | cpp->sense_len = sizeof SCpnt->sense_buffer; |
SCpnt | 618 | drivers/scsi/u14-34f.c | if (SCpnt->use_sg) { |
SCpnt | 620 | drivers/scsi/u14-34f.c | build_sg_list(cpp, SCpnt); |
SCpnt | 623 | drivers/scsi/u14-34f.c | cpp->data_address = (unsigned int)SCpnt->request_buffer; |
SCpnt | 624 | drivers/scsi/u14-34f.c | cpp->data_len = SCpnt->request_bufflen; |
SCpnt | 627 | drivers/scsi/u14-34f.c | cpp->scsi_cdbs_len = SCpnt->cmd_len; |
SCpnt | 628 | drivers/scsi/u14-34f.c | memcpy(cpp->scsi_cdbs, SCpnt->cmnd, cpp->scsi_cdbs_len); |
SCpnt | 631 | drivers/scsi/u14-34f.c | SCpnt->result = DID_ERROR << 16; |
SCpnt | 632 | drivers/scsi/u14-34f.c | SCpnt->host_scribble = NULL; |
SCpnt | 634 | drivers/scsi/u14-34f.c | BN(j), SCpnt->target, SCpnt->pid); |
SCpnt | 636 | drivers/scsi/u14-34f.c | done(SCpnt); |
SCpnt | 686 | drivers/scsi/u14-34f.c | if (SCarg != HD(j)->cp[i].SCpnt) |
SCpnt | 688 | drivers/scsi/u14-34f.c | BN(j), i, SCarg, HD(j)->cp[i].SCpnt); |
SCpnt | 712 | drivers/scsi/u14-34f.c | Scsi_Cmnd *SCpnt; |
SCpnt | 749 | drivers/scsi/u14-34f.c | SCpnt = HD(j)->cp[i].SCpnt; |
SCpnt | 752 | drivers/scsi/u14-34f.c | BN(j), i, SCpnt->pid); |
SCpnt | 754 | drivers/scsi/u14-34f.c | if (SCpnt == NULL) |
SCpnt | 757 | drivers/scsi/u14-34f.c | if (SCpnt->host_scribble == NULL) |
SCpnt | 760 | drivers/scsi/u14-34f.c | if (*(unsigned int *)SCpnt->host_scribble != i) |
SCpnt | 763 | drivers/scsi/u14-34f.c | if (SCpnt->scsi_done == NULL) |
SCpnt | 766 | drivers/scsi/u14-34f.c | if (SCpnt == SCarg) arg_done = TRUE; |
SCpnt | 794 | drivers/scsi/u14-34f.c | SCpnt = HD(j)->cp[i].SCpnt; |
SCpnt | 795 | drivers/scsi/u14-34f.c | SCpnt->result = DID_RESET << 16; |
SCpnt | 796 | drivers/scsi/u14-34f.c | SCpnt->host_scribble = NULL; |
SCpnt | 802 | drivers/scsi/u14-34f.c | BN(j), i, SCpnt->pid); |
SCpnt | 804 | drivers/scsi/u14-34f.c | SCpnt->scsi_done(SCpnt); |
SCpnt | 833 | drivers/scsi/u14-34f.c | Scsi_Cmnd *SCpnt; |
SCpnt | 895 | drivers/scsi/u14-34f.c | SCpnt = spp->SCpnt; |
SCpnt | 897 | drivers/scsi/u14-34f.c | if (SCpnt == NULL) |
SCpnt | 900 | drivers/scsi/u14-34f.c | if (SCpnt->host_scribble == NULL) |
SCpnt | 902 | drivers/scsi/u14-34f.c | BN(j), i, SCpnt->pid, SCpnt); |
SCpnt | 904 | drivers/scsi/u14-34f.c | if (*(unsigned int *)SCpnt->host_scribble != i) |
SCpnt | 906 | drivers/scsi/u14-34f.c | " irq %d.\n", BN(j), i, SCpnt->pid, |
SCpnt | 907 | drivers/scsi/u14-34f.c | *(unsigned int *)SCpnt->host_scribble, irq); |
SCpnt | 915 | drivers/scsi/u14-34f.c | if (tstatus == BUSY && SCpnt->device->type != TYPE_TAPE) |
SCpnt | 920 | drivers/scsi/u14-34f.c | && SCpnt->device->type == TYPE_DISK |
SCpnt | 921 | drivers/scsi/u14-34f.c | && HD(j)->target_reset[SCpnt->target]) |
SCpnt | 926 | drivers/scsi/u14-34f.c | && SCpnt->device->type == TYPE_DISK |
SCpnt | 927 | drivers/scsi/u14-34f.c | && (SCpnt->sense_buffer[2] & 0xf) == RECOVERED_ERROR) |
SCpnt | 934 | drivers/scsi/u14-34f.c | HD(j)->target_reset[SCpnt->target] = FALSE; |
SCpnt | 936 | drivers/scsi/u14-34f.c | if (spp->target_status && SCpnt->device->type == TYPE_DISK) |
SCpnt | 939 | drivers/scsi/u14-34f.c | SCpnt->target, SCpnt->lun, SCpnt->pid, |
SCpnt | 940 | drivers/scsi/u14-34f.c | spp->target_status, SCpnt->sense_buffer[2]); |
SCpnt | 942 | drivers/scsi/u14-34f.c | HD(j)->target_time_out[SCpnt->target] = 0; |
SCpnt | 947 | drivers/scsi/u14-34f.c | if (HD(j)->target_time_out[SCpnt->target] > 1) |
SCpnt | 951 | drivers/scsi/u14-34f.c | HD(j)->target_time_out[SCpnt->target]++; |
SCpnt | 961 | drivers/scsi/u14-34f.c | if (SCpnt->device->type != TYPE_TAPE) |
SCpnt | 982 | drivers/scsi/u14-34f.c | SCpnt->result = status | spp->target_status; |
SCpnt | 988 | drivers/scsi/u14-34f.c | if (SCpnt->result || do_trace) |
SCpnt | 998 | drivers/scsi/u14-34f.c | SCpnt->target, SCpnt->lun, SCpnt->pid, HD(j)->iocount); |
SCpnt | 1001 | drivers/scsi/u14-34f.c | SCpnt->host_scribble = NULL; |
SCpnt | 1004 | drivers/scsi/u14-34f.c | SCpnt->scsi_done(SCpnt); |
SCpnt | 291 | drivers/scsi/ultrastor.c | static inline void build_sg_list(struct mscp *, Scsi_Cmnd *SCpnt); |
SCpnt | 649 | drivers/scsi/ultrastor.c | static inline void build_sg_list(register struct mscp *mscp, Scsi_Cmnd *SCpnt) |
SCpnt | 655 | drivers/scsi/ultrastor.c | sl = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 656 | drivers/scsi/ultrastor.c | max = SCpnt->use_sg; |
SCpnt | 670 | drivers/scsi/ultrastor.c | int ultrastor_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 708 | drivers/scsi/ultrastor.c | my_mscp->ca = SCpnt->device->type != TYPE_TAPE; |
SCpnt | 709 | drivers/scsi/ultrastor.c | my_mscp->target_id = SCpnt->target; |
SCpnt | 711 | drivers/scsi/ultrastor.c | my_mscp->lun = SCpnt->lun; |
SCpnt | 712 | drivers/scsi/ultrastor.c | if (SCpnt->use_sg) { |
SCpnt | 715 | drivers/scsi/ultrastor.c | build_sg_list(my_mscp, SCpnt); |
SCpnt | 719 | drivers/scsi/ultrastor.c | my_mscp->transfer_data = (unsigned int)SCpnt->request_buffer; |
SCpnt | 720 | drivers/scsi/ultrastor.c | my_mscp->transfer_data_length = SCpnt->request_bufflen; |
SCpnt | 724 | drivers/scsi/ultrastor.c | my_mscp->length_of_sense_byte = sizeof SCpnt->sense_buffer; |
SCpnt | 725 | drivers/scsi/ultrastor.c | my_mscp->length_of_scsi_cdbs = SCpnt->cmd_len; |
SCpnt | 726 | drivers/scsi/ultrastor.c | memcpy(my_mscp->scsi_cdbs, SCpnt->cmnd, my_mscp->length_of_scsi_cdbs); |
SCpnt | 729 | drivers/scsi/ultrastor.c | my_mscp->sense_data = (unsigned int)&SCpnt->sense_buffer; |
SCpnt | 731 | drivers/scsi/ultrastor.c | my_mscp->SCint = SCpnt; |
SCpnt | 732 | drivers/scsi/ultrastor.c | SCpnt->host_scribble = (unsigned char *)my_mscp; |
SCpnt | 778 | drivers/scsi/ultrastor.c | SCpnt->result = status; |
SCpnt | 779 | drivers/scsi/ultrastor.c | done(SCpnt); |
SCpnt | 822 | drivers/scsi/ultrastor.c | int ultrastor_abort(Scsi_Cmnd *SCpnt) |
SCpnt | 837 | drivers/scsi/ultrastor.c | if(!SCpnt->host_scribble) |
SCpnt | 840 | drivers/scsi/ultrastor.c | mscp_index = ((struct mscp *)SCpnt->host_scribble) - config.mscp; |
SCpnt | 928 | drivers/scsi/ultrastor.c | if (config.mscp[mscp_index].SCint != SCpnt) |
SCpnt | 930 | drivers/scsi/ultrastor.c | config.mscp[mscp_index].SCint, SCpnt); |
SCpnt | 935 | drivers/scsi/ultrastor.c | if (config.mscp[mscp_index].SCint != SCpnt) panic("Bad abort"); |
SCpnt | 939 | drivers/scsi/ultrastor.c | SCpnt->result = DID_ABORT << 16; |
SCpnt | 941 | drivers/scsi/ultrastor.c | done(SCpnt); |
SCpnt | 947 | drivers/scsi/ultrastor.c | int ultrastor_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 344 | drivers/scsi/wd7000.c | Scsi_Cmnd *SCpnt; /* Scsi_Cmnd using this SCB */ |
SCpnt | 675 | drivers/scsi/wd7000.c | scbs[i].next = &(scbs[i+1]); scbs[i].SCpnt = NULL; |
SCpnt | 678 | drivers/scsi/wd7000.c | scbs[MAX_SCBS-1].SCpnt = NULL; |
SCpnt | 793 | drivers/scsi/wd7000.c | static void wd7000_scsi_done(Scsi_Cmnd * SCpnt) |
SCpnt | 796 | drivers/scsi/wd7000.c | printk("wd7000_scsi_done: %06x\n",(unsigned int) SCpnt); |
SCpnt | 798 | drivers/scsi/wd7000.c | SCpnt->SCp.phase = 0; |
SCpnt | 810 | drivers/scsi/wd7000.c | register Scsi_Cmnd *SCpnt; |
SCpnt | 867 | drivers/scsi/wd7000.c | SCpnt = scb->SCpnt; |
SCpnt | 868 | drivers/scsi/wd7000.c | if (--(SCpnt->SCp.phase) <= 0) { /* all scbs are done */ |
SCpnt | 872 | drivers/scsi/wd7000.c | SCpnt->result = errstatus; |
SCpnt | 876 | drivers/scsi/wd7000.c | SCpnt->scsi_done(SCpnt); |
SCpnt | 891 | drivers/scsi/wd7000.c | int wd7000_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 895 | drivers/scsi/wd7000.c | register unchar *cdb = (unchar *) SCpnt->cmnd; |
SCpnt | 898 | drivers/scsi/wd7000.c | Adapter *host = (Adapter *) SCpnt->host->hostdata; |
SCpnt | 900 | drivers/scsi/wd7000.c | cdblen = SCpnt->cmd_len; |
SCpnt | 901 | drivers/scsi/wd7000.c | idlun = ((SCpnt->target << 5) & 0xe0) | (SCpnt->lun & 7); |
SCpnt | 902 | drivers/scsi/wd7000.c | SCpnt->scsi_done = done; |
SCpnt | 903 | drivers/scsi/wd7000.c | SCpnt->SCp.phase = 1; |
SCpnt | 909 | drivers/scsi/wd7000.c | scb->SCpnt = SCpnt; /* so we can find stuff later */ |
SCpnt | 910 | drivers/scsi/wd7000.c | SCpnt->host_scribble = (unchar *) scb; |
SCpnt | 913 | drivers/scsi/wd7000.c | if (SCpnt->use_sg) { |
SCpnt | 914 | drivers/scsi/wd7000.c | struct scatterlist *sg = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 917 | drivers/scsi/wd7000.c | if (SCpnt->host->sg_tablesize == SG_NONE) { |
SCpnt | 921 | drivers/scsi/wd7000.c | printk("Using scatter/gather with %d elements.\n",SCpnt->use_sg); |
SCpnt | 927 | drivers/scsi/wd7000.c | any2scsi(scb->maxlen, SCpnt->use_sg * sizeof (Sgb) ); |
SCpnt | 929 | drivers/scsi/wd7000.c | for (i = 0; i < SCpnt->use_sg; i++) { |
SCpnt | 935 | drivers/scsi/wd7000.c | any2scsi(scb->dataptr, (int) SCpnt->request_buffer); |
SCpnt | 936 | drivers/scsi/wd7000.c | any2scsi(scb->maxlen, SCpnt->request_bufflen); |
SCpnt | 944 | drivers/scsi/wd7000.c | int wd7000_command(Scsi_Cmnd *SCpnt) |
SCpnt | 946 | drivers/scsi/wd7000.c | wd7000_queuecommand(SCpnt, wd7000_scsi_done); |
SCpnt | 948 | drivers/scsi/wd7000.c | while (SCpnt->SCp.phase > 0) barrier(); /* phase counts scbs down to 0 */ |
SCpnt | 950 | drivers/scsi/wd7000.c | return SCpnt->result; |
SCpnt | 1185 | drivers/scsi/wd7000.c | int wd7000_abort(Scsi_Cmnd * SCpnt) |
SCpnt | 1187 | drivers/scsi/wd7000.c | Adapter *host = (Adapter *) SCpnt->host->hostdata; |
SCpnt | 1202 | drivers/scsi/wd7000.c | int wd7000_reset(Scsi_Cmnd * SCpnt) |