tag | line | file | source code |
SCpnt | 751 | drivers/scsi/aha152x.c | int aha152x_queue( Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 767 | drivers/scsi/aha152x.c | printk( "SCpnt (target = %d lun = %d cmnd = ", SCpnt->target, SCpnt->lun); |
SCpnt | 768 | drivers/scsi/aha152x.c | print_command(SCpnt->cmnd); |
SCpnt | 770 | drivers/scsi/aha152x.c | SCpnt->cmd_len, SCpnt->use_sg, SCpnt->request_bufflen ); |
SCpnt | 775 | drivers/scsi/aha152x.c | SCpnt->scsi_done = done; |
SCpnt | 783 | drivers/scsi/aha152x.c | SCpnt->SCp.phase = not_issued; |
SCpnt | 784 | drivers/scsi/aha152x.c | if (SCpnt->use_sg) |
SCpnt | 786 | drivers/scsi/aha152x.c | SCpnt->SCp.buffer = (struct scatterlist *)SCpnt->request_buffer; |
SCpnt | 787 | drivers/scsi/aha152x.c | SCpnt->SCp.ptr = SCpnt->SCp.buffer->address; |
SCpnt | 788 | drivers/scsi/aha152x.c | SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length; |
SCpnt | 789 | drivers/scsi/aha152x.c | SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1; |
SCpnt | 793 | drivers/scsi/aha152x.c | SCpnt->SCp.ptr = (char *)SCpnt->request_buffer; |
SCpnt | 794 | drivers/scsi/aha152x.c | SCpnt->SCp.this_residual = SCpnt->request_bufflen; |
SCpnt | 795 | drivers/scsi/aha152x.c | SCpnt->SCp.buffer = NULL; |
SCpnt | 796 | drivers/scsi/aha152x.c | SCpnt->SCp.buffers_residual = 0; |
SCpnt | 799 | drivers/scsi/aha152x.c | SCpnt->SCp.Status = CHECK_CONDITION; |
SCpnt | 800 | drivers/scsi/aha152x.c | SCpnt->SCp.Message = 0; |
SCpnt | 801 | drivers/scsi/aha152x.c | SCpnt->SCp.have_data_in = 0; |
SCpnt | 802 | drivers/scsi/aha152x.c | SCpnt->SCp.sent_command = 0; |
SCpnt | 815 | drivers/scsi/aha152x.c | append_SC( &issue_SC, SCpnt); |
SCpnt | 835 | drivers/scsi/aha152x.c | int aha152x_command( Scsi_Cmnd *SCpnt ) |
SCpnt | 845 | drivers/scsi/aha152x.c | int aha152x_abort( Scsi_Cmnd *SCpnt) |
SCpnt | 856 | drivers/scsi/aha152x.c | printk("aha152x: abort(), SCpnt=0x%08x, ", (unsigned int) SCpnt ); |
SCpnt | 864 | drivers/scsi/aha152x.c | ptr && ptr!=SCpnt; |
SCpnt | 885 | drivers/scsi/aha152x.c | if ( TESTLO(SSTAT1, BUSFREE) || (current_SC && current_SC!=SCpnt)) |
SCpnt | 910 | drivers/scsi/aha152x.c | ptr && ptr!=SCpnt; |
SCpnt | 506 | drivers/scsi/aha1542.c | int aha1542_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 510 | drivers/scsi/aha1542.c | unchar *cmd = (unchar *) SCpnt->cmnd; |
SCpnt | 511 | drivers/scsi/aha1542.c | unchar target = SCpnt->target; |
SCpnt | 512 | drivers/scsi/aha1542.c | unchar lun = SCpnt->lun; |
SCpnt | 514 | drivers/scsi/aha1542.c | void *buff = SCpnt->request_buffer; |
SCpnt | 515 | drivers/scsi/aha1542.c | int bufflen = SCpnt->request_bufflen; |
SCpnt | 522 | drivers/scsi/aha1542.c | mb = HOSTDATA(SCpnt->host)->mb; |
SCpnt | 523 | drivers/scsi/aha1542.c | ccb = HOSTDATA(SCpnt->host)->ccb; |
SCpnt | 526 | drivers/scsi/aha1542.c | SCpnt->result = DID_TIME_OUT << 16; |
SCpnt | 527 | drivers/scsi/aha1542.c | done(SCpnt); return 0;}); |
SCpnt | 531 | drivers/scsi/aha1542.c | if (bufflen != sizeof(SCpnt->sense_buffer)) { |
SCpnt | 535 | drivers/scsi/aha1542.c | SCpnt->result = 0; |
SCpnt | 536 | drivers/scsi/aha1542.c | done(SCpnt); |
SCpnt | 553 | drivers/scsi/aha1542.c | for (i = 0; i < SCpnt->cmd_len; i++) printk("%02x ", cmd[i]); |
SCpnt | 563 | drivers/scsi/aha1542.c | mbo = HOSTDATA(SCpnt->host)->aha1542_last_mbo_used + 1; |
SCpnt | 567 | drivers/scsi/aha1542.c | if(mb[mbo].status == 0 && HOSTDATA(SCpnt->host)->SCint[mbo] == NULL) |
SCpnt | 571 | drivers/scsi/aha1542.c | } while (mbo != HOSTDATA(SCpnt->host)->aha1542_last_mbo_used); |
SCpnt | 573 | drivers/scsi/aha1542.c | if(mb[mbo].status || HOSTDATA(SCpnt->host)->SCint[mbo]) |
SCpnt | 576 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->SCint[mbo] = SCpnt; /* This will effectively prevent someone else from |
SCpnt | 579 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->aha1542_last_mbo_used = mbo; |
SCpnt | 590 | drivers/scsi/aha1542.c | ccb[mbo].cdblen = SCpnt->cmd_len; |
SCpnt | 600 | drivers/scsi/aha1542.c | if (SCpnt->use_sg) { |
SCpnt | 608 | drivers/scsi/aha1542.c | SCpnt->host_scribble = (unsigned char *) scsi_malloc(512); |
SCpnt | 609 | drivers/scsi/aha1542.c | sgpnt = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 610 | drivers/scsi/aha1542.c | cptr = (struct chain *) SCpnt->host_scribble; |
SCpnt | 612 | drivers/scsi/aha1542.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 613 | drivers/scsi/aha1542.c | if(sgpnt[i].length == 0 || SCpnt->use_sg > 16 || |
SCpnt | 616 | drivers/scsi/aha1542.c | printk("Bad segment list supplied to aha1542.c (%d, %d)\n",SCpnt->use_sg,i); |
SCpnt | 617 | drivers/scsi/aha1542.c | for(i=0;i<SCpnt->use_sg;i++){ |
SCpnt | 630 | drivers/scsi/aha1542.c | any2scsi(ccb[mbo].datalen, SCpnt->use_sg * sizeof(struct chain)); |
SCpnt | 639 | drivers/scsi/aha1542.c | SCpnt->host_scribble = NULL; |
SCpnt | 659 | drivers/scsi/aha1542.c | SCpnt->scsi_done = done; |
SCpnt | 661 | drivers/scsi/aha1542.c | aha1542_out(SCpnt->host->io_port, &ahacmd, 1); /* start scsi command */ |
SCpnt | 672 | drivers/scsi/aha1542.c | static void internal_done(Scsi_Cmnd * SCpnt) |
SCpnt | 674 | drivers/scsi/aha1542.c | SCpnt->SCp.Status++; |
SCpnt | 677 | drivers/scsi/aha1542.c | int aha1542_command(Scsi_Cmnd * SCpnt) |
SCpnt | 681 | drivers/scsi/aha1542.c | aha1542_queuecommand(SCpnt, internal_done); |
SCpnt | 683 | drivers/scsi/aha1542.c | SCpnt->SCp.Status = 0; |
SCpnt | 684 | drivers/scsi/aha1542.c | while (!SCpnt->SCp.Status); |
SCpnt | 685 | drivers/scsi/aha1542.c | return SCpnt->result; |
SCpnt | 1097 | drivers/scsi/aha1542.c | int aha1542_abort(Scsi_Cmnd * SCpnt) |
SCpnt | 1106 | drivers/scsi/aha1542.c | inb(STATUS(SCpnt->host->io_port)), |
SCpnt | 1107 | drivers/scsi/aha1542.c | inb(INTRFLAGS(SCpnt->host->io_port))); |
SCpnt | 1111 | drivers/scsi/aha1542.c | mb = HOSTDATA(SCpnt->host)->mb; |
SCpnt | 1112 | drivers/scsi/aha1542.c | mbi = HOSTDATA(SCpnt->host)->aha1542_last_mbi_used + 1; |
SCpnt | 1119 | drivers/scsi/aha1542.c | } while (mbi != HOSTDATA(SCpnt->host)->aha1542_last_mbi_used); |
SCpnt | 1124 | drivers/scsi/aha1542.c | SCpnt->host->irq); |
SCpnt | 1125 | drivers/scsi/aha1542.c | aha1542_intr_handle(SCpnt->host->irq, NULL); |
SCpnt | 1133 | drivers/scsi/aha1542.c | if(HOSTDATA(SCpnt->host)->SCint[i]) |
SCpnt | 1135 | drivers/scsi/aha1542.c | if(HOSTDATA(SCpnt->host)->SCint[i] == SCpnt) { |
SCpnt | 1136 | drivers/scsi/aha1542.c | printk("Timed out command pending for %4.4x\n", SCpnt->request.dev); |
SCpnt | 1137 | drivers/scsi/aha1542.c | if (HOSTDATA(SCpnt->host)->mb[i].status) { |
SCpnt | 1139 | drivers/scsi/aha1542.c | aha1542_out(SCpnt->host->io_port, &ahacmd, 1); |
SCpnt | 1142 | drivers/scsi/aha1542.c | printk("Other pending command %4.4x\n", SCpnt->request.dev); |
SCpnt | 1152 | drivers/scsi/aha1542.c | if (SCpnt == HOSTDATA(SCpnt->host)->SCint[mbo]){ |
SCpnt | 1154 | drivers/scsi/aha1542.c | aha1542_out(SCpnt->host->io_port, &ahacmd, 1); /* start scsi command */ |
SCpnt | 1168 | drivers/scsi/aha1542.c | int aha1542_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 1176 | drivers/scsi/aha1542.c | outb(SCRST, CONTROL(SCpnt->host->io_port)); |
SCpnt | 1181 | drivers/scsi/aha1542.c | if(HOSTDATA(SCpnt->host)->SCint[i] == SCpnt) |
SCpnt | 1183 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->ccb[i].op = 0x81; /* BUS DEVICE RESET */ |
SCpnt | 1185 | drivers/scsi/aha1542.c | aha1542_out(SCpnt->host->io_port, &ahacmd, 1); |
SCpnt | 1191 | drivers/scsi/aha1542.c | printk("Sent BUS DEVICE RESET to target %d\n", SCpnt->target); |
SCpnt | 1198 | drivers/scsi/aha1542.c | if(HOSTDATA(SCpnt->host)->SCint[i] && |
SCpnt | 1199 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->SCint[i]->target == SCpnt->target) |
SCpnt | 1202 | drivers/scsi/aha1542.c | SCtmp = HOSTDATA(SCpnt->host)->SCint[i]; |
SCpnt | 1205 | drivers/scsi/aha1542.c | printk("Sending DID_RESET for target %d\n", SCpnt->target); |
SCpnt | 1206 | drivers/scsi/aha1542.c | SCtmp->scsi_done(SCpnt); |
SCpnt | 1208 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->SCint[i] = NULL; |
SCpnt | 1209 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->mb[i].status = 0; |
SCpnt | 199 | drivers/scsi/aha1740.c | SCtmp = ecbptr->SCpnt; |
SCpnt | 245 | drivers/scsi/aha1740.c | int aha1740_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 248 | drivers/scsi/aha1740.c | unchar *cmd = (unchar *) SCpnt->cmnd; |
SCpnt | 249 | drivers/scsi/aha1740.c | unchar target = SCpnt->target; |
SCpnt | 251 | drivers/scsi/aha1740.c | void *buff = SCpnt->request_buffer; |
SCpnt | 252 | drivers/scsi/aha1740.c | int bufflen = SCpnt->request_bufflen; |
SCpnt | 259 | drivers/scsi/aha1740.c | if (bufflen != sizeof(SCpnt->sense_buffer)) |
SCpnt | 263 | drivers/scsi/aha1740.c | SCpnt->result = 0; |
SCpnt | 264 | drivers/scsi/aha1740.c | done(SCpnt); |
SCpnt | 277 | drivers/scsi/aha1740.c | for (i = 0; i < SCpnt->cmd_len; i++) printk("%02x ", cmd[i]); |
SCpnt | 307 | drivers/scsi/aha1740.c | ecb[ecbno].cdblen = SCpnt->cmd_len; /* SCSI Command Descriptor Block Length */ |
SCpnt | 317 | drivers/scsi/aha1740.c | if (SCpnt->use_sg) |
SCpnt | 326 | drivers/scsi/aha1740.c | SCpnt->host_scribble = (unsigned char *) scsi_malloc(512); |
SCpnt | 327 | drivers/scsi/aha1740.c | sgpnt = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 328 | drivers/scsi/aha1740.c | cptr = (struct aha1740_chain *) SCpnt->host_scribble; |
SCpnt | 330 | drivers/scsi/aha1740.c | for(i=0; i<SCpnt->use_sg; i++) |
SCpnt | 335 | drivers/scsi/aha1740.c | ecb[ecbno].datalen = SCpnt->use_sg * sizeof(struct aha1740_chain); |
SCpnt | 345 | drivers/scsi/aha1740.c | SCpnt->host_scribble = NULL; |
SCpnt | 349 | drivers/scsi/aha1740.c | ecb[ecbno].lun = SCpnt->lun; |
SCpnt | 357 | drivers/scsi/aha1740.c | ecb[ecbno].SCpnt = SCpnt; |
SCpnt | 412 | drivers/scsi/aha1740.c | static void internal_done(Scsi_Cmnd * SCpnt) |
SCpnt | 414 | drivers/scsi/aha1740.c | internal_done_errcode = SCpnt->result; |
SCpnt | 418 | drivers/scsi/aha1740.c | int aha1740_command(Scsi_Cmnd * SCpnt) |
SCpnt | 420 | drivers/scsi/aha1740.c | aha1740_queuecommand(SCpnt, internal_done); |
SCpnt | 486 | drivers/scsi/aha1740.c | int aha1740_abort(Scsi_Cmnd * SCpnt) |
SCpnt | 496 | drivers/scsi/aha1740.c | int aha1740_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 142 | drivers/scsi/aha1740.h | Scsi_Cmnd *SCpnt; /* Link to the SCSI Command Block */ |
SCpnt | 364 | drivers/scsi/constants.c | void print_sense(char * devclass, Scsi_Cmnd * SCpnt) |
SCpnt | 368 | drivers/scsi/constants.c | unsigned char * sense_buffer = SCpnt->sense_buffer; |
SCpnt | 370 | drivers/scsi/constants.c | int dev = SCpnt->request.dev; |
SCpnt | 378 | drivers/scsi/constants.c | if(s > sizeof(SCpnt->sense_buffer)) s = sizeof(SCpnt->sense_buffer); |
SCpnt | 238 | drivers/scsi/eata.c | Scsi_Cmnd *SCpnt; /* Address set in cp */ |
SCpnt | 265 | drivers/scsi/eata.c | Scsi_Cmnd *SCpnt; /* Address to be returned is sp */ |
SCpnt | 551 | drivers/scsi/eata.c | static inline void build_sg_list(struct mscp *cpp, Scsi_Cmnd *SCpnt) { |
SCpnt | 555 | drivers/scsi/eata.c | sgpnt = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 557 | drivers/scsi/eata.c | for (k = 0; k < SCpnt->use_sg; k++) { |
SCpnt | 563 | drivers/scsi/eata.c | cpp->data_len = htonl((SCpnt->use_sg * sizeof(struct sg_list))); |
SCpnt | 566 | drivers/scsi/eata.c | int eata2x_queuecommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) { |
SCpnt | 580 | drivers/scsi/eata.c | j = ((struct hostdata *) SCpnt->host->hostdata)->board_number; |
SCpnt | 582 | drivers/scsi/eata.c | if (!done) panic("%s: qcomm, pid %ld, null done.\n", BN(j), SCpnt->pid); |
SCpnt | 603 | drivers/scsi/eata.c | else if (eata2x_reset(SCpnt) == SCSI_RESET_SUCCESS) |
SCpnt | 606 | drivers/scsi/eata.c | SCpnt->result = DID_BUS_BUSY << 16; |
SCpnt | 607 | drivers/scsi/eata.c | SCpnt->host_scribble = NULL; |
SCpnt | 608 | drivers/scsi/eata.c | printk("%s: qcomm, pid %ld, DID_BUS_BUSY, done.\n", BN(j), SCpnt->pid); |
SCpnt | 610 | drivers/scsi/eata.c | done(SCpnt); |
SCpnt | 627 | drivers/scsi/eata.c | SCpnt->scsi_done = done; |
SCpnt | 629 | drivers/scsi/eata.c | SCpnt->host_scribble = (unsigned char *) &cpp->index; |
SCpnt | 632 | drivers/scsi/eata.c | BN(j), i, SCpnt->target, SCpnt->pid); |
SCpnt | 635 | drivers/scsi/eata.c | if (SCpnt->cmnd[0] == data_out_cmds[k]) { |
SCpnt | 644 | drivers/scsi/eata.c | cpp->target = SCpnt->target; |
SCpnt | 645 | drivers/scsi/eata.c | cpp->lun = SCpnt->lun; |
SCpnt | 646 | drivers/scsi/eata.c | cpp->SCpnt = SCpnt; |
SCpnt | 647 | drivers/scsi/eata.c | cpp->sense_addr = htonl((unsigned int) SCpnt->sense_buffer); |
SCpnt | 648 | drivers/scsi/eata.c | cpp->sense_len = sizeof SCpnt->sense_buffer; |
SCpnt | 650 | drivers/scsi/eata.c | if (SCpnt->use_sg) { |
SCpnt | 652 | drivers/scsi/eata.c | build_sg_list(cpp, SCpnt); |
SCpnt | 655 | drivers/scsi/eata.c | cpp->data_address = htonl((unsigned int) SCpnt->request_buffer); |
SCpnt | 656 | drivers/scsi/eata.c | cpp->data_len = htonl(SCpnt->request_bufflen); |
SCpnt | 659 | drivers/scsi/eata.c | memcpy(cpp->cdb, SCpnt->cmnd, SCpnt->cmd_len); |
SCpnt | 663 | drivers/scsi/eata.c | SCpnt->result = DID_ERROR << 16; |
SCpnt | 664 | drivers/scsi/eata.c | SCpnt->host_scribble = NULL; |
SCpnt | 666 | drivers/scsi/eata.c | BN(j), SCpnt->target, SCpnt->pid); |
SCpnt | 668 | drivers/scsi/eata.c | done(SCpnt); |
SCpnt | 712 | drivers/scsi/eata.c | if (SCarg != HD(j)->cp[i].SCpnt) |
SCpnt | 714 | drivers/scsi/eata.c | BN(j), i, SCarg, HD(j)->cp[i].SCpnt); |
SCpnt | 738 | drivers/scsi/eata.c | Scsi_Cmnd *SCpnt; |
SCpnt | 775 | drivers/scsi/eata.c | SCpnt = HD(j)->cp[i].SCpnt; |
SCpnt | 778 | drivers/scsi/eata.c | BN(j), i, SCpnt->pid); |
SCpnt | 780 | drivers/scsi/eata.c | if (SCpnt == NULL) |
SCpnt | 783 | drivers/scsi/eata.c | if (SCpnt->host_scribble == NULL) |
SCpnt | 786 | drivers/scsi/eata.c | if (*(unsigned int *)SCpnt->host_scribble != i) |
SCpnt | 789 | drivers/scsi/eata.c | if (SCpnt->scsi_done == NULL) |
SCpnt | 792 | drivers/scsi/eata.c | if (SCpnt == SCarg) arg_done = TRUE; |
SCpnt | 815 | drivers/scsi/eata.c | SCpnt = HD(j)->cp[i].SCpnt; |
SCpnt | 816 | drivers/scsi/eata.c | SCpnt->result = DID_RESET << 16; |
SCpnt | 817 | drivers/scsi/eata.c | SCpnt->host_scribble = NULL; |
SCpnt | 823 | drivers/scsi/eata.c | BN(j), i, SCpnt->pid); |
SCpnt | 825 | drivers/scsi/eata.c | SCpnt->scsi_done(SCpnt); |
SCpnt | 844 | drivers/scsi/eata.c | Scsi_Cmnd *SCpnt; |
SCpnt | 910 | drivers/scsi/eata.c | SCpnt = spp->SCpnt; |
SCpnt | 912 | drivers/scsi/eata.c | if (SCpnt == NULL) |
SCpnt | 915 | drivers/scsi/eata.c | if (SCpnt != cpp->SCpnt) |
SCpnt | 917 | drivers/scsi/eata.c | BN(j), i, SCpnt, cpp->SCpnt); |
SCpnt | 919 | drivers/scsi/eata.c | if (SCpnt->host_scribble == NULL) |
SCpnt | 921 | drivers/scsi/eata.c | BN(j), i, SCpnt->pid, SCpnt); |
SCpnt | 923 | drivers/scsi/eata.c | if (*(unsigned int *)SCpnt->host_scribble != i) |
SCpnt | 925 | drivers/scsi/eata.c | " irq %d.\n", BN(j), i, SCpnt->pid, |
SCpnt | 926 | drivers/scsi/eata.c | *(unsigned int *)SCpnt->host_scribble, irq); |
SCpnt | 934 | drivers/scsi/eata.c | if (tstatus == BUSY && SCpnt->device->type != TYPE_TAPE) |
SCpnt | 939 | drivers/scsi/eata.c | && SCpnt->device->type == TYPE_DISK |
SCpnt | 940 | drivers/scsi/eata.c | && HD(j)->target_reset[SCpnt->target]) |
SCpnt | 945 | drivers/scsi/eata.c | && SCpnt->device->type == TYPE_DISK |
SCpnt | 946 | drivers/scsi/eata.c | && (SCpnt->sense_buffer[2] & 0xf) == RECOVERED_ERROR) |
SCpnt | 950 | drivers/scsi/eata.c | && SCpnt->device->type == TYPE_DISK |
SCpnt | 951 | drivers/scsi/eata.c | && (SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) |
SCpnt | 958 | drivers/scsi/eata.c | HD(j)->target_reset[SCpnt->target] = FALSE; |
SCpnt | 960 | drivers/scsi/eata.c | if (spp->target_status && SCpnt->device->type == TYPE_DISK) |
SCpnt | 963 | drivers/scsi/eata.c | SCpnt->target, SCpnt->lun, SCpnt->pid, |
SCpnt | 964 | drivers/scsi/eata.c | spp->target_status, SCpnt->sense_buffer[2]); |
SCpnt | 966 | drivers/scsi/eata.c | HD(j)->target_time_out[SCpnt->target] = 0; |
SCpnt | 972 | drivers/scsi/eata.c | if (HD(j)->target_time_out[SCpnt->target] > 1) |
SCpnt | 976 | drivers/scsi/eata.c | HD(j)->target_time_out[SCpnt->target]++; |
SCpnt | 983 | drivers/scsi/eata.c | if (SCpnt->device->type != TYPE_TAPE) |
SCpnt | 1005 | drivers/scsi/eata.c | SCpnt->result = status | spp->target_status; |
SCpnt | 1011 | drivers/scsi/eata.c | if (SCpnt->result || do_trace) |
SCpnt | 1021 | drivers/scsi/eata.c | SCpnt->target, SCpnt->lun, SCpnt->pid, HD(j)->iocount); |
SCpnt | 1024 | drivers/scsi/eata.c | SCpnt->host_scribble = NULL; |
SCpnt | 1027 | drivers/scsi/eata.c | SCpnt->scsi_done(SCpnt); |
SCpnt | 94 | drivers/scsi/eata_dma.c | void eata_scsi_done (Scsi_Cmnd * SCpnt) |
SCpnt | 1333 | drivers/scsi/fdomain.c | int fdomain_16x0_queue( Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 1340 | drivers/scsi/fdomain.c | SCpnt->target, |
SCpnt | 1341 | drivers/scsi/fdomain.c | *(unsigned char *)SCpnt->cmnd, |
SCpnt | 1342 | drivers/scsi/fdomain.c | SCpnt->use_sg, |
SCpnt | 1343 | drivers/scsi/fdomain.c | SCpnt->request_bufflen ); |
SCpnt | 1348 | drivers/scsi/fdomain.c | current_SC = SCpnt; /* Save this for the done function */ |
SCpnt | 1391 | drivers/scsi/fdomain.c | static void internal_done( Scsi_Cmnd *SCpnt ) |
SCpnt | 1393 | drivers/scsi/fdomain.c | internal_done_errcode = SCpnt->result; |
SCpnt | 1397 | drivers/scsi/fdomain.c | int fdomain_16x0_command( Scsi_Cmnd *SCpnt ) |
SCpnt | 1399 | drivers/scsi/fdomain.c | fdomain_16x0_queue( SCpnt, internal_done ); |
SCpnt | 1409 | drivers/scsi/fdomain.c | void print_info( Scsi_Cmnd *SCpnt ) |
SCpnt | 1415 | drivers/scsi/fdomain.c | if (!SCpnt || !SCpnt->host) { |
SCpnt | 1419 | drivers/scsi/fdomain.c | printk( "%s\n", fdomain_16x0_info( SCpnt->host ) ); |
SCpnt | 1420 | drivers/scsi/fdomain.c | print_banner( SCpnt->host ); |
SCpnt | 1421 | drivers/scsi/fdomain.c | switch (SCpnt->SCp.phase) { |
SCpnt | 1429 | drivers/scsi/fdomain.c | SCpnt->SCp.phase, |
SCpnt | 1430 | drivers/scsi/fdomain.c | SCpnt->target, |
SCpnt | 1431 | drivers/scsi/fdomain.c | *(unsigned char *)SCpnt->cmnd, |
SCpnt | 1432 | drivers/scsi/fdomain.c | SCpnt->use_sg, |
SCpnt | 1433 | drivers/scsi/fdomain.c | SCpnt->request_bufflen ); |
SCpnt | 1435 | drivers/scsi/fdomain.c | SCpnt->SCp.sent_command, |
SCpnt | 1436 | drivers/scsi/fdomain.c | SCpnt->SCp.have_data_in, |
SCpnt | 1437 | drivers/scsi/fdomain.c | SCpnt->timeout ); |
SCpnt | 1478 | drivers/scsi/fdomain.c | int fdomain_16x0_abort( Scsi_Cmnd *SCpnt) |
SCpnt | 1496 | drivers/scsi/fdomain.c | print_info( SCpnt ); |
SCpnt | 1513 | drivers/scsi/fdomain.c | int fdomain_16x0_reset( Scsi_Cmnd *SCpnt ) |
SCpnt | 1520 | drivers/scsi/fdomain.c | if (SCpnt) printk( "fdomain: SCSI Bus Reset\n" ); |
SCpnt | 409 | drivers/scsi/in2000.c | int in2000_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 412 | drivers/scsi/in2000.c | unchar *cmd = (unchar *) SCpnt->cmnd; |
SCpnt | 413 | drivers/scsi/in2000.c | unchar target = SCpnt->target; |
SCpnt | 414 | drivers/scsi/in2000.c | void *buff = SCpnt->request_buffer; |
SCpnt | 416 | drivers/scsi/in2000.c | int bufflen = SCpnt->request_bufflen; |
SCpnt | 443 | drivers/scsi/in2000.c | for (i = 0; i < SCpnt->cmd_len; i++) printk("%02x ", cmd[i]); |
SCpnt | 449 | drivers/scsi/in2000.c | size = SCpnt->cmd_len; /* CDB length */ |
SCpnt | 487 | drivers/scsi/in2000.c | SCpnt->result = DID_TIME_OUT << 16; |
SCpnt | 488 | drivers/scsi/in2000.c | (*done)(SCpnt); |
SCpnt | 492 | drivers/scsi/in2000.c | in2000_nsegment = SCpnt->use_sg; |
SCpnt | 494 | drivers/scsi/in2000.c | if(SCpnt->use_sg){ |
SCpnt | 504 | drivers/scsi/in2000.c | in2000_SCptr = SCpnt; |
SCpnt | 512 | drivers/scsi/in2000.c | outb(SCpnt->lun & 7,INDATA); |
SCpnt | 513 | drivers/scsi/in2000.c | SCpnt->host_scribble = NULL; |
SCpnt | 557 | drivers/scsi/in2000.c | static void internal_done(Scsi_Cmnd * SCpnt) |
SCpnt | 559 | drivers/scsi/in2000.c | internal_done_errcode = SCpnt->result; |
SCpnt | 563 | drivers/scsi/in2000.c | int in2000_command(Scsi_Cmnd * SCpnt) |
SCpnt | 565 | drivers/scsi/in2000.c | in2000_queuecommand(SCpnt, internal_done); |
SCpnt | 644 | drivers/scsi/in2000.c | int in2000_abort(Scsi_Cmnd * SCpnt) |
SCpnt | 661 | drivers/scsi/in2000.c | int in2000_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 678 | drivers/scsi/in2000.c | if(SCpnt) SCpnt->flags |= NEEDS_JUMPSTART; |
SCpnt | 44 | drivers/scsi/scsi.c | static void scsi_done (Scsi_Cmnd *SCpnt); |
SCpnt | 47 | drivers/scsi/scsi.c | static void scsi_times_out (Scsi_Cmnd * SCpnt, int pid); |
SCpnt | 267 | drivers/scsi/scsi.c | static void scan_scsis_done (Scsi_Cmnd * SCpnt) |
SCpnt | 271 | drivers/scsi/scsi.c | printk ("scan_scsis_done(%d, %06x)\n", SCpnt->host, SCpnt->result); |
SCpnt | 273 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xfffe; |
SCpnt | 275 | drivers/scsi/scsi.c | if (SCpnt->request.sem != NULL) |
SCpnt | 276 | drivers/scsi/scsi.c | up(SCpnt->request.sem); |
SCpnt | 644 | drivers/scsi/scsi.c | static void scsi_times_out (Scsi_Cmnd * SCpnt, int pid) |
SCpnt | 647 | drivers/scsi/scsi.c | switch (SCpnt->internal_timeout & (IN_ABORT | IN_RESET)) |
SCpnt | 656 | drivers/scsi/scsi.c | if (!scsi_abort (SCpnt, DID_TIME_OUT, pid)) |
SCpnt | 660 | drivers/scsi/scsi.c | SCpnt->host->host_no); |
SCpnt | 661 | drivers/scsi/scsi.c | if (!scsi_reset (SCpnt)) |
SCpnt | 668 | drivers/scsi/scsi.c | printk("Unable to reset scsi host %d - ",SCpnt->host->host_no); |
SCpnt | 687 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 697 | drivers/scsi/scsi.c | SCpnt = device->host->host_queue; |
SCpnt | 698 | drivers/scsi/scsi.c | while(SCpnt){ |
SCpnt | 699 | drivers/scsi/scsi.c | if(SCpnt->target == device->id && |
SCpnt | 700 | drivers/scsi/scsi.c | SCpnt->lun == device->lun) |
SCpnt | 701 | drivers/scsi/scsi.c | if(SCpnt->request.dev < 0) break; |
SCpnt | 702 | drivers/scsi/scsi.c | SCpnt = SCpnt->next; |
SCpnt | 705 | drivers/scsi/scsi.c | if (!SCpnt) return NULL; |
SCpnt | 710 | drivers/scsi/scsi.c | memcpy(&SCpnt->request, req, sizeof(struct request)); |
SCpnt | 725 | drivers/scsi/scsi.c | SCpnt->request.bhtail = bh; |
SCpnt | 731 | drivers/scsi/scsi.c | SCpnt->request.nr_sectors -= req->nr_sectors; |
SCpnt | 734 | drivers/scsi/scsi.c | SCpnt->request.sem = NULL; /* Wait until whole thing done */ |
SCpnt | 740 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xffff; /* Busy, but no request */ |
SCpnt | 741 | drivers/scsi/scsi.c | SCpnt->request.sem = NULL; /* And no one is waiting for the device either */ |
SCpnt | 744 | drivers/scsi/scsi.c | SCpnt->use_sg = 0; /* Reset the scatter-gather flag */ |
SCpnt | 745 | drivers/scsi/scsi.c | SCpnt->old_use_sg = 0; |
SCpnt | 746 | drivers/scsi/scsi.c | SCpnt->transfersize = 0; |
SCpnt | 747 | drivers/scsi/scsi.c | SCpnt->underflow = 0; |
SCpnt | 748 | drivers/scsi/scsi.c | SCpnt->cmd_len = 0; |
SCpnt | 749 | drivers/scsi/scsi.c | return SCpnt; |
SCpnt | 770 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 786 | drivers/scsi/scsi.c | SCpnt = host->host_queue; |
SCpnt | 787 | drivers/scsi/scsi.c | while(SCpnt){ |
SCpnt | 788 | drivers/scsi/scsi.c | if(SCpnt->target == device->id && |
SCpnt | 789 | drivers/scsi/scsi.c | SCpnt->lun == device->lun) { |
SCpnt | 790 | drivers/scsi/scsi.c | SCwait = SCpnt; |
SCpnt | 791 | drivers/scsi/scsi.c | if(SCpnt->request.dev < 0) break; |
SCpnt | 793 | drivers/scsi/scsi.c | SCpnt = SCpnt->next; |
SCpnt | 802 | drivers/scsi/scsi.c | if (!SCpnt || SCpnt->request.dev >= 0) /* Might have changed */ |
SCpnt | 815 | drivers/scsi/scsi.c | memcpy(&SCpnt->request, req, sizeof(struct request)); |
SCpnt | 830 | drivers/scsi/scsi.c | SCpnt->request.bhtail = bh; |
SCpnt | 835 | drivers/scsi/scsi.c | SCpnt->request.nr_sectors -= req->nr_sectors; |
SCpnt | 838 | drivers/scsi/scsi.c | SCpnt->request.sem = NULL; /* Wait until whole thing done */ |
SCpnt | 847 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xffff; /* Busy */ |
SCpnt | 848 | drivers/scsi/scsi.c | SCpnt->request.sem = NULL; /* And no one is waiting for this to complete */ |
SCpnt | 855 | drivers/scsi/scsi.c | SCpnt->use_sg = 0; /* Reset the scatter-gather flag */ |
SCpnt | 856 | drivers/scsi/scsi.c | SCpnt->old_use_sg = 0; |
SCpnt | 857 | drivers/scsi/scsi.c | SCpnt->transfersize = 0; /* No default transfer size */ |
SCpnt | 858 | drivers/scsi/scsi.c | SCpnt->cmd_len = 0; |
SCpnt | 859 | drivers/scsi/scsi.c | SCpnt->underflow = 0; /* Do not flag underflow conditions */ |
SCpnt | 860 | drivers/scsi/scsi.c | return SCpnt; |
SCpnt | 867 | drivers/scsi/scsi.c | inline void internal_cmnd (Scsi_Cmnd * SCpnt) |
SCpnt | 876 | drivers/scsi/scsi.c | if ((unsigned long) &SCpnt < current->kernel_stack_page) |
SCpnt | 879 | drivers/scsi/scsi.c | host = SCpnt->host; |
SCpnt | 891 | drivers/scsi/scsi.c | update_timeout(SCpnt, SCpnt->timeout_per_command); |
SCpnt | 899 | drivers/scsi/scsi.c | "bufflen = %d, done = %08x)\n", SCpnt->host->host_no, SCpnt->target, SCpnt->cmnd, SCpnt->buffer, SCpnt->bufflen, SCpnt->done); |
SCpnt | 916 | drivers/scsi/scsi.c | if(!intr_count && SCpnt->host->irq) |
SCpnt | 917 | drivers/scsi/scsi.c | disable_irq(SCpnt->host->irq); |
SCpnt | 919 | drivers/scsi/scsi.c | host->hostt->queuecommand (SCpnt, scsi_done); |
SCpnt | 921 | drivers/scsi/scsi.c | if(!intr_count && SCpnt->host->irq) |
SCpnt | 922 | drivers/scsi/scsi.c | enable_irq(SCpnt->host->irq); |
SCpnt | 930 | drivers/scsi/scsi.c | temp=host->hostt->command (SCpnt); |
SCpnt | 931 | drivers/scsi/scsi.c | SCpnt->result = temp; |
SCpnt | 937 | drivers/scsi/scsi.c | scsi_done(SCpnt); |
SCpnt | 944 | drivers/scsi/scsi.c | static void scsi_request_sense (Scsi_Cmnd * SCpnt) |
SCpnt | 950 | drivers/scsi/scsi.c | SCpnt->flags |= WAS_SENSE | ASKED_FOR_SENSE; |
SCpnt | 951 | drivers/scsi/scsi.c | update_timeout(SCpnt, SENSE_TIMEOUT); |
SCpnt | 955 | drivers/scsi/scsi.c | memcpy ((void *) SCpnt->cmnd , (void *) generic_sense, |
SCpnt | 958 | drivers/scsi/scsi.c | SCpnt->cmnd[1] = SCpnt->lun << 5; |
SCpnt | 959 | drivers/scsi/scsi.c | SCpnt->cmnd[4] = sizeof(SCpnt->sense_buffer); |
SCpnt | 961 | drivers/scsi/scsi.c | SCpnt->request_buffer = &SCpnt->sense_buffer; |
SCpnt | 962 | drivers/scsi/scsi.c | SCpnt->request_bufflen = sizeof(SCpnt->sense_buffer); |
SCpnt | 963 | drivers/scsi/scsi.c | SCpnt->use_sg = 0; |
SCpnt | 964 | drivers/scsi/scsi.c | SCpnt->cmd_len = COMMAND_SIZE(SCpnt->cmnd[0]); |
SCpnt | 965 | drivers/scsi/scsi.c | internal_cmnd (SCpnt); |
SCpnt | 977 | drivers/scsi/scsi.c | void scsi_do_cmd (Scsi_Cmnd * SCpnt, const void *cmnd , |
SCpnt | 983 | drivers/scsi/scsi.c | struct Scsi_Host * host = SCpnt->host; |
SCpnt | 988 | drivers/scsi/scsi.c | int target = SCpnt->target; |
SCpnt | 1014 | drivers/scsi/scsi.c | SCpnt->pid = scsi_pid++; |
SCpnt | 1035 | drivers/scsi/scsi.c | memcpy ((void *) SCpnt->data_cmnd , (void *) cmnd, 12); |
SCpnt | 1037 | drivers/scsi/scsi.c | SCpnt->host = host; |
SCpnt | 1038 | drivers/scsi/scsi.c | SCpnt->target = target; |
SCpnt | 1039 | drivers/scsi/scsi.c | SCpnt->lun = (SCpnt->data_cmnd[1] >> 5); |
SCpnt | 1041 | drivers/scsi/scsi.c | SCpnt->bufflen = bufflen; |
SCpnt | 1042 | drivers/scsi/scsi.c | SCpnt->buffer = buffer; |
SCpnt | 1043 | drivers/scsi/scsi.c | SCpnt->flags=0; |
SCpnt | 1044 | drivers/scsi/scsi.c | SCpnt->retries=0; |
SCpnt | 1045 | drivers/scsi/scsi.c | SCpnt->allowed=retries; |
SCpnt | 1046 | drivers/scsi/scsi.c | SCpnt->done = done; |
SCpnt | 1047 | drivers/scsi/scsi.c | SCpnt->timeout_per_command = timeout; |
SCpnt | 1049 | drivers/scsi/scsi.c | memcpy ((void *) SCpnt->cmnd , (void *) cmnd, 12); |
SCpnt | 1052 | drivers/scsi/scsi.c | memset ((void *) SCpnt->sense_buffer, 0, sizeof SCpnt->sense_buffer); |
SCpnt | 1053 | drivers/scsi/scsi.c | SCpnt->request_buffer = buffer; |
SCpnt | 1054 | drivers/scsi/scsi.c | SCpnt->request_bufflen = bufflen; |
SCpnt | 1055 | drivers/scsi/scsi.c | SCpnt->old_use_sg = SCpnt->use_sg; |
SCpnt | 1056 | drivers/scsi/scsi.c | if (SCpnt->cmd_len == 0) |
SCpnt | 1057 | drivers/scsi/scsi.c | SCpnt->cmd_len = COMMAND_SIZE(SCpnt->cmnd[0]); |
SCpnt | 1058 | drivers/scsi/scsi.c | SCpnt->old_cmd_len = SCpnt->cmd_len; |
SCpnt | 1062 | drivers/scsi/scsi.c | SCpnt->internal_timeout = 0; |
SCpnt | 1063 | drivers/scsi/scsi.c | SCpnt->abort_reason = 0; |
SCpnt | 1064 | drivers/scsi/scsi.c | internal_cmnd (SCpnt); |
SCpnt | 1079 | drivers/scsi/scsi.c | static void reset (Scsi_Cmnd * SCpnt) |
SCpnt | 1082 | drivers/scsi/scsi.c | printk("scsi: reset(%d)\n", SCpnt->host->host_no); |
SCpnt | 1085 | drivers/scsi/scsi.c | SCpnt->flags |= (WAS_RESET | IS_RESETTING); |
SCpnt | 1086 | drivers/scsi/scsi.c | scsi_reset(SCpnt); |
SCpnt | 1093 | drivers/scsi/scsi.c | if(SCpnt->flags & NEEDS_JUMPSTART) { |
SCpnt | 1094 | drivers/scsi/scsi.c | SCpnt->flags &= ~NEEDS_JUMPSTART; |
SCpnt | 1095 | drivers/scsi/scsi.c | scsi_request_sense (SCpnt); |
SCpnt | 1102 | drivers/scsi/scsi.c | static int check_sense (Scsi_Cmnd * SCpnt) |
SCpnt | 1107 | drivers/scsi/scsi.c | if (((SCpnt->sense_buffer[0] & 0x70) >> 4) != 7) { |
SCpnt | 1108 | drivers/scsi/scsi.c | if(!(SCpnt->flags & ASKED_FOR_SENSE)) |
SCpnt | 1114 | drivers/scsi/scsi.c | SCpnt->flags &= ~ASKED_FOR_SENSE; |
SCpnt | 1117 | drivers/scsi/scsi.c | printk("scsi%d : ", SCpnt->host->host_no); |
SCpnt | 1118 | drivers/scsi/scsi.c | print_sense("", SCpnt); |
SCpnt | 1121 | drivers/scsi/scsi.c | if (SCpnt->sense_buffer[2] &0xe0) |
SCpnt | 1124 | drivers/scsi/scsi.c | switch (SCpnt->sense_buffer[2] & 0xf) |
SCpnt | 1174 | drivers/scsi/scsi.c | static void scsi_done (Scsi_Cmnd * SCpnt) |
SCpnt | 1180 | drivers/scsi/scsi.c | struct Scsi_Host * host = SCpnt->host; |
SCpnt | 1181 | drivers/scsi/scsi.c | int result = SCpnt->result; |
SCpnt | 1182 | drivers/scsi/scsi.c | oldto = update_timeout(SCpnt, 0); |
SCpnt | 1186 | drivers/scsi/scsi.c | result, SCpnt->target, SCpnt->lun); |
SCpnt | 1191 | drivers/scsi/scsi.c | if(host_byte(result) == DID_ABORT && SCpnt->abort_reason) |
SCpnt | 1192 | drivers/scsi/scsi.c | SCpnt->result = result = (result & 0xff00ffff) | |
SCpnt | 1193 | drivers/scsi/scsi.c | (SCpnt->abort_reason << 16); |
SCpnt | 1205 | drivers/scsi/scsi.c | if(SCpnt->flags & WAS_SENSE) |
SCpnt | 1207 | drivers/scsi/scsi.c | SCpnt->use_sg = SCpnt->old_use_sg; |
SCpnt | 1208 | drivers/scsi/scsi.c | SCpnt->cmd_len = SCpnt->old_cmd_len; |
SCpnt | 1214 | drivers/scsi/scsi.c | if (status_byte(result) && (SCpnt->flags & WAS_SENSE)) |
SCpnt | 1217 | drivers/scsi/scsi.c | SCpnt->flags &= ~WAS_SENSE; |
SCpnt | 1218 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~SENSE_TIMEOUT; |
SCpnt | 1220 | drivers/scsi/scsi.c | if (!(SCpnt->flags & WAS_RESET)) |
SCpnt | 1223 | drivers/scsi/scsi.c | SCpnt->host->host_no, SCpnt->target, SCpnt->lun); |
SCpnt | 1224 | drivers/scsi/scsi.c | reset(SCpnt); |
SCpnt | 1239 | drivers/scsi/scsi.c | if (SCpnt->flags & WAS_SENSE) |
SCpnt | 1245 | drivers/scsi/scsi.c | SCpnt->flags &= ~WAS_SENSE; |
SCpnt | 1246 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~SENSE_TIMEOUT; |
SCpnt | 1248 | drivers/scsi/scsi.c | switch (checked = check_sense(SCpnt)) |
SCpnt | 1256 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1295 | drivers/scsi/scsi.c | switch (check_sense(SCpnt)) |
SCpnt | 1298 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1311 | drivers/scsi/scsi.c | scsi_request_sense (SCpnt); |
SCpnt | 1323 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1329 | drivers/scsi/scsi.c | SCpnt->host->host_no); |
SCpnt | 1330 | drivers/scsi/scsi.c | reset(SCpnt); |
SCpnt | 1353 | drivers/scsi/scsi.c | if (SCpnt->flags & WAS_TIMEDOUT) |
SCpnt | 1365 | drivers/scsi/scsi.c | SCpnt->flags |= WAS_TIMEDOUT; |
SCpnt | 1366 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_ABORT; |
SCpnt | 1389 | drivers/scsi/scsi.c | if (SCpnt->flags & IS_RESETTING) |
SCpnt | 1391 | drivers/scsi/scsi.c | SCpnt->flags &= ~IS_RESETTING; |
SCpnt | 1398 | drivers/scsi/scsi.c | switch (check_sense(SCpnt)) { |
SCpnt | 1400 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1413 | drivers/scsi/scsi.c | scsi_request_sense (SCpnt); |
SCpnt | 1435 | drivers/scsi/scsi.c | SCpnt->allowed, SCpnt->retries); |
SCpnt | 1438 | drivers/scsi/scsi.c | if ((++SCpnt->retries) < SCpnt->allowed) |
SCpnt | 1440 | drivers/scsi/scsi.c | if ((SCpnt->retries >= (SCpnt->allowed >> 1)) |
SCpnt | 1441 | drivers/scsi/scsi.c | && !(jiffies < SCpnt->host->last_reset + MIN_RESET_PERIOD) |
SCpnt | 1442 | drivers/scsi/scsi.c | && !(SCpnt->flags & WAS_RESET)) |
SCpnt | 1445 | drivers/scsi/scsi.c | SCpnt->host->host_no); |
SCpnt | 1446 | drivers/scsi/scsi.c | reset(SCpnt); |
SCpnt | 1460 | drivers/scsi/scsi.c | if (SCpnt->flags & WAS_SENSE) |
SCpnt | 1461 | drivers/scsi/scsi.c | scsi_request_sense(SCpnt); |
SCpnt | 1464 | drivers/scsi/scsi.c | memcpy ((void *) SCpnt->cmnd, |
SCpnt | 1465 | drivers/scsi/scsi.c | (void*) SCpnt->data_cmnd, |
SCpnt | 1466 | drivers/scsi/scsi.c | sizeof(SCpnt->data_cmnd)); |
SCpnt | 1467 | drivers/scsi/scsi.c | SCpnt->request_buffer = SCpnt->buffer; |
SCpnt | 1468 | drivers/scsi/scsi.c | SCpnt->request_bufflen = SCpnt->bufflen; |
SCpnt | 1469 | drivers/scsi/scsi.c | SCpnt->use_sg = SCpnt->old_use_sg; |
SCpnt | 1470 | drivers/scsi/scsi.c | SCpnt->cmd_len = SCpnt->old_cmd_len; |
SCpnt | 1471 | drivers/scsi/scsi.c | internal_cmnd (SCpnt); |
SCpnt | 1481 | drivers/scsi/scsi.c | printk("Calling done function - at address %08x\n", SCpnt->done); |
SCpnt | 1489 | drivers/scsi/scsi.c | if (MAJOR(SCpnt->request.dev) != SCSI_DISK_MAJOR && |
SCpnt | 1490 | drivers/scsi/scsi.c | MAJOR(SCpnt->request.dev) != SCSI_CDROM_MAJOR) { |
SCpnt | 1500 | drivers/scsi/scsi.c | SCpnt->result = result | ((exit & 0xff) << 24); |
SCpnt | 1501 | drivers/scsi/scsi.c | SCpnt->use_sg = SCpnt->old_use_sg; |
SCpnt | 1502 | drivers/scsi/scsi.c | SCpnt->cmd_len = SCpnt->old_cmd_len; |
SCpnt | 1503 | drivers/scsi/scsi.c | SCpnt->done (SCpnt); |
SCpnt | 1528 | drivers/scsi/scsi.c | int scsi_abort (Scsi_Cmnd * SCpnt, int why, int pid) |
SCpnt | 1532 | drivers/scsi/scsi.c | struct Scsi_Host * host = SCpnt->host; |
SCpnt | 1543 | drivers/scsi/scsi.c | if (SCpnt->request.dev == -1 || pid != SCpnt->pid) { |
SCpnt | 1548 | drivers/scsi/scsi.c | if (SCpnt->internal_timeout & IN_ABORT) |
SCpnt | 1551 | drivers/scsi/scsi.c | while (SCpnt->internal_timeout & IN_ABORT); |
SCpnt | 1555 | drivers/scsi/scsi.c | SCpnt->internal_timeout |= IN_ABORT; |
SCpnt | 1556 | drivers/scsi/scsi.c | oldto = update_timeout(SCpnt, ABORT_TIMEOUT); |
SCpnt | 1558 | drivers/scsi/scsi.c | if ((SCpnt->flags & IS_RESETTING) && |
SCpnt | 1559 | drivers/scsi/scsi.c | SCpnt->device->soft_reset) { |
SCpnt | 1563 | drivers/scsi/scsi.c | " the bus was reset\n", SCpnt->target, SCpnt->lun); |
SCpnt | 1568 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_ABORT; |
SCpnt | 1569 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1573 | drivers/scsi/scsi.c | SCpnt->pid, SCpnt->host->host_no, (int) SCpnt->target, (int) |
SCpnt | 1574 | drivers/scsi/scsi.c | SCpnt->lun); |
SCpnt | 1575 | drivers/scsi/scsi.c | print_command (SCpnt->cmnd); |
SCpnt | 1576 | drivers/scsi/scsi.c | if (SCpnt->request.dev == -1 || pid != SCpnt->pid) |
SCpnt | 1578 | drivers/scsi/scsi.c | SCpnt->abort_reason = why; |
SCpnt | 1579 | drivers/scsi/scsi.c | switch(host->hostt->abort(SCpnt)) { |
SCpnt | 1590 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_ABORT; |
SCpnt | 1591 | drivers/scsi/scsi.c | if(SCpnt->flags & WAS_TIMEDOUT) { |
SCpnt | 1597 | drivers/scsi/scsi.c | SCpnt->flags |= WAS_TIMEDOUT; |
SCpnt | 1598 | drivers/scsi/scsi.c | oldto = SCpnt->timeout_per_command; |
SCpnt | 1599 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1608 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1616 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_ABORT; |
SCpnt | 1617 | drivers/scsi/scsi.c | update_timeout(SCpnt, 0); |
SCpnt | 1621 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_ABORT; |
SCpnt | 1628 | drivers/scsi/scsi.c | int scsi_reset (Scsi_Cmnd * SCpnt) |
SCpnt | 1633 | drivers/scsi/scsi.c | struct Scsi_Host * host = SCpnt->host; |
SCpnt | 1641 | drivers/scsi/scsi.c | if (SCpnt->internal_timeout & IN_RESET) |
SCpnt | 1644 | drivers/scsi/scsi.c | while (SCpnt->internal_timeout & IN_RESET); |
SCpnt | 1648 | drivers/scsi/scsi.c | SCpnt->internal_timeout |= IN_RESET; |
SCpnt | 1649 | drivers/scsi/scsi.c | oldto = update_timeout(SCpnt, RESET_TIMEOUT); |
SCpnt | 1660 | drivers/scsi/scsi.c | scsi_abort(SCpnt1, DID_RESET, SCpnt->pid); |
SCpnt | 1668 | drivers/scsi/scsi.c | temp = host->hostt->reset(SCpnt); |
SCpnt | 1676 | drivers/scsi/scsi.c | temp = host->hostt->reset(SCpnt); |
SCpnt | 1688 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_RESET; |
SCpnt | 1689 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1696 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_RESET; |
SCpnt | 1697 | drivers/scsi/scsi.c | scsi_request_sense (SCpnt); |
SCpnt | 1706 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_RESET; |
SCpnt | 1707 | drivers/scsi/scsi.c | update_timeout(SCpnt, 0); |
SCpnt | 1730 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 1744 | drivers/scsi/scsi.c | for(SCpnt = host->host_queue; SCpnt; SCpnt = SCpnt->next) |
SCpnt | 1745 | drivers/scsi/scsi.c | if (SCpnt->timeout == -1) |
SCpnt | 1747 | drivers/scsi/scsi.c | SCpnt->timeout = 0; |
SCpnt | 1748 | drivers/scsi/scsi.c | pid = SCpnt->pid; |
SCpnt | 1750 | drivers/scsi/scsi.c | scsi_times_out(SCpnt, pid); |
SCpnt | 1774 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 1801 | drivers/scsi/scsi.c | for(SCpnt = host->host_queue; SCpnt; SCpnt = SCpnt->next) |
SCpnt | 1802 | drivers/scsi/scsi.c | if (SCpnt->timeout > 0) { |
SCpnt | 1803 | drivers/scsi/scsi.c | SCpnt->timeout -= used; |
SCpnt | 1804 | drivers/scsi/scsi.c | if(SCpnt->timeout <= 0) SCpnt->timeout = -1; |
SCpnt | 1805 | drivers/scsi/scsi.c | if(SCpnt->timeout > 0 && SCpnt->timeout < least) |
SCpnt | 1806 | drivers/scsi/scsi.c | least = SCpnt->timeout; |
SCpnt | 1960 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt; |
SCpnt | 2000 | drivers/scsi/scsi.c | SCpnt = (Scsi_Cmnd *) scsi_init_malloc(sizeof(Scsi_Cmnd), GFP_ATOMIC); |
SCpnt | 2001 | drivers/scsi/scsi.c | SCpnt->host = SDpnt->host; |
SCpnt | 2002 | drivers/scsi/scsi.c | SCpnt->device = SDpnt; |
SCpnt | 2003 | drivers/scsi/scsi.c | SCpnt->target = SDpnt->id; |
SCpnt | 2004 | drivers/scsi/scsi.c | SCpnt->lun = SDpnt->lun; |
SCpnt | 2005 | drivers/scsi/scsi.c | SCpnt->request.dev = -1; /* Mark not busy */ |
SCpnt | 2006 | drivers/scsi/scsi.c | SCpnt->use_sg = 0; |
SCpnt | 2007 | drivers/scsi/scsi.c | SCpnt->old_use_sg = 0; |
SCpnt | 2008 | drivers/scsi/scsi.c | SCpnt->old_cmd_len = 0; |
SCpnt | 2009 | drivers/scsi/scsi.c | SCpnt->timeout = 0; |
SCpnt | 2010 | drivers/scsi/scsi.c | SCpnt->underflow = 0; |
SCpnt | 2011 | drivers/scsi/scsi.c | SCpnt->transfersize = 0; |
SCpnt | 2012 | drivers/scsi/scsi.c | SCpnt->host_scribble = NULL; |
SCpnt | 2015 | drivers/scsi/scsi.c | host->host_queue->prev = SCpnt; |
SCpnt | 2016 | drivers/scsi/scsi.c | SCpnt->next = host->host_queue; |
SCpnt | 2017 | drivers/scsi/scsi.c | SCpnt->prev = NULL; |
SCpnt | 2018 | drivers/scsi/scsi.c | host->host_queue = SCpnt; |
SCpnt | 2129 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt; |
SCpnt | 2186 | drivers/scsi/scsi.c | SCpnt = (Scsi_Cmnd *) scsi_init_malloc(sizeof(Scsi_Cmnd), GFP_ATOMIC); |
SCpnt | 2187 | drivers/scsi/scsi.c | SCpnt->host = SDpnt->host; |
SCpnt | 2188 | drivers/scsi/scsi.c | SCpnt->device = SDpnt; |
SCpnt | 2189 | drivers/scsi/scsi.c | SCpnt->target = SDpnt->id; |
SCpnt | 2190 | drivers/scsi/scsi.c | SCpnt->lun = SDpnt->lun; |
SCpnt | 2191 | drivers/scsi/scsi.c | SCpnt->request.dev = -1; /* Mark not busy */ |
SCpnt | 2192 | drivers/scsi/scsi.c | SCpnt->request.sem = NULL; |
SCpnt | 2193 | drivers/scsi/scsi.c | SCpnt->use_sg = 0; |
SCpnt | 2194 | drivers/scsi/scsi.c | SCpnt->old_use_sg = 0; |
SCpnt | 2195 | drivers/scsi/scsi.c | SCpnt->underflow = 0; |
SCpnt | 2196 | drivers/scsi/scsi.c | SCpnt->timeout = 0; |
SCpnt | 2197 | drivers/scsi/scsi.c | SCpnt->transfersize = 0; |
SCpnt | 2198 | drivers/scsi/scsi.c | SCpnt->host_scribble = NULL; |
SCpnt | 2200 | drivers/scsi/scsi.c | SCpnt->next = host->host_queue; |
SCpnt | 2201 | drivers/scsi/scsi.c | SCpnt->prev = NULL; |
SCpnt | 2202 | drivers/scsi/scsi.c | host->host_queue = SCpnt; |
SCpnt | 2204 | drivers/scsi/scsi.c | host->host_queue->prev = SCpnt; |
SCpnt | 2285 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt; |
SCpnt | 2300 | drivers/scsi/scsi.c | for(SCpnt = shpnt->host_queue; SCpnt; SCpnt = SCpnt->next) |
SCpnt | 2304 | drivers/scsi/scsi.c | if(SCpnt->request.dev != -1) { |
SCpnt | 2306 | drivers/scsi/scsi.c | for(SCpnt = shpnt->host_queue; SCpnt; SCpnt = SCpnt->next) |
SCpnt | 2307 | drivers/scsi/scsi.c | if(SCpnt->request.dev == 0xffe0) SCpnt->request.dev = -1; |
SCpnt | 2311 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xffe0; /* Mark as busy */ |
SCpnt | 2333 | drivers/scsi/scsi.c | SCpnt = sdpnt->host->host_queue->next; |
SCpnt | 2335 | drivers/scsi/scsi.c | sdpnt->host->host_queue = SCpnt; |
SCpnt | 2336 | drivers/scsi/scsi.c | if (SCpnt) SCpnt->prev = NULL; |
SCpnt | 2445 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt; |
SCpnt | 2449 | drivers/scsi/scsi.c | for(SCpnt=shpnt->host_queue; SCpnt; SCpnt = SCpnt->next) |
SCpnt | 2453 | drivers/scsi/scsi.c | i++, SCpnt->host->host_no, |
SCpnt | 2454 | drivers/scsi/scsi.c | SCpnt->target, |
SCpnt | 2455 | drivers/scsi/scsi.c | SCpnt->lun, |
SCpnt | 2456 | drivers/scsi/scsi.c | SCpnt->request.dev, |
SCpnt | 2457 | drivers/scsi/scsi.c | SCpnt->request.sector, |
SCpnt | 2458 | drivers/scsi/scsi.c | SCpnt->request.nr_sectors, |
SCpnt | 2459 | drivers/scsi/scsi.c | SCpnt->request.current_nr_sectors, |
SCpnt | 2460 | drivers/scsi/scsi.c | SCpnt->use_sg, |
SCpnt | 2461 | drivers/scsi/scsi.c | SCpnt->retries, |
SCpnt | 2462 | drivers/scsi/scsi.c | SCpnt->allowed, |
SCpnt | 2463 | drivers/scsi/scsi.c | SCpnt->flags, |
SCpnt | 2464 | drivers/scsi/scsi.c | SCpnt->timeout_per_command, |
SCpnt | 2465 | drivers/scsi/scsi.c | SCpnt->timeout, |
SCpnt | 2466 | drivers/scsi/scsi.c | SCpnt->internal_timeout, |
SCpnt | 2467 | drivers/scsi/scsi.c | SCpnt->cmnd[0], |
SCpnt | 2468 | drivers/scsi/scsi.c | SCpnt->sense_buffer[2], |
SCpnt | 2469 | drivers/scsi/scsi.c | SCpnt->result); |
SCpnt | 533 | drivers/scsi/scsi.h | static Scsi_Cmnd * end_scsi_request(Scsi_Cmnd * SCpnt, int uptodate, int sectors) |
SCpnt | 538 | drivers/scsi/scsi.h | req = &SCpnt->request; |
SCpnt | 565 | drivers/scsi/scsi.h | return SCpnt; |
SCpnt | 572 | drivers/scsi/scsi.h | if (SCpnt->host->block) { |
SCpnt | 575 | drivers/scsi/scsi.h | for (next = SCpnt->host->block; next != SCpnt->host; |
SCpnt | 582 | drivers/scsi/scsi.h | wake_up(&SCpnt->device->device_wait); |
SCpnt | 67 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xf) != 0) start = starts[(SCpnt->request.dev & 0xf) - 1]; \ |
SCpnt | 73 | drivers/scsi/scsi_debug.c | if (bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\ |
SCpnt | 79 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xfff0) != ((target + NR_REAL) << 4) +(MAJOR_NR << 8)){ \ |
SCpnt | 80 | drivers/scsi/scsi_debug.c | printk("Dev #s %x %x ",SCpnt->request.dev, target); \ |
SCpnt | 86 | drivers/scsi/scsi_debug.c | if (bufflen != 1024 && (!SCpnt->use_sg)) {printk("%x %d\n ",bufflen, SCpnt->use_sg); panic("Bad bufflen");}; \ |
SCpnt | 88 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xf) > npart) panic ("Bad partition"); \ |
SCpnt | 89 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xf) != 0) start = starts[(SCpnt->request.dev & 0xf) - 1]; \ |
SCpnt | 90 | drivers/scsi/scsi_debug.c | if (SCpnt->request.cmd != RW) panic ("Wrong operation"); \ |
SCpnt | 91 | drivers/scsi/scsi_debug.c | if (SCpnt->request.sector + start != block) panic("Wrong block."); \ |
SCpnt | 92 | drivers/scsi/scsi_debug.c | if (SCpnt->request.current_nr_sectors != 2 && (!SCpnt->use_sg)) panic ("Wrong # blocks"); \ |
SCpnt | 93 | drivers/scsi/scsi_debug.c | if (SCpnt->request.bh){ \ |
SCpnt | 94 | drivers/scsi/scsi_debug.c | if (SCpnt->request.bh->b_size != 1024) panic ("Wrong bh size"); \ |
SCpnt | 95 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.bh->b_blocknr << 1) + start != block) \ |
SCpnt | 96 | drivers/scsi/scsi_debug.c | { printk("Wrong bh block# %d %d ",SCpnt->request.bh->b_blocknr, block); \ |
SCpnt | 98 | drivers/scsi/scsi_debug.c | if (SCpnt->request.bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\ |
SCpnt | 110 | drivers/scsi/scsi_debug.c | static void scsi_dump(Scsi_Cmnd * SCpnt, int flag){ |
SCpnt | 117 | drivers/scsi/scsi_debug.c | printk("use_sg: %d",SCpnt->use_sg); |
SCpnt | 118 | drivers/scsi/scsi_debug.c | if (SCpnt->use_sg){ |
SCpnt | 119 | drivers/scsi/scsi_debug.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 120 | drivers/scsi/scsi_debug.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 126 | drivers/scsi/scsi_debug.c | printk("nosg: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 127 | drivers/scsi/scsi_debug.c | SCpnt->bufflen); |
SCpnt | 128 | drivers/scsi/scsi_debug.c | lpnt = (int *) SCpnt->request.buffer; |
SCpnt | 131 | drivers/scsi/scsi_debug.c | lpnt = (unsigned int *) SCpnt; |
SCpnt | 155 | drivers/scsi/scsi_debug.c | int scsi_debug_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 157 | drivers/scsi/scsi_debug.c | unchar *cmd = (unchar *) SCpnt->cmnd; |
SCpnt | 165 | drivers/scsi/scsi_debug.c | int target = SCpnt->target; |
SCpnt | 166 | drivers/scsi/scsi_debug.c | int bufflen = SCpnt->request_bufflen; |
SCpnt | 172 | drivers/scsi/scsi_debug.c | DEB(if (target > 1) { SCpnt->result = DID_TIME_OUT << 16;done(SCpnt);return 0;}); |
SCpnt | 174 | drivers/scsi/scsi_debug.c | buff = (unsigned char *) SCpnt->request_buffer; |
SCpnt | 176 | drivers/scsi/scsi_debug.c | if(target>=1 || SCpnt->lun != 0) { |
SCpnt | 177 | drivers/scsi/scsi_debug.c | SCpnt->result = DID_NO_CONNECT << 16; |
SCpnt | 178 | drivers/scsi/scsi_debug.c | done(SCpnt); |
SCpnt | 187 | drivers/scsi/scsi_debug.c | printk("scsi_debug: Requesting sense buffer (%x %x %x %d):", SCpnt, buff, done, bufflen); |
SCpnt | 195 | drivers/scsi/scsi_debug.c | SCpnt->result = 0; |
SCpnt | 196 | drivers/scsi/scsi_debug.c | done(SCpnt); |
SCpnt | 223 | drivers/scsi/scsi_debug.c | if(NR_REAL < 0) NR_REAL = (SCpnt->request.dev >> 4) & 0x0f; |
SCpnt | 248 | drivers/scsi/scsi_debug.c | usec = (SCpnt->request.nr_sectors << 9) * 1.0e6 / SCSI_DATARATE; |
SCpnt | 255 | drivers/scsi/scsi_debug.c | printk("(r%d)",SCpnt->request.nr_sectors); |
SCpnt | 258 | drivers/scsi/scsi_debug.c | if(SCpnt->use_sg){ |
SCpnt | 263 | drivers/scsi/scsi_debug.c | bh = SCpnt->request.bh; |
SCpnt | 289 | drivers/scsi/scsi_debug.c | if (SCpnt->use_sg) printk("Block %x (%d %d)\n",block, SCpnt->request.nr_sectors, |
SCpnt | 290 | drivers/scsi/scsi_debug.c | SCpnt->request.current_nr_sectors); |
SCpnt | 318 | drivers/scsi/scsi_debug.c | memcpy(buff+64, SCpnt, sizeof(Scsi_Cmnd)); |
SCpnt | 321 | drivers/scsi/scsi_debug.c | if(SCpnt->use_sg){ |
SCpnt | 336 | drivers/scsi/scsi_debug.c | SCpnt->result = 0; |
SCpnt | 337 | drivers/scsi/scsi_debug.c | (done)(SCpnt); |
SCpnt | 340 | drivers/scsi/scsi_debug.c | if (SCpnt->use_sg && !scsi_debug_errsts) |
SCpnt | 341 | drivers/scsi/scsi_debug.c | if(bh) scsi_dump(SCpnt, 0); |
SCpnt | 354 | drivers/scsi/scsi_debug.c | if (SCpnt->use_sg){ |
SCpnt | 355 | drivers/scsi/scsi_debug.c | if ((bufflen >> 9) != SCpnt->request.nr_sectors) |
SCpnt | 363 | drivers/scsi/scsi_debug.c | scsi_dump(SCpnt,1); |
SCpnt | 371 | drivers/scsi/scsi_debug.c | SCpnt->result = DID_NO_CONNECT << 16; |
SCpnt | 372 | drivers/scsi/scsi_debug.c | done(SCpnt); |
SCpnt | 385 | drivers/scsi/scsi_debug.c | SCint[i] = SCpnt; |
SCpnt | 398 | drivers/scsi/scsi_debug.c | SCpnt->result = scsi_debug_errsts; |
SCpnt | 409 | drivers/scsi/scsi_debug.c | SCpnt->result = scsi_debug_errsts; |
SCpnt | 422 | drivers/scsi/scsi_debug.c | static void internal_done(Scsi_Cmnd * SCpnt) |
SCpnt | 424 | drivers/scsi/scsi_debug.c | internal_done_errcode = SCpnt->result; |
SCpnt | 428 | drivers/scsi/scsi_debug.c | int scsi_debug_command(Scsi_Cmnd * SCpnt) |
SCpnt | 431 | drivers/scsi/scsi_debug.c | scsi_debug_queuecommand(SCpnt, internal_done); |
SCpnt | 528 | drivers/scsi/scsi_debug.c | int scsi_debug_abort(Scsi_Cmnd * SCpnt) |
SCpnt | 535 | drivers/scsi/scsi_debug.c | SCpnt->result = SCpnt->abort_reason << 16; |
SCpnt | 537 | drivers/scsi/scsi_debug.c | if(SCpnt == SCint[j]) { |
SCpnt | 539 | drivers/scsi/scsi_debug.c | my_done(SCpnt); |
SCpnt | 560 | drivers/scsi/scsi_debug.c | int scsi_debug_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 79 | drivers/scsi/scsi_ioctl.c | static void scsi_ioctl_done (Scsi_Cmnd * SCpnt) |
SCpnt | 83 | drivers/scsi/scsi_ioctl.c | req = &SCpnt->request; |
SCpnt | 94 | drivers/scsi/scsi_ioctl.c | Scsi_Cmnd * SCpnt; |
SCpnt | 96 | drivers/scsi/scsi_ioctl.c | SCpnt = allocate_device(NULL, dev, 1); |
SCpnt | 97 | drivers/scsi/scsi_ioctl.c | scsi_do_cmd(SCpnt, cmd, NULL, 0, |
SCpnt | 101 | drivers/scsi/scsi_ioctl.c | if (SCpnt->request.dev != 0xfffe){ |
SCpnt | 103 | drivers/scsi/scsi_ioctl.c | SCpnt->request.sem = &sem; |
SCpnt | 106 | drivers/scsi/scsi_ioctl.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 109 | drivers/scsi/scsi_ioctl.c | if(driver_byte(SCpnt->result) != 0) |
SCpnt | 110 | drivers/scsi/scsi_ioctl.c | switch(SCpnt->sense_buffer[2] & 0xf) { |
SCpnt | 123 | drivers/scsi/scsi_ioctl.c | SCpnt->result = 0; /* This is no longer considered an error */ |
SCpnt | 132 | drivers/scsi/scsi_ioctl.c | SCpnt->result); |
SCpnt | 134 | drivers/scsi/scsi_ioctl.c | sense_class(SCpnt->sense_buffer[0]), |
SCpnt | 135 | drivers/scsi/scsi_ioctl.c | sense_error(SCpnt->sense_buffer[0]), |
SCpnt | 136 | drivers/scsi/scsi_ioctl.c | SCpnt->sense_buffer[2] & 0xf); |
SCpnt | 140 | drivers/scsi/scsi_ioctl.c | result = SCpnt->result; |
SCpnt | 141 | drivers/scsi/scsi_ioctl.c | SCpnt->request.dev = -1; |
SCpnt | 142 | drivers/scsi/scsi_ioctl.c | wake_up(&SCpnt->device->device_wait); |
SCpnt | 151 | drivers/scsi/scsi_ioctl.c | Scsi_Cmnd * SCpnt; |
SCpnt | 183 | drivers/scsi/scsi_ioctl.c | SCpnt = allocate_device(NULL, dev, 1); |
SCpnt | 185 | drivers/scsi/scsi_ioctl.c | scsi_do_cmd(SCpnt, cmd, buf, needed, scsi_ioctl_done, MAX_TIMEOUT, |
SCpnt | 188 | drivers/scsi/scsi_ioctl.c | if (SCpnt->request.dev != 0xfffe){ |
SCpnt | 190 | drivers/scsi/scsi_ioctl.c | SCpnt->request.sem = &sem; |
SCpnt | 193 | drivers/scsi/scsi_ioctl.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 198 | drivers/scsi/scsi_ioctl.c | if(SCpnt->result) { |
SCpnt | 199 | drivers/scsi/scsi_ioctl.c | result = verify_area(VERIFY_WRITE, cmd_in, sizeof(SCpnt->sense_buffer)); |
SCpnt | 202 | drivers/scsi/scsi_ioctl.c | memcpy_tofs((void *) cmd_in, SCpnt->sense_buffer, sizeof(SCpnt->sense_buffer)); |
SCpnt | 210 | drivers/scsi/scsi_ioctl.c | result = SCpnt->result; |
SCpnt | 211 | drivers/scsi/scsi_ioctl.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 214 | drivers/scsi/scsi_ioctl.c | if(SCpnt->device->scsi_request_fn) |
SCpnt | 215 | drivers/scsi/scsi_ioctl.c | (*SCpnt->device->scsi_request_fn)(); |
SCpnt | 217 | drivers/scsi/scsi_ioctl.c | wake_up(&SCpnt->device->device_wait); |
SCpnt | 68 | drivers/scsi/sd.c | static void requeue_sd_request (Scsi_Cmnd * SCpnt); |
SCpnt | 181 | drivers/scsi/sd.c | static void rw_intr (Scsi_Cmnd *SCpnt) |
SCpnt | 183 | drivers/scsi/sd.c | int result = SCpnt->result; |
SCpnt | 184 | drivers/scsi/sd.c | int this_count = SCpnt->bufflen >> 9; |
SCpnt | 187 | drivers/scsi/sd.c | printk("sd%c : rw_intr(%d, %d)\n", 'a' + MINOR(SCpnt->request.dev), SCpnt->host->host_no, result); |
SCpnt | 199 | drivers/scsi/sd.c | printk("sd%c : %d sectors remain.\n", 'a' + MINOR(SCpnt->request.dev), SCpnt->request.nr_sectors); |
SCpnt | 200 | drivers/scsi/sd.c | printk("use_sg is %d\n ",SCpnt->use_sg); |
SCpnt | 202 | drivers/scsi/sd.c | if (SCpnt->use_sg) { |
SCpnt | 205 | drivers/scsi/sd.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 206 | drivers/scsi/sd.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 211 | drivers/scsi/sd.c | if (SCpnt->request.cmd == READ) |
SCpnt | 216 | drivers/scsi/sd.c | scsi_free(SCpnt->buffer, SCpnt->sglist_len); /* Free list of scatter-gather pointers */ |
SCpnt | 218 | drivers/scsi/sd.c | if (SCpnt->buffer != SCpnt->request.buffer) { |
SCpnt | 220 | drivers/scsi/sd.c | printk("nosg: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 221 | drivers/scsi/sd.c | SCpnt->bufflen); |
SCpnt | 223 | drivers/scsi/sd.c | if (SCpnt->request.cmd == READ) |
SCpnt | 224 | drivers/scsi/sd.c | memcpy(SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 225 | drivers/scsi/sd.c | SCpnt->bufflen); |
SCpnt | 226 | drivers/scsi/sd.c | scsi_free(SCpnt->buffer, SCpnt->bufflen); |
SCpnt | 234 | drivers/scsi/sd.c | if (SCpnt->request.nr_sectors > this_count) |
SCpnt | 236 | drivers/scsi/sd.c | SCpnt->request.errors = 0; |
SCpnt | 238 | drivers/scsi/sd.c | if (!SCpnt->request.bh) |
SCpnt | 242 | drivers/scsi/sd.c | 'a' + MINOR(SCpnt->request.dev)); |
SCpnt | 249 | drivers/scsi/sd.c | SCpnt->request.sector, this_count); |
SCpnt | 252 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 1, this_count); |
SCpnt | 253 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 258 | drivers/scsi/sd.c | if (SCpnt->use_sg) { |
SCpnt | 261 | drivers/scsi/sd.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 262 | drivers/scsi/sd.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 264 | drivers/scsi/sd.c | printk("err: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 265 | drivers/scsi/sd.c | SCpnt->bufflen); |
SCpnt | 271 | drivers/scsi/sd.c | scsi_free(SCpnt->buffer, SCpnt->sglist_len); /* Free list of scatter-gather pointers */ |
SCpnt | 274 | drivers/scsi/sd.c | printk("nosgerr: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 275 | drivers/scsi/sd.c | SCpnt->bufflen); |
SCpnt | 277 | drivers/scsi/sd.c | if (SCpnt->buffer != SCpnt->request.buffer) |
SCpnt | 278 | drivers/scsi/sd.c | scsi_free(SCpnt->buffer, SCpnt->bufflen); |
SCpnt | 294 | drivers/scsi/sd.c | if rscsi_disks[DEVICE_NR(SCpnt->request.dev)].remap |
SCpnt | 303 | drivers/scsi/sd.c | if ((SCpnt->sense_buffer[0] & 0x7f) == 0x70) { |
SCpnt | 304 | drivers/scsi/sd.c | if ((SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) { |
SCpnt | 305 | drivers/scsi/sd.c | if(rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->removable) { |
SCpnt | 309 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->changed = 1; |
SCpnt | 310 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, this_count); |
SCpnt | 311 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 325 | drivers/scsi/sd.c | if (SCpnt->sense_buffer[2] == ILLEGAL_REQUEST) { |
SCpnt | 326 | drivers/scsi/sd.c | if (rscsi_disks[DEVICE_NR(SCpnt->request.dev)].ten) { |
SCpnt | 327 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].ten = 0; |
SCpnt | 328 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 336 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->host->host_no, |
SCpnt | 337 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->id, |
SCpnt | 338 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->lun, result); |
SCpnt | 341 | drivers/scsi/sd.c | print_sense("sd", SCpnt); |
SCpnt | 342 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.current_nr_sectors); |
SCpnt | 343 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 356 | drivers/scsi/sd.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 384 | drivers/scsi/sd.c | SCpnt = allocate_device(&CURRENT, |
SCpnt | 386 | drivers/scsi/sd.c | else SCpnt = NULL; |
SCpnt | 396 | drivers/scsi/sd.c | if (!SCpnt && sd_template.nr_dev > 1){ |
SCpnt | 403 | drivers/scsi/sd.c | SCpnt = request_queueable(req, |
SCpnt | 405 | drivers/scsi/sd.c | if(SCpnt) break; |
SCpnt | 409 | drivers/scsi/sd.c | if (SCpnt && req->dev == -1) { |
SCpnt | 418 | drivers/scsi/sd.c | if (!SCpnt) return; /* Could not find anything to do */ |
SCpnt | 421 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 425 | drivers/scsi/sd.c | static void requeue_sd_request (Scsi_Cmnd * SCpnt) |
SCpnt | 436 | drivers/scsi/sd.c | if(!SCpnt || SCpnt->request.dev <= 0) { |
SCpnt | 441 | drivers/scsi/sd.c | dev = MINOR(SCpnt->request.dev); |
SCpnt | 442 | drivers/scsi/sd.c | block = SCpnt->request.sector; |
SCpnt | 451 | drivers/scsi/sd.c | block + SCpnt->request.nr_sectors > sd[dev].nr_sects) |
SCpnt | 453 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 466 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 471 | drivers/scsi/sd.c | printk("sd%c : real dev = /dev/sd%c, block = %d\n", 'a' + MINOR(SCpnt->request.dev), dev, block); |
SCpnt | 486 | drivers/scsi/sd.c | if((block & 1) || (SCpnt->request.nr_sectors & 1)) { |
SCpnt | 488 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 492 | drivers/scsi/sd.c | switch (SCpnt->request.cmd) |
SCpnt | 497 | drivers/scsi/sd.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 506 | drivers/scsi/sd.c | panic ("Unknown sd command %d\n", SCpnt->request.cmd); |
SCpnt | 509 | drivers/scsi/sd.c | SCpnt->this_count = 0; |
SCpnt | 513 | drivers/scsi/sd.c | contiguous = (!CLUSTERABLE_DEVICE(SCpnt) ? 0 :1); |
SCpnt | 515 | drivers/scsi/sd.c | bounce_size = (SCpnt->request.nr_sectors << 9); |
SCpnt | 522 | drivers/scsi/sd.c | if (contiguous && SCpnt->request.bh && |
SCpnt | 523 | drivers/scsi/sd.c | ((long) SCpnt->request.bh->b_data) + (SCpnt->request.nr_sectors << 9) - 1 > |
SCpnt | 524 | drivers/scsi/sd.c | ISA_DMA_THRESHOLD && SCpnt->host->unchecked_isa_dma) { |
SCpnt | 525 | drivers/scsi/sd.c | if(((long) SCpnt->request.bh->b_data) > ISA_DMA_THRESHOLD) |
SCpnt | 530 | drivers/scsi/sd.c | if(contiguous && SCpnt->request.bh && SCpnt->request.bh->b_reqnext) |
SCpnt | 531 | drivers/scsi/sd.c | for(bh = SCpnt->request.bh, bhp = bh->b_reqnext; bhp; bh = bhp, |
SCpnt | 539 | drivers/scsi/sd.c | if (!SCpnt->request.bh || contiguous) { |
SCpnt | 542 | drivers/scsi/sd.c | this_count = SCpnt->request.nr_sectors; |
SCpnt | 543 | drivers/scsi/sd.c | buff = SCpnt->request.buffer; |
SCpnt | 544 | drivers/scsi/sd.c | SCpnt->use_sg = 0; |
SCpnt | 546 | drivers/scsi/sd.c | } else if (SCpnt->host->sg_tablesize == 0 || |
SCpnt | 557 | drivers/scsi/sd.c | if (SCpnt->host->sg_tablesize != 0 && |
SCpnt | 562 | drivers/scsi/sd.c | this_count = SCpnt->request.current_nr_sectors; |
SCpnt | 563 | drivers/scsi/sd.c | buff = SCpnt->request.buffer; |
SCpnt | 564 | drivers/scsi/sd.c | SCpnt->use_sg = 0; |
SCpnt | 573 | drivers/scsi/sd.c | bh = SCpnt->request.bh; |
SCpnt | 581 | drivers/scsi/sd.c | !CLUSTERABLE_DEVICE(SCpnt) || |
SCpnt | 582 | drivers/scsi/sd.c | (SCpnt->host->unchecked_isa_dma && |
SCpnt | 584 | drivers/scsi/sd.c | if (count < SCpnt->host->sg_tablesize) count++; |
SCpnt | 592 | drivers/scsi/sd.c | if(SCpnt->host->unchecked_isa_dma && |
SCpnt | 593 | drivers/scsi/sd.c | ((unsigned int) SCpnt->request.bh->b_data-1) == ISA_DMA_THRESHOLD) count--; |
SCpnt | 595 | drivers/scsi/sd.c | SCpnt->use_sg = count; /* Number of chains */ |
SCpnt | 597 | drivers/scsi/sd.c | while( count < (SCpnt->use_sg * sizeof(struct scatterlist))) |
SCpnt | 599 | drivers/scsi/sd.c | SCpnt->sglist_len = count; |
SCpnt | 601 | drivers/scsi/sd.c | if(SCpnt->host->sg_tablesize < max_sg) max_sg = SCpnt->host->sg_tablesize; |
SCpnt | 606 | drivers/scsi/sd.c | SCpnt->use_sg = 0; /* No memory left - bail out */ |
SCpnt | 607 | drivers/scsi/sd.c | this_count = SCpnt->request.current_nr_sectors; |
SCpnt | 608 | drivers/scsi/sd.c | buff = SCpnt->request.buffer; |
SCpnt | 612 | drivers/scsi/sd.c | for(count = 0, bh = SCpnt->request.bh, bhp = bh->b_reqnext; |
SCpnt | 613 | drivers/scsi/sd.c | count < SCpnt->use_sg && bh; |
SCpnt | 623 | drivers/scsi/sd.c | ISA_DMA_THRESHOLD && (SCpnt->host->unchecked_isa_dma) && |
SCpnt | 646 | drivers/scsi/sd.c | this_count = SCpnt->request.current_nr_sectors; |
SCpnt | 647 | drivers/scsi/sd.c | buff = SCpnt->request.buffer; |
SCpnt | 648 | drivers/scsi/sd.c | SCpnt->use_sg = 0; |
SCpnt | 649 | drivers/scsi/sd.c | scsi_free(sgpnt, SCpnt->sglist_len); |
SCpnt | 651 | drivers/scsi/sd.c | SCpnt->use_sg = count; |
SCpnt | 662 | drivers/scsi/sd.c | if(bhp && CONTIGUOUS_BUFFERS(bh,bhp) && CLUSTERABLE_DEVICE(SCpnt)) { |
SCpnt | 667 | drivers/scsi/sd.c | (SCpnt->host->unchecked_isa_dma) && |
SCpnt | 675 | drivers/scsi/sd.c | max_sg = SCpnt->use_sg; |
SCpnt | 687 | drivers/scsi/sd.c | if (SCpnt->use_sg < max_sg) SCpnt->use_sg++; |
SCpnt | 693 | drivers/scsi/sd.c | if(count < SCpnt->use_sg || SCpnt->use_sg > SCpnt->host->sg_tablesize){ |
SCpnt | 694 | drivers/scsi/sd.c | bh = SCpnt->request.bh; |
SCpnt | 695 | drivers/scsi/sd.c | printk("Use sg, count %d %x %d\n", SCpnt->use_sg, count, dma_free_sectors); |
SCpnt | 701 | drivers/scsi/sd.c | if(SCpnt->use_sg < 16) |
SCpnt | 702 | drivers/scsi/sd.c | for(count=0; count<SCpnt->use_sg; count++) |
SCpnt | 710 | drivers/scsi/sd.c | if (SCpnt->request.cmd == WRITE) |
SCpnt | 711 | drivers/scsi/sd.c | for(count=0; count<SCpnt->use_sg; count++) |
SCpnt | 720 | drivers/scsi/sd.c | if(SCpnt->use_sg == 0){ |
SCpnt | 722 | drivers/scsi/sd.c | (SCpnt->host->unchecked_isa_dma)) { |
SCpnt | 728 | drivers/scsi/sd.c | this_count = SCpnt->request.current_nr_sectors; |
SCpnt | 732 | drivers/scsi/sd.c | if (SCpnt->request.cmd == WRITE) |
SCpnt | 733 | drivers/scsi/sd.c | memcpy(buff, (char *)SCpnt->request.buffer, this_count << 9); |
SCpnt | 737 | drivers/scsi/sd.c | printk("sd%c : %s %d/%d 512 byte blocks.\n", 'a' + MINOR(SCpnt->request.dev), |
SCpnt | 738 | drivers/scsi/sd.c | (SCpnt->request.cmd == WRITE) ? "writing" : "reading", |
SCpnt | 739 | drivers/scsi/sd.c | this_count, SCpnt->request.nr_sectors); |
SCpnt | 742 | drivers/scsi/sd.c | cmd[1] = (SCpnt->lun << 5) & 0xe0; |
SCpnt | 788 | drivers/scsi/sd.c | SCpnt->transfersize = rscsi_disks[dev].sector_size; |
SCpnt | 789 | drivers/scsi/sd.c | SCpnt->underflow = this_count << 9; |
SCpnt | 790 | drivers/scsi/sd.c | scsi_do_cmd (SCpnt, (void *) cmd, buff, |
SCpnt | 793 | drivers/scsi/sd.c | (SCpnt->device->type == TYPE_DISK ? |
SCpnt | 832 | drivers/scsi/sd.c | static void sd_init_done (Scsi_Cmnd * SCpnt) |
SCpnt | 836 | drivers/scsi/sd.c | req = &SCpnt->request; |
SCpnt | 850 | drivers/scsi/sd.c | Scsi_Cmnd * SCpnt; |
SCpnt | 856 | drivers/scsi/sd.c | SCpnt = allocate_device(NULL, rscsi_disks[i].device, 1); |
SCpnt | 867 | drivers/scsi/sd.c | SCpnt->request.dev = 0xffff; /* Mark as really busy again */ |
SCpnt | 868 | drivers/scsi/sd.c | SCpnt->cmd_len = 0; |
SCpnt | 869 | drivers/scsi/sd.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 870 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] = 0; |
SCpnt | 872 | drivers/scsi/sd.c | scsi_do_cmd (SCpnt, |
SCpnt | 877 | drivers/scsi/sd.c | while(SCpnt->request.dev != 0xfffe); |
SCpnt | 879 | drivers/scsi/sd.c | the_result = SCpnt->result; |
SCpnt | 884 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] == NOT_READY) { |
SCpnt | 893 | drivers/scsi/sd.c | SCpnt->request.dev = 0xffff; /* Mark as really busy again */ |
SCpnt | 894 | drivers/scsi/sd.c | SCpnt->cmd_len = 0; |
SCpnt | 895 | drivers/scsi/sd.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 896 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] = 0; |
SCpnt | 898 | drivers/scsi/sd.c | scsi_do_cmd (SCpnt, |
SCpnt | 903 | drivers/scsi/sd.c | while(SCpnt->request.dev != 0xfffe); |
SCpnt | 928 | drivers/scsi/sd.c | SCpnt->request.dev = 0xffff; /* Mark as really busy again */ |
SCpnt | 929 | drivers/scsi/sd.c | SCpnt->cmd_len = 0; |
SCpnt | 930 | drivers/scsi/sd.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 931 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] = 0; |
SCpnt | 933 | drivers/scsi/sd.c | scsi_do_cmd (SCpnt, |
SCpnt | 939 | drivers/scsi/sd.c | while(SCpnt->request.dev != 0xfffe); |
SCpnt | 941 | drivers/scsi/sd.c | if (SCpnt->request.dev != 0xfffe){ |
SCpnt | 943 | drivers/scsi/sd.c | SCpnt->request.sem = &sem; |
SCpnt | 946 | drivers/scsi/sd.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 949 | drivers/scsi/sd.c | the_result = SCpnt->result; |
SCpnt | 954 | drivers/scsi/sd.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 956 | drivers/scsi/sd.c | wake_up(&SCpnt->device->device_wait); |
SCpnt | 984 | drivers/scsi/sd.c | printk("sd%c : extended sense code = %1x \n", 'a' + i, SCpnt->sense_buffer[2] & 0xf); |
SCpnt | 995 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] == NOT_READY) |
SCpnt | 511 | drivers/scsi/seagate.c | int seagate_st0x_queue_command (Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 517 | drivers/scsi/seagate.c | current_target = SCpnt->target; |
SCpnt | 518 | drivers/scsi/seagate.c | current_lun = SCpnt->lun; |
SCpnt | 519 | drivers/scsi/seagate.c | (const void *) current_cmnd = SCpnt->cmnd; |
SCpnt | 520 | drivers/scsi/seagate.c | current_data = (unsigned char *) SCpnt->request_buffer; |
SCpnt | 521 | drivers/scsi/seagate.c | current_bufflen = SCpnt->request_bufflen; |
SCpnt | 522 | drivers/scsi/seagate.c | SCint = SCpnt; |
SCpnt | 533 | drivers/scsi/seagate.c | current_cmnd[SCpnt->cmd_len] |= 0x01; |
SCpnt | 572 | drivers/scsi/seagate.c | int seagate_st0x_command (Scsi_Cmnd * SCpnt) { |
SCpnt | 573 | drivers/scsi/seagate.c | return internal_command (SCpnt->target, SCpnt->lun, SCpnt->cmnd, SCpnt->request_buffer, |
SCpnt | 574 | drivers/scsi/seagate.c | SCpnt->request_bufflen, |
SCpnt | 1548 | drivers/scsi/seagate.c | int seagate_st0x_abort (Scsi_Cmnd * SCpnt) |
SCpnt | 1559 | drivers/scsi/seagate.c | int seagate_st0x_reset (Scsi_Cmnd * SCpnt) |
SCpnt | 206 | drivers/scsi/sg.c | static void sg_command_done(Scsi_Cmnd * SCpnt) |
SCpnt | 208 | drivers/scsi/sg.c | int dev=SCpnt->request.dev; |
SCpnt | 213 | drivers/scsi/sg.c | SCpnt->request.dev=-1; |
SCpnt | 216 | drivers/scsi/sg.c | memcpy(device->header.sense_buffer, SCpnt->sense_buffer, sizeof(SCpnt->sense_buffer)); |
SCpnt | 217 | drivers/scsi/sg.c | if (SCpnt->sense_buffer[0]) |
SCpnt | 222 | drivers/scsi/sg.c | device->header.result=SCpnt->result; |
SCpnt | 224 | drivers/scsi/sg.c | SCpnt->request.dev=-1; |
SCpnt | 231 | drivers/scsi/sg.c | Scsi_Cmnd *SCpnt; |
SCpnt | 278 | drivers/scsi/sg.c | if (!(SCpnt=allocate_device(NULL,device->device, !(filp->f_flags & O_NONBLOCK)))) |
SCpnt | 290 | drivers/scsi/sg.c | SCpnt->request.dev=dev; |
SCpnt | 291 | drivers/scsi/sg.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 295 | drivers/scsi/sg.c | SCpnt->cmd_len = size; |
SCpnt | 315 | drivers/scsi/sg.c | scsi_do_cmd (SCpnt,(void *) cmnd, |
SCpnt | 61 | drivers/scsi/sr.c | void requeue_sr_request (Scsi_Cmnd * SCpnt); |
SCpnt | 140 | drivers/scsi/sr.c | static void rw_intr (Scsi_Cmnd * SCpnt) |
SCpnt | 142 | drivers/scsi/sr.c | int result = SCpnt->result; |
SCpnt | 143 | drivers/scsi/sr.c | int this_count = SCpnt->this_count; |
SCpnt | 146 | drivers/scsi/sr.c | printk("sr.c done: %x %x\n",result, SCpnt->request.bh->b_data); |
SCpnt | 150 | drivers/scsi/sr.c | if (SCpnt->use_sg == 0) { |
SCpnt | 151 | drivers/scsi/sr.c | if (SCpnt->buffer != SCpnt->request.buffer) |
SCpnt | 154 | drivers/scsi/sr.c | offset = (SCpnt->request.sector % 4) << 9; |
SCpnt | 155 | drivers/scsi/sr.c | memcpy((char *)SCpnt->request.buffer, |
SCpnt | 156 | drivers/scsi/sr.c | (char *)SCpnt->buffer + offset, |
SCpnt | 163 | drivers/scsi/sr.c | SCpnt->request.nr_sectors > this_count && |
SCpnt | 164 | drivers/scsi/sr.c | SCpnt->request.bh && |
SCpnt | 165 | drivers/scsi/sr.c | SCpnt->request.bh->b_reqnext && |
SCpnt | 166 | drivers/scsi/sr.c | SCpnt->request.bh->b_reqnext->b_size == 1024) { |
SCpnt | 167 | drivers/scsi/sr.c | memcpy((char *)SCpnt->request.bh->b_reqnext->b_data, |
SCpnt | 168 | drivers/scsi/sr.c | (char *)SCpnt->buffer + 1024, |
SCpnt | 173 | drivers/scsi/sr.c | scsi_free(SCpnt->buffer, 2048); |
SCpnt | 178 | drivers/scsi/sr.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 179 | drivers/scsi/sr.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 187 | drivers/scsi/sr.c | scsi_free(SCpnt->buffer, SCpnt->sglist_len); /* Free list of scatter-gather pointers */ |
SCpnt | 188 | drivers/scsi/sr.c | if(SCpnt->request.sector % 4) this_count -= 2; |
SCpnt | 190 | drivers/scsi/sr.c | if(this_count > SCpnt->request.nr_sectors) |
SCpnt | 195 | drivers/scsi/sr.c | printk("(%x %x %x) ",SCpnt->request.bh, SCpnt->request.nr_sectors, |
SCpnt | 198 | drivers/scsi/sr.c | if (SCpnt->request.nr_sectors > this_count) |
SCpnt | 200 | drivers/scsi/sr.c | SCpnt->request.errors = 0; |
SCpnt | 201 | drivers/scsi/sr.c | if (!SCpnt->request.bh) |
SCpnt | 203 | drivers/scsi/sr.c | SCpnt->request.sector, this_count); |
SCpnt | 206 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 1, this_count); /* All done */ |
SCpnt | 207 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 214 | drivers/scsi/sr.c | if (SCpnt->use_sg) { |
SCpnt | 217 | drivers/scsi/sr.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 218 | drivers/scsi/sr.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 223 | drivers/scsi/sr.c | scsi_free(SCpnt->buffer, SCpnt->sglist_len); /* Free list of scatter-gather pointers */ |
SCpnt | 225 | drivers/scsi/sr.c | if (SCpnt->buffer != SCpnt->request.buffer) |
SCpnt | 226 | drivers/scsi/sr.c | scsi_free(SCpnt->buffer, SCpnt->bufflen); |
SCpnt | 230 | drivers/scsi/sr.c | if ((SCpnt->sense_buffer[0] & 0x7f) == 0x70) { |
SCpnt | 231 | drivers/scsi/sr.c | if ((SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) { |
SCpnt | 235 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->changed = 1; |
SCpnt | 236 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, this_count); |
SCpnt | 237 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 242 | drivers/scsi/sr.c | if (SCpnt->sense_buffer[2] == ILLEGAL_REQUEST) { |
SCpnt | 244 | drivers/scsi/sr.c | print_sense("sr", SCpnt); |
SCpnt | 246 | drivers/scsi/sr.c | print_command(SCpnt->cmnd); |
SCpnt | 247 | drivers/scsi/sr.c | if (scsi_CDs[DEVICE_NR(SCpnt->request.dev)].ten) { |
SCpnt | 248 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].ten = 0; |
SCpnt | 249 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 253 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, this_count); |
SCpnt | 254 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); /* Do next request */ |
SCpnt | 260 | drivers/scsi/sr.c | if (SCpnt->sense_buffer[2] == NOT_READY) { |
SCpnt | 262 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, this_count); |
SCpnt | 263 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); /* Do next request */ |
SCpnt | 271 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->host->host_no, |
SCpnt | 272 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->id, |
SCpnt | 273 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->lun, |
SCpnt | 277 | drivers/scsi/sr.c | print_sense("sr", SCpnt); |
SCpnt | 279 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.current_nr_sectors); |
SCpnt | 280 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 484 | drivers/scsi/sr.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 500 | drivers/scsi/sr.c | SCpnt = allocate_device(&CURRENT, |
SCpnt | 502 | drivers/scsi/sr.c | else SCpnt = NULL; |
SCpnt | 512 | drivers/scsi/sr.c | if (!SCpnt && sr_template.nr_dev > 1){ |
SCpnt | 519 | drivers/scsi/sr.c | SCpnt = request_queueable(req, |
SCpnt | 521 | drivers/scsi/sr.c | if(SCpnt) break; |
SCpnt | 525 | drivers/scsi/sr.c | if (SCpnt && req->dev == -1) { |
SCpnt | 534 | drivers/scsi/sr.c | if (!SCpnt) |
SCpnt | 540 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 544 | drivers/scsi/sr.c | void requeue_sr_request (Scsi_Cmnd * SCpnt) |
SCpnt | 553 | drivers/scsi/sr.c | if(!SCpnt || SCpnt->request.dev <= 0) { |
SCpnt | 558 | drivers/scsi/sr.c | dev = MINOR(SCpnt->request.dev); |
SCpnt | 559 | drivers/scsi/sr.c | block = SCpnt->request.sector; |
SCpnt | 566 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 574 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 585 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 590 | drivers/scsi/sr.c | switch (SCpnt->request.cmd) |
SCpnt | 593 | drivers/scsi/sr.c | SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 600 | drivers/scsi/sr.c | panic ("Unknown sr command %d\n", SCpnt->request.cmd); |
SCpnt | 603 | drivers/scsi/sr.c | cmd[1] = (SCpnt->lun << 5) & 0xe0; |
SCpnt | 621 | drivers/scsi/sr.c | SCpnt->use_sg = 0; |
SCpnt | 623 | drivers/scsi/sr.c | if (SCpnt->host->sg_tablesize > 0 && |
SCpnt | 629 | drivers/scsi/sr.c | bh = SCpnt->request.bh; |
SCpnt | 635 | drivers/scsi/sr.c | this_count = SCpnt->request.sector % 4; |
SCpnt | 637 | drivers/scsi/sr.c | while(bh && count < SCpnt->host->sg_tablesize) { |
SCpnt | 646 | drivers/scsi/sr.c | if (count < SCpnt->host->sg_tablesize) { |
SCpnt | 655 | drivers/scsi/sr.c | SCpnt->use_sg = count; /* Number of chains */ |
SCpnt | 657 | drivers/scsi/sr.c | while( count < (SCpnt->use_sg * sizeof(struct scatterlist))) |
SCpnt | 659 | drivers/scsi/sr.c | SCpnt->sglist_len = count; |
SCpnt | 663 | drivers/scsi/sr.c | SCpnt->use_sg = 0; /* No memory left - bail out */ |
SCpnt | 667 | drivers/scsi/sr.c | bh = SCpnt->request.bh; |
SCpnt | 668 | drivers/scsi/sr.c | if(SCpnt->request.sector % 4) { |
SCpnt | 669 | drivers/scsi/sr.c | sgpnt[count].length = (SCpnt->request.sector % 4) << 9; |
SCpnt | 676 | drivers/scsi/sr.c | for(bh = SCpnt->request.bh; count < SCpnt->use_sg; |
SCpnt | 687 | drivers/scsi/sr.c | if (count+1 != SCpnt->use_sg) panic("Bad sr request list"); |
SCpnt | 691 | drivers/scsi/sr.c | ISA_DMA_THRESHOLD & (SCpnt->host->unchecked_isa_dma)) { |
SCpnt | 712 | drivers/scsi/sr.c | SCpnt->use_sg = 0; |
SCpnt | 713 | drivers/scsi/sr.c | scsi_free(buffer, SCpnt->sglist_len); |
SCpnt | 719 | drivers/scsi/sr.c | printk("SR: %d %d %d %d %d *** ",SCpnt->use_sg, SCpnt->request.sector, |
SCpnt | 721 | drivers/scsi/sr.c | SCpnt->request.current_nr_sectors, |
SCpnt | 722 | drivers/scsi/sr.c | SCpnt->request.nr_sectors); |
SCpnt | 723 | drivers/scsi/sr.c | for(count=0; count<SCpnt->use_sg; count++) |
SCpnt | 732 | drivers/scsi/sr.c | if (SCpnt->use_sg == 0){ |
SCpnt | 734 | drivers/scsi/sr.c | if (!SCpnt->request.bh) |
SCpnt | 735 | drivers/scsi/sr.c | this_count = SCpnt->request.nr_sectors; |
SCpnt | 737 | drivers/scsi/sr.c | this_count = (SCpnt->request.bh->b_size >> 9); |
SCpnt | 753 | drivers/scsi/sr.c | buffer = (unsigned char *) SCpnt->request.buffer; |
SCpnt | 755 | drivers/scsi/sr.c | (SCpnt->host->unchecked_isa_dma)) |
SCpnt | 805 | drivers/scsi/sr.c | printk("Use sg: %d\n", SCpnt->use_sg); |
SCpnt | 822 | drivers/scsi/sr.c | SCpnt->transfersize = (scsi_CDs[dev].sector_size > 1024) ? |
SCpnt | 825 | drivers/scsi/sr.c | SCpnt->this_count = this_count; |
SCpnt | 826 | drivers/scsi/sr.c | scsi_do_cmd (SCpnt, (void *) cmd, buffer, |
SCpnt | 868 | drivers/scsi/sr.c | static void sr_init_done (Scsi_Cmnd * SCpnt) |
SCpnt | 872 | drivers/scsi/sr.c | req = &SCpnt->request; |
SCpnt | 884 | drivers/scsi/sr.c | Scsi_Cmnd * SCpnt; |
SCpnt | 887 | drivers/scsi/sr.c | SCpnt = allocate_device(NULL, scsi_CDs[i].device, 1); |
SCpnt | 894 | drivers/scsi/sr.c | SCpnt->request.dev = 0xffff; /* Mark as really busy */ |
SCpnt | 895 | drivers/scsi/sr.c | SCpnt->cmd_len = 0; |
SCpnt | 899 | drivers/scsi/sr.c | scsi_do_cmd (SCpnt, |
SCpnt | 905 | drivers/scsi/sr.c | while(SCpnt->request.dev != 0xfffe); |
SCpnt | 907 | drivers/scsi/sr.c | if (SCpnt->request.dev != 0xfffe){ |
SCpnt | 909 | drivers/scsi/sr.c | SCpnt->request.sem = &sem; |
SCpnt | 912 | drivers/scsi/sr.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 915 | drivers/scsi/sr.c | the_result = SCpnt->result; |
SCpnt | 920 | drivers/scsi/sr.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 922 | drivers/scsi/sr.c | wake_up(&SCpnt->device->device_wait); |
SCpnt | 22 | drivers/scsi/sr_ioctl.c | static void sr_ioctl_done(Scsi_Cmnd * SCpnt) |
SCpnt | 26 | drivers/scsi/sr_ioctl.c | req = &SCpnt->request; |
SCpnt | 40 | drivers/scsi/sr_ioctl.c | Scsi_Cmnd * SCpnt; |
SCpnt | 43 | drivers/scsi/sr_ioctl.c | SCpnt = allocate_device(NULL, scsi_CDs[target].device, 1); |
SCpnt | 44 | drivers/scsi/sr_ioctl.c | scsi_do_cmd(SCpnt, |
SCpnt | 49 | drivers/scsi/sr_ioctl.c | if (SCpnt->request.dev != 0xfffe){ |
SCpnt | 51 | drivers/scsi/sr_ioctl.c | SCpnt->request.sem = &sem; |
SCpnt | 54 | drivers/scsi/sr_ioctl.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 57 | drivers/scsi/sr_ioctl.c | result = SCpnt->result; |
SCpnt | 61 | drivers/scsi/sr_ioctl.c | switch(SCpnt->sense_buffer[2] & 0xf) { |
SCpnt | 79 | drivers/scsi/sr_ioctl.c | sense_class(SCpnt->sense_buffer[0]), |
SCpnt | 80 | drivers/scsi/sr_ioctl.c | sense_error(SCpnt->sense_buffer[0]), |
SCpnt | 81 | drivers/scsi/sr_ioctl.c | SCpnt->sense_buffer[2] & 0xf); |
SCpnt | 85 | drivers/scsi/sr_ioctl.c | result = SCpnt->result; |
SCpnt | 86 | drivers/scsi/sr_ioctl.c | SCpnt->request.dev = -1; /* Deallocate */ |
SCpnt | 87 | drivers/scsi/sr_ioctl.c | wake_up(&SCpnt->device->device_wait); |
SCpnt | 109 | drivers/scsi/st.c | st_chk_result(Scsi_Cmnd * SCpnt) |
SCpnt | 111 | drivers/scsi/st.c | int dev = SCpnt->request.dev; |
SCpnt | 112 | drivers/scsi/st.c | int result = SCpnt->result; |
SCpnt | 113 | drivers/scsi/st.c | unsigned char * sense = SCpnt->sense_buffer; |
SCpnt | 116 | drivers/scsi/st.c | if (!result && SCpnt->sense_buffer[0] == 0) |
SCpnt | 121 | drivers/scsi/st.c | SCpnt->cmnd[0], SCpnt->cmnd[1], SCpnt->cmnd[2], |
SCpnt | 122 | drivers/scsi/st.c | SCpnt->cmnd[3], SCpnt->cmnd[4], SCpnt->cmnd[5], |
SCpnt | 123 | drivers/scsi/st.c | SCpnt->request_bufflen); |
SCpnt | 125 | drivers/scsi/st.c | print_sense("st", SCpnt); |
SCpnt | 134 | drivers/scsi/st.c | && SCpnt->cmnd[0] != WRITE_6 |
SCpnt | 135 | drivers/scsi/st.c | && SCpnt->cmnd[0] != WRITE_FILEMARKS |
SCpnt | 140 | drivers/scsi/st.c | if (SCpnt->cmnd[0] == READ_6) |
SCpnt | 142 | drivers/scsi/st.c | else if (SCpnt->cmnd[0] == WRITE_6) |
SCpnt | 156 | drivers/scsi/st.c | st_sleep_done (Scsi_Cmnd * SCpnt) |
SCpnt | 161 | drivers/scsi/st.c | if ((st_nbr = SCpnt->request.dev) < st_template.nr_dev && st_nbr >= 0) { |
SCpnt | 164 | drivers/scsi/st.c | (SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 165 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x40)) { |
SCpnt | 167 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x80) != 0) |
SCpnt | 168 | drivers/scsi/st.c | remainder = (SCpnt->sense_buffer[3] << 24) | |
SCpnt | 169 | drivers/scsi/st.c | (SCpnt->sense_buffer[4] << 16) | |
SCpnt | 170 | drivers/scsi/st.c | (SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6]; |
SCpnt | 173 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW || |
SCpnt | 175 | drivers/scsi/st.c | (STp->buffer)->last_result = SCpnt->result; /* Error */ |
SCpnt | 180 | drivers/scsi/st.c | (STp->buffer)->last_result = SCpnt->result; |
SCpnt | 181 | drivers/scsi/st.c | (STp->buffer)->last_result_fatal = st_chk_result(SCpnt); |
SCpnt | 183 | drivers/scsi/st.c | SCpnt->request.dev = -1; |
SCpnt | 185 | drivers/scsi/st.c | SCpnt->request.dev = 0xffff; |
SCpnt | 238 | drivers/scsi/st.c | Scsi_Cmnd *SCpnt; |
SCpnt | 247 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 248 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 249 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 250 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 254 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 255 | drivers/scsi/st.c | SCpnt->request.dev = -1; |
SCpnt | 274 | drivers/scsi/st.c | Scsi_Cmnd *SCpnt; |
SCpnt | 293 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 304 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 312 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 313 | drivers/scsi/st.c | scsi_do_cmd (SCpnt, |
SCpnt | 317 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 321 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 322 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x40) && |
SCpnt | 323 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) != VOLUME_OVERFLOW) { |
SCpnt | 338 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 398 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt; |
SCpnt | 434 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 435 | drivers/scsi/st.c | if (!SCpnt) { |
SCpnt | 440 | drivers/scsi/st.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 443 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 444 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 449 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 451 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 452 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == UNIT_ATTENTION) { /* New media? */ |
SCpnt | 454 | drivers/scsi/st.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 457 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 458 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 463 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 469 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 470 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == NO_TAPE) { |
SCpnt | 475 | drivers/scsi/st.c | printk("st%d: Error %x.\n", dev, SCpnt->result); |
SCpnt | 479 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 490 | drivers/scsi/st.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 493 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 494 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 498 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 500 | drivers/scsi/st.c | if (!SCpnt->result && !SCpnt->sense_buffer[0]) { |
SCpnt | 519 | drivers/scsi/st.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 523 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 524 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 528 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 538 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 613 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt; |
SCpnt | 631 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 633 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 637 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 638 | drivers/scsi/st.c | scsi_do_cmd( SCpnt, |
SCpnt | 642 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 645 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 649 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 697 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt; |
SCpnt | 760 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 796 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 797 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 798 | drivers/scsi/st.c | scsi_do_cmd (SCpnt, |
SCpnt | 802 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 809 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 810 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x40)) { |
SCpnt | 811 | drivers/scsi/st.c | if (STp->block_size != 0 && (SCpnt->sense_buffer[0] & 0x80) != 0) |
SCpnt | 812 | drivers/scsi/st.c | transfer = (SCpnt->sense_buffer[3] << 24) | |
SCpnt | 813 | drivers/scsi/st.c | (SCpnt->sense_buffer[4] << 16) | |
SCpnt | 814 | drivers/scsi/st.c | (SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6]; |
SCpnt | 816 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW) |
SCpnt | 854 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 884 | drivers/scsi/st.c | SCpnt->request.dev = -1; |
SCpnt | 907 | drivers/scsi/st.c | SCpnt->result = (STp->buffer)->last_result = -1; |
SCpnt | 908 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 909 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 910 | drivers/scsi/st.c | scsi_do_cmd (SCpnt, |
SCpnt | 916 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 931 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt; |
SCpnt | 972 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 1001 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 1002 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 1003 | drivers/scsi/st.c | scsi_do_cmd (SCpnt, |
SCpnt | 1008 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 1018 | drivers/scsi/st.c | SCpnt->sense_buffer[0], SCpnt->sense_buffer[1], |
SCpnt | 1019 | drivers/scsi/st.c | SCpnt->sense_buffer[2], SCpnt->sense_buffer[3], |
SCpnt | 1020 | drivers/scsi/st.c | SCpnt->sense_buffer[4], SCpnt->sense_buffer[5], |
SCpnt | 1021 | drivers/scsi/st.c | SCpnt->sense_buffer[6], SCpnt->sense_buffer[7]); |
SCpnt | 1023 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70) { /* extended sense */ |
SCpnt | 1025 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[2] & 0xe0) != 0) { /* EOF, EOM, or ILI */ |
SCpnt | 1027 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x80) != 0) |
SCpnt | 1028 | drivers/scsi/st.c | transfer = (SCpnt->sense_buffer[3] << 24) | |
SCpnt | 1029 | drivers/scsi/st.c | (SCpnt->sense_buffer[4] << 16) | |
SCpnt | 1030 | drivers/scsi/st.c | (SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6]; |
SCpnt | 1034 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == MEDIUM_ERROR) |
SCpnt | 1037 | drivers/scsi/st.c | if (SCpnt->sense_buffer[2] & 0x20) { |
SCpnt | 1045 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 1049 | drivers/scsi/st.c | else if (SCpnt->sense_buffer[2] & 0x40) { |
SCpnt | 1062 | drivers/scsi/st.c | else if (SCpnt->sense_buffer[2] & 0x80) { |
SCpnt | 1082 | drivers/scsi/st.c | SCpnt->request.dev = -1; |
SCpnt | 1087 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == BLANK_CHECK) { |
SCpnt | 1102 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 1137 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 1156 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 1218 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt; |
SCpnt | 1533 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 1534 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 1535 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 1536 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 1540 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 1544 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 1592 | drivers/scsi/st.c | if (SCpnt->sense_buffer[2] & 0x40) { |
SCpnt | 1600 | drivers/scsi/st.c | (SCpnt->sense_buffer[3] << 24) + |
SCpnt | 1601 | drivers/scsi/st.c | (SCpnt->sense_buffer[4] << 16) + |
SCpnt | 1602 | drivers/scsi/st.c | (SCpnt->sense_buffer[5] << 8) + |
SCpnt | 1603 | drivers/scsi/st.c | SCpnt->sense_buffer[6] ); |
SCpnt | 1616 | drivers/scsi/st.c | if (SCpnt->sense_buffer[2] & 0x80) { /* Hit filemark */ |
SCpnt | 1628 | drivers/scsi/st.c | if (SCpnt->sense_buffer[2] & 0x80) { /* Hit filemark */ |
SCpnt | 1644 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == BLANK_CHECK) |
SCpnt | 1663 | drivers/scsi/st.c | Scsi_Cmnd *SCpnt; |
SCpnt | 1774 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, STp->device, 1); |
SCpnt | 1776 | drivers/scsi/st.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 1786 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 1787 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 1788 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 1792 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
SCpnt | 1816 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 53 | drivers/scsi/st.h | Scsi_Cmnd SCpnt; |
SCpnt | 225 | drivers/scsi/u14-34f.c | Scsi_Cmnd *SCpnt; |
SCpnt | 504 | drivers/scsi/u14-34f.c | static inline void build_sg_list(struct mscp *cpp, Scsi_Cmnd *SCpnt) { |
SCpnt | 508 | drivers/scsi/u14-34f.c | sgpnt = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 510 | drivers/scsi/u14-34f.c | for (k = 0; k < SCpnt->use_sg; k++) { |
SCpnt | 516 | drivers/scsi/u14-34f.c | cpp->use_sg = SCpnt->use_sg; |
SCpnt | 521 | drivers/scsi/u14-34f.c | int u14_34f_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) { |
SCpnt | 528 | drivers/scsi/u14-34f.c | j = ((struct hostdata *) SCpnt->host->hostdata)->board_number; |
SCpnt | 530 | drivers/scsi/u14-34f.c | if (!done) panic("%s: qcomm, pid %ld, null done.\n", BN(j), SCpnt->pid); |
SCpnt | 551 | drivers/scsi/u14-34f.c | else if (u14_34f_reset(SCpnt) == SCSI_RESET_SUCCESS) |
SCpnt | 554 | drivers/scsi/u14-34f.c | SCpnt->result = DID_BUS_BUSY << 16; |
SCpnt | 555 | drivers/scsi/u14-34f.c | SCpnt->host_scribble = NULL; |
SCpnt | 556 | drivers/scsi/u14-34f.c | printk("%s: qcomm, pid %ld, DID_BUS_BUSY, done.\n", BN(j), SCpnt->pid); |
SCpnt | 558 | drivers/scsi/u14-34f.c | done(SCpnt); |
SCpnt | 566 | drivers/scsi/u14-34f.c | SCpnt->scsi_done = done; |
SCpnt | 568 | drivers/scsi/u14-34f.c | SCpnt->host_scribble = (unsigned char *) &cpp->index; |
SCpnt | 571 | drivers/scsi/u14-34f.c | BN(j), i, SCpnt->target, SCpnt->pid); |
SCpnt | 575 | drivers/scsi/u14-34f.c | cpp->target = SCpnt->target; |
SCpnt | 576 | drivers/scsi/u14-34f.c | cpp->lun = SCpnt->lun; |
SCpnt | 577 | drivers/scsi/u14-34f.c | cpp->SCpnt = SCpnt; |
SCpnt | 578 | drivers/scsi/u14-34f.c | cpp->sense_addr = (unsigned int) SCpnt->sense_buffer; |
SCpnt | 579 | drivers/scsi/u14-34f.c | cpp->sense_len = sizeof SCpnt->sense_buffer; |
SCpnt | 581 | drivers/scsi/u14-34f.c | if (SCpnt->use_sg) { |
SCpnt | 583 | drivers/scsi/u14-34f.c | build_sg_list(cpp, SCpnt); |
SCpnt | 586 | drivers/scsi/u14-34f.c | cpp->data_address = (unsigned int)SCpnt->request_buffer; |
SCpnt | 587 | drivers/scsi/u14-34f.c | cpp->data_len = SCpnt->request_bufflen; |
SCpnt | 590 | drivers/scsi/u14-34f.c | cpp->scsi_cdbs_len = SCpnt->cmd_len; |
SCpnt | 591 | drivers/scsi/u14-34f.c | memcpy(cpp->scsi_cdbs, SCpnt->cmnd, cpp->scsi_cdbs_len); |
SCpnt | 594 | drivers/scsi/u14-34f.c | SCpnt->result = DID_ERROR << 16; |
SCpnt | 595 | drivers/scsi/u14-34f.c | SCpnt->host_scribble = NULL; |
SCpnt | 597 | drivers/scsi/u14-34f.c | BN(j), SCpnt->target, SCpnt->pid); |
SCpnt | 599 | drivers/scsi/u14-34f.c | done(SCpnt); |
SCpnt | 649 | drivers/scsi/u14-34f.c | if (SCarg != HD(j)->cp[i].SCpnt) |
SCpnt | 651 | drivers/scsi/u14-34f.c | BN(j), i, SCarg, HD(j)->cp[i].SCpnt); |
SCpnt | 675 | drivers/scsi/u14-34f.c | Scsi_Cmnd *SCpnt; |
SCpnt | 712 | drivers/scsi/u14-34f.c | SCpnt = HD(j)->cp[i].SCpnt; |
SCpnt | 715 | drivers/scsi/u14-34f.c | BN(j), i, SCpnt->pid); |
SCpnt | 717 | drivers/scsi/u14-34f.c | if (SCpnt == NULL) |
SCpnt | 720 | drivers/scsi/u14-34f.c | if (SCpnt->host_scribble == NULL) |
SCpnt | 723 | drivers/scsi/u14-34f.c | if (*(unsigned int *)SCpnt->host_scribble != i) |
SCpnt | 726 | drivers/scsi/u14-34f.c | if (SCpnt->scsi_done == NULL) |
SCpnt | 729 | drivers/scsi/u14-34f.c | if (SCpnt == SCarg) arg_done = TRUE; |
SCpnt | 753 | drivers/scsi/u14-34f.c | SCpnt = HD(j)->cp[i].SCpnt; |
SCpnt | 754 | drivers/scsi/u14-34f.c | SCpnt->result = DID_RESET << 16; |
SCpnt | 755 | drivers/scsi/u14-34f.c | SCpnt->host_scribble = NULL; |
SCpnt | 761 | drivers/scsi/u14-34f.c | BN(j), i, SCpnt->pid); |
SCpnt | 763 | drivers/scsi/u14-34f.c | SCpnt->scsi_done(SCpnt); |
SCpnt | 792 | drivers/scsi/u14-34f.c | Scsi_Cmnd *SCpnt; |
SCpnt | 854 | drivers/scsi/u14-34f.c | SCpnt = spp->SCpnt; |
SCpnt | 856 | drivers/scsi/u14-34f.c | if (SCpnt == NULL) |
SCpnt | 859 | drivers/scsi/u14-34f.c | if (SCpnt->host_scribble == NULL) |
SCpnt | 861 | drivers/scsi/u14-34f.c | BN(j), i, SCpnt->pid, SCpnt); |
SCpnt | 863 | drivers/scsi/u14-34f.c | if (*(unsigned int *)SCpnt->host_scribble != i) |
SCpnt | 865 | drivers/scsi/u14-34f.c | " irq %d.\n", BN(j), i, SCpnt->pid, |
SCpnt | 866 | drivers/scsi/u14-34f.c | *(unsigned int *)SCpnt->host_scribble, irq); |
SCpnt | 874 | drivers/scsi/u14-34f.c | if (tstatus == BUSY && SCpnt->device->type != TYPE_TAPE) |
SCpnt | 879 | drivers/scsi/u14-34f.c | && SCpnt->device->type == TYPE_DISK |
SCpnt | 880 | drivers/scsi/u14-34f.c | && HD(j)->target_reset[SCpnt->target]) |
SCpnt | 885 | drivers/scsi/u14-34f.c | && SCpnt->device->type == TYPE_DISK |
SCpnt | 886 | drivers/scsi/u14-34f.c | && (SCpnt->sense_buffer[2] & 0xf) == RECOVERED_ERROR) |
SCpnt | 890 | drivers/scsi/u14-34f.c | && SCpnt->device->type == TYPE_DISK |
SCpnt | 891 | drivers/scsi/u14-34f.c | && (SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) |
SCpnt | 898 | drivers/scsi/u14-34f.c | HD(j)->target_reset[SCpnt->target] = FALSE; |
SCpnt | 900 | drivers/scsi/u14-34f.c | if (spp->target_status && SCpnt->device->type == TYPE_DISK) |
SCpnt | 903 | drivers/scsi/u14-34f.c | SCpnt->target, SCpnt->lun, SCpnt->pid, |
SCpnt | 904 | drivers/scsi/u14-34f.c | spp->target_status, SCpnt->sense_buffer[2]); |
SCpnt | 906 | drivers/scsi/u14-34f.c | HD(j)->target_time_out[SCpnt->target] = 0; |
SCpnt | 911 | drivers/scsi/u14-34f.c | if (HD(j)->target_time_out[SCpnt->target] > 1) |
SCpnt | 915 | drivers/scsi/u14-34f.c | HD(j)->target_time_out[SCpnt->target]++; |
SCpnt | 925 | drivers/scsi/u14-34f.c | if (SCpnt->device->type != TYPE_TAPE) |
SCpnt | 946 | drivers/scsi/u14-34f.c | SCpnt->result = status | spp->target_status; |
SCpnt | 952 | drivers/scsi/u14-34f.c | if (SCpnt->result || do_trace) |
SCpnt | 962 | drivers/scsi/u14-34f.c | SCpnt->target, SCpnt->lun, SCpnt->pid, HD(j)->iocount); |
SCpnt | 965 | drivers/scsi/u14-34f.c | SCpnt->host_scribble = NULL; |
SCpnt | 968 | drivers/scsi/u14-34f.c | SCpnt->scsi_done(SCpnt); |
SCpnt | 287 | drivers/scsi/ultrastor.c | static inline void build_sg_list(struct mscp *, Scsi_Cmnd *SCpnt); |
SCpnt | 645 | drivers/scsi/ultrastor.c | static inline void build_sg_list(register struct mscp *mscp, Scsi_Cmnd *SCpnt) |
SCpnt | 651 | drivers/scsi/ultrastor.c | sl = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 652 | drivers/scsi/ultrastor.c | max = SCpnt->use_sg; |
SCpnt | 666 | drivers/scsi/ultrastor.c | int ultrastor_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 704 | drivers/scsi/ultrastor.c | my_mscp->ca = SCpnt->device->type != TYPE_TAPE; |
SCpnt | 705 | drivers/scsi/ultrastor.c | my_mscp->target_id = SCpnt->target; |
SCpnt | 707 | drivers/scsi/ultrastor.c | my_mscp->lun = SCpnt->lun; |
SCpnt | 708 | drivers/scsi/ultrastor.c | if (SCpnt->use_sg) { |
SCpnt | 711 | drivers/scsi/ultrastor.c | build_sg_list(my_mscp, SCpnt); |
SCpnt | 715 | drivers/scsi/ultrastor.c | my_mscp->transfer_data = (unsigned int)SCpnt->request_buffer; |
SCpnt | 716 | drivers/scsi/ultrastor.c | my_mscp->transfer_data_length = SCpnt->request_bufflen; |
SCpnt | 720 | drivers/scsi/ultrastor.c | my_mscp->length_of_sense_byte = sizeof SCpnt->sense_buffer; |
SCpnt | 721 | drivers/scsi/ultrastor.c | my_mscp->length_of_scsi_cdbs = SCpnt->cmd_len; |
SCpnt | 722 | drivers/scsi/ultrastor.c | memcpy(my_mscp->scsi_cdbs, SCpnt->cmnd, my_mscp->length_of_scsi_cdbs); |
SCpnt | 725 | drivers/scsi/ultrastor.c | my_mscp->sense_data = (unsigned int)&SCpnt->sense_buffer; |
SCpnt | 727 | drivers/scsi/ultrastor.c | my_mscp->SCint = SCpnt; |
SCpnt | 728 | drivers/scsi/ultrastor.c | SCpnt->host_scribble = (unsigned char *)my_mscp; |
SCpnt | 774 | drivers/scsi/ultrastor.c | SCpnt->result = status; |
SCpnt | 775 | drivers/scsi/ultrastor.c | done(SCpnt); |
SCpnt | 818 | drivers/scsi/ultrastor.c | int ultrastor_abort(Scsi_Cmnd *SCpnt) |
SCpnt | 833 | drivers/scsi/ultrastor.c | if(!SCpnt->host_scribble) |
SCpnt | 836 | drivers/scsi/ultrastor.c | mscp_index = ((struct mscp *)SCpnt->host_scribble) - config.mscp; |
SCpnt | 924 | drivers/scsi/ultrastor.c | if (config.mscp[mscp_index].SCint != SCpnt) |
SCpnt | 926 | drivers/scsi/ultrastor.c | config.mscp[mscp_index].SCint, SCpnt); |
SCpnt | 931 | drivers/scsi/ultrastor.c | if (config.mscp[mscp_index].SCint != SCpnt) panic("Bad abort"); |
SCpnt | 935 | drivers/scsi/ultrastor.c | SCpnt->result = DID_ABORT << 16; |
SCpnt | 937 | drivers/scsi/ultrastor.c | done(SCpnt); |
SCpnt | 943 | drivers/scsi/ultrastor.c | int ultrastor_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 340 | drivers/scsi/wd7000.c | Scsi_Cmnd *SCpnt; /* Scsi_Cmnd using this SCB */ |
SCpnt | 671 | drivers/scsi/wd7000.c | scbs[i].next = &(scbs[i+1]); scbs[i].SCpnt = NULL; |
SCpnt | 674 | drivers/scsi/wd7000.c | scbs[MAX_SCBS-1].SCpnt = NULL; |
SCpnt | 789 | drivers/scsi/wd7000.c | static void wd7000_scsi_done(Scsi_Cmnd * SCpnt) |
SCpnt | 792 | drivers/scsi/wd7000.c | printk("wd7000_scsi_done: %06x\n",(unsigned int) SCpnt); |
SCpnt | 794 | drivers/scsi/wd7000.c | SCpnt->SCp.phase = 0; |
SCpnt | 806 | drivers/scsi/wd7000.c | register Scsi_Cmnd *SCpnt; |
SCpnt | 863 | drivers/scsi/wd7000.c | SCpnt = scb->SCpnt; |
SCpnt | 864 | drivers/scsi/wd7000.c | if (--(SCpnt->SCp.phase) <= 0) { /* all scbs are done */ |
SCpnt | 868 | drivers/scsi/wd7000.c | SCpnt->result = errstatus; |
SCpnt | 872 | drivers/scsi/wd7000.c | SCpnt->scsi_done(SCpnt); |
SCpnt | 887 | drivers/scsi/wd7000.c | int wd7000_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 891 | drivers/scsi/wd7000.c | register unchar *cdb = (unchar *) SCpnt->cmnd; |
SCpnt | 894 | drivers/scsi/wd7000.c | Adapter *host = (Adapter *) SCpnt->host->hostdata; |
SCpnt | 896 | drivers/scsi/wd7000.c | cdblen = SCpnt->cmd_len; |
SCpnt | 897 | drivers/scsi/wd7000.c | idlun = ((SCpnt->target << 5) & 0xe0) | (SCpnt->lun & 7); |
SCpnt | 898 | drivers/scsi/wd7000.c | SCpnt->scsi_done = done; |
SCpnt | 899 | drivers/scsi/wd7000.c | SCpnt->SCp.phase = 1; |
SCpnt | 905 | drivers/scsi/wd7000.c | scb->SCpnt = SCpnt; /* so we can find stuff later */ |
SCpnt | 906 | drivers/scsi/wd7000.c | SCpnt->host_scribble = (unchar *) scb; |
SCpnt | 909 | drivers/scsi/wd7000.c | if (SCpnt->use_sg) { |
SCpnt | 910 | drivers/scsi/wd7000.c | struct scatterlist *sg = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 913 | drivers/scsi/wd7000.c | if (SCpnt->host->sg_tablesize == SG_NONE) { |
SCpnt | 917 | drivers/scsi/wd7000.c | printk("Using scatter/gather with %d elements.\n",SCpnt->use_sg); |
SCpnt | 923 | drivers/scsi/wd7000.c | any2scsi(scb->maxlen, SCpnt->use_sg * sizeof (Sgb) ); |
SCpnt | 925 | drivers/scsi/wd7000.c | for (i = 0; i < SCpnt->use_sg; i++) { |
SCpnt | 931 | drivers/scsi/wd7000.c | any2scsi(scb->dataptr, (int) SCpnt->request_buffer); |
SCpnt | 932 | drivers/scsi/wd7000.c | any2scsi(scb->maxlen, SCpnt->request_bufflen); |
SCpnt | 940 | drivers/scsi/wd7000.c | int wd7000_command(Scsi_Cmnd *SCpnt) |
SCpnt | 942 | drivers/scsi/wd7000.c | wd7000_queuecommand(SCpnt, wd7000_scsi_done); |
SCpnt | 944 | drivers/scsi/wd7000.c | while (SCpnt->SCp.phase > 0); /* phase counts scbs down to 0 */ |
SCpnt | 946 | drivers/scsi/wd7000.c | return SCpnt->result; |
SCpnt | 1179 | drivers/scsi/wd7000.c | int wd7000_abort(Scsi_Cmnd * SCpnt) |
SCpnt | 1181 | drivers/scsi/wd7000.c | Adapter *host = (Adapter *) SCpnt->host->hostdata; |
SCpnt | 1196 | drivers/scsi/wd7000.c | int wd7000_reset(Scsi_Cmnd * SCpnt) |