tag | line | file | source code |
SCpnt | 2130 | drivers/scsi/NCR5380.c | int NCR5380_reset (Scsi_Cmnd * SCpnt) { |
SCpnt | 2135 | drivers/scsi/NCR5380.c | instance = SCpnt->host; |
SCpnt | 2142 | drivers/scsi/NCR5380.c | if (SCpnt) SCpnt->flags |= NEEDS_JUMPSTART; |
SCpnt | 713 | drivers/scsi/aha152x.c | int aha152x_queue( Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 726 | drivers/scsi/aha152x.c | SCpnt->target, |
SCpnt | 727 | drivers/scsi/aha152x.c | SCpnt->lun, |
SCpnt | 728 | drivers/scsi/aha152x.c | *(unsigned char *)SCpnt->cmnd, |
SCpnt | 729 | drivers/scsi/aha152x.c | SCpnt->use_sg, |
SCpnt | 730 | drivers/scsi/aha152x.c | SCpnt->request_bufflen ); |
SCpnt | 734 | drivers/scsi/aha152x.c | SCpnt->scsi_done = done; |
SCpnt | 742 | drivers/scsi/aha152x.c | SCpnt->SCp.phase = not_issued; |
SCpnt | 743 | drivers/scsi/aha152x.c | if (SCpnt->use_sg) |
SCpnt | 745 | drivers/scsi/aha152x.c | SCpnt->SCp.buffer = (struct scatterlist *)SCpnt->request_buffer; |
SCpnt | 746 | drivers/scsi/aha152x.c | SCpnt->SCp.ptr = SCpnt->SCp.buffer->address; |
SCpnt | 747 | drivers/scsi/aha152x.c | SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length; |
SCpnt | 748 | drivers/scsi/aha152x.c | SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1; |
SCpnt | 752 | drivers/scsi/aha152x.c | SCpnt->SCp.ptr = (char *)SCpnt->request_buffer; |
SCpnt | 753 | drivers/scsi/aha152x.c | SCpnt->SCp.this_residual = SCpnt->request_bufflen; |
SCpnt | 754 | drivers/scsi/aha152x.c | SCpnt->SCp.buffer = NULL; |
SCpnt | 755 | drivers/scsi/aha152x.c | SCpnt->SCp.buffers_residual = 0; |
SCpnt | 758 | drivers/scsi/aha152x.c | SCpnt->SCp.Status = CHECK_CONDITION; |
SCpnt | 759 | drivers/scsi/aha152x.c | SCpnt->SCp.Message = 0; |
SCpnt | 760 | drivers/scsi/aha152x.c | SCpnt->SCp.have_data_in = 0; |
SCpnt | 761 | drivers/scsi/aha152x.c | SCpnt->SCp.sent_command = 0; |
SCpnt | 772 | drivers/scsi/aha152x.c | append_SC( &issue_SC, SCpnt); |
SCpnt | 788 | drivers/scsi/aha152x.c | int aha152x_command( Scsi_Cmnd *SCpnt ) |
SCpnt | 798 | drivers/scsi/aha152x.c | int aha152x_abort( Scsi_Cmnd *SCpnt, int code ) |
SCpnt | 805 | drivers/scsi/aha152x.c | printk("aha152x: abort(), SCpnt=0x%08x, ", (unsigned long) SCpnt ); |
SCpnt | 812 | drivers/scsi/aha152x.c | ptr && ptr!=SCpnt; |
SCpnt | 840 | drivers/scsi/aha152x.c | ptr && ptr!=SCpnt; |
SCpnt | 386 | drivers/scsi/aha1542.c | int aha1542_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 390 | drivers/scsi/aha1542.c | unchar *cmd = (unchar *) SCpnt->cmnd; |
SCpnt | 391 | drivers/scsi/aha1542.c | unchar target = SCpnt->target; |
SCpnt | 392 | drivers/scsi/aha1542.c | unchar lun = SCpnt->lun; |
SCpnt | 393 | drivers/scsi/aha1542.c | void *buff = SCpnt->request_buffer; |
SCpnt | 394 | drivers/scsi/aha1542.c | int bufflen = SCpnt->request_bufflen; |
SCpnt | 401 | drivers/scsi/aha1542.c | mb = HOSTDATA(SCpnt->host)->mb; |
SCpnt | 402 | drivers/scsi/aha1542.c | ccb = HOSTDATA(SCpnt->host)->ccb; |
SCpnt | 405 | drivers/scsi/aha1542.c | SCpnt->result = DID_TIME_OUT << 16; |
SCpnt | 406 | drivers/scsi/aha1542.c | done(SCpnt); return 0;}); |
SCpnt | 410 | drivers/scsi/aha1542.c | if (bufflen != sizeof(SCpnt->sense_buffer)) { |
SCpnt | 415 | drivers/scsi/aha1542.c | SCpnt->result = 0; |
SCpnt | 416 | drivers/scsi/aha1542.c | done(SCpnt); |
SCpnt | 442 | drivers/scsi/aha1542.c | mbo = HOSTDATA(SCpnt->host)->aha1542_last_mbo_used + 1; |
SCpnt | 446 | drivers/scsi/aha1542.c | if(mb[mbo].status == 0 && HOSTDATA(SCpnt->host)->SCint[mbo] == NULL) |
SCpnt | 450 | drivers/scsi/aha1542.c | } while (mbo != HOSTDATA(SCpnt->host)->aha1542_last_mbo_used); |
SCpnt | 452 | drivers/scsi/aha1542.c | if(mb[mbo].status || HOSTDATA(SCpnt->host)->SCint[mbo]) |
SCpnt | 455 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->SCint[mbo] = SCpnt; /* This will effectively prevent someone else from |
SCpnt | 458 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->aha1542_last_mbo_used = mbo; |
SCpnt | 479 | drivers/scsi/aha1542.c | if (SCpnt->use_sg) { |
SCpnt | 487 | drivers/scsi/aha1542.c | SCpnt->host_scribble = (unsigned char *) scsi_malloc(512); |
SCpnt | 488 | drivers/scsi/aha1542.c | sgpnt = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 489 | drivers/scsi/aha1542.c | cptr = (struct chain *) SCpnt->host_scribble; |
SCpnt | 491 | drivers/scsi/aha1542.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 492 | drivers/scsi/aha1542.c | if(sgpnt[i].length == 0 || SCpnt->use_sg > 16 || |
SCpnt | 495 | drivers/scsi/aha1542.c | printk("Bad segment list supplied to aha1542.c (%d, %d)\n",SCpnt->use_sg,i); |
SCpnt | 496 | drivers/scsi/aha1542.c | for(i=0;i<SCpnt->use_sg;i++){ |
SCpnt | 509 | drivers/scsi/aha1542.c | any2scsi(ccb[mbo].datalen, SCpnt->use_sg * sizeof(struct chain)); |
SCpnt | 519 | drivers/scsi/aha1542.c | SCpnt->host_scribble = NULL; |
SCpnt | 538 | drivers/scsi/aha1542.c | SCpnt->scsi_done = done; |
SCpnt | 540 | drivers/scsi/aha1542.c | aha1542_out(SCpnt->host->io_port, &ahacmd, 1); /* start scsi command */ |
SCpnt | 551 | drivers/scsi/aha1542.c | static void internal_done(Scsi_Cmnd * SCpnt) |
SCpnt | 553 | drivers/scsi/aha1542.c | SCpnt->SCp.Status++; |
SCpnt | 556 | drivers/scsi/aha1542.c | int aha1542_command(Scsi_Cmnd * SCpnt) |
SCpnt | 560 | drivers/scsi/aha1542.c | aha1542_queuecommand(SCpnt, internal_done); |
SCpnt | 562 | drivers/scsi/aha1542.c | SCpnt->SCp.Status = 0; |
SCpnt | 563 | drivers/scsi/aha1542.c | while (!SCpnt->SCp.Status); |
SCpnt | 564 | drivers/scsi/aha1542.c | return SCpnt->result; |
SCpnt | 819 | drivers/scsi/aha1542.c | int aha1542_abort(Scsi_Cmnd * SCpnt, int i) |
SCpnt | 829 | drivers/scsi/aha1542.c | if (SCpnt == HOSTDATA(SCpnt->host)->SCint[mbo]){ |
SCpnt | 843 | drivers/scsi/aha1542.c | int aha1542_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 846 | drivers/scsi/aha1542.c | if(SCpnt) SCpnt->flags |= NEEDS_JUMPSTART; |
SCpnt | 198 | drivers/scsi/aha1740.c | SCtmp = ecbptr->SCpnt; |
SCpnt | 238 | drivers/scsi/aha1740.c | int aha1740_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 241 | drivers/scsi/aha1740.c | unchar *cmd = (unchar *) SCpnt->cmnd; |
SCpnt | 242 | drivers/scsi/aha1740.c | unchar target = SCpnt->target; |
SCpnt | 243 | drivers/scsi/aha1740.c | void *buff = SCpnt->request_buffer; |
SCpnt | 244 | drivers/scsi/aha1740.c | int bufflen = SCpnt->request_bufflen; |
SCpnt | 251 | drivers/scsi/aha1740.c | if (bufflen != sizeof(SCpnt->sense_buffer)) |
SCpnt | 256 | drivers/scsi/aha1740.c | SCpnt->result = 0; |
SCpnt | 257 | drivers/scsi/aha1740.c | done(SCpnt); |
SCpnt | 309 | drivers/scsi/aha1740.c | if (SCpnt->use_sg) |
SCpnt | 318 | drivers/scsi/aha1740.c | SCpnt->host_scribble = (unsigned char *) scsi_malloc(512); |
SCpnt | 319 | drivers/scsi/aha1740.c | sgpnt = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 320 | drivers/scsi/aha1740.c | cptr = (struct aha1740_chain *) SCpnt->host_scribble; |
SCpnt | 322 | drivers/scsi/aha1740.c | for(i=0; i<SCpnt->use_sg; i++) |
SCpnt | 327 | drivers/scsi/aha1740.c | ecb[ecbno].datalen = SCpnt->use_sg * sizeof(struct aha1740_chain); |
SCpnt | 337 | drivers/scsi/aha1740.c | SCpnt->host_scribble = NULL; |
SCpnt | 341 | drivers/scsi/aha1740.c | ecb[ecbno].lun = SCpnt->lun; |
SCpnt | 349 | drivers/scsi/aha1740.c | ecb[ecbno].SCpnt = SCpnt; |
SCpnt | 403 | drivers/scsi/aha1740.c | static void internal_done(Scsi_Cmnd * SCpnt) |
SCpnt | 405 | drivers/scsi/aha1740.c | internal_done_errcode = SCpnt->result; |
SCpnt | 409 | drivers/scsi/aha1740.c | int aha1740_command(Scsi_Cmnd * SCpnt) |
SCpnt | 411 | drivers/scsi/aha1740.c | aha1740_queuecommand(SCpnt, internal_done); |
SCpnt | 477 | drivers/scsi/aha1740.c | int aha1740_abort(Scsi_Cmnd * SCpnt, int i) |
SCpnt | 487 | drivers/scsi/aha1740.c | int aha1740_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 490 | drivers/scsi/aha1740.c | if (SCpnt) SCpnt->flags |= NEEDS_JUMPSTART; |
SCpnt | 142 | drivers/scsi/aha1740.h | Scsi_Cmnd *SCpnt; /* Link to the SCSI Command Block */ |
SCpnt | 360 | drivers/scsi/constants.c | void print_sense(char * devclass, Scsi_Cmnd * SCpnt) |
SCpnt | 364 | drivers/scsi/constants.c | unsigned char * sense_buffer = SCpnt->sense_buffer; |
SCpnt | 366 | drivers/scsi/constants.c | int dev = SCpnt->request.dev; |
SCpnt | 374 | drivers/scsi/constants.c | if(s > sizeof(SCpnt->sense_buffer)) s = sizeof(SCpnt->sense_buffer); |
SCpnt | 1219 | drivers/scsi/fdomain.c | int fdomain_16x0_queue( Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 1226 | drivers/scsi/fdomain.c | SCpnt->target, |
SCpnt | 1227 | drivers/scsi/fdomain.c | *(unsigned char *)SCpnt->cmnd, |
SCpnt | 1228 | drivers/scsi/fdomain.c | SCpnt->use_sg, |
SCpnt | 1229 | drivers/scsi/fdomain.c | SCpnt->request_bufflen ); |
SCpnt | 1234 | drivers/scsi/fdomain.c | current_SC = SCpnt; /* Save this for the done function */ |
SCpnt | 1277 | drivers/scsi/fdomain.c | static void internal_done( Scsi_Cmnd *SCpnt ) |
SCpnt | 1279 | drivers/scsi/fdomain.c | internal_done_errcode = SCpnt->result; |
SCpnt | 1283 | drivers/scsi/fdomain.c | int fdomain_16x0_command( Scsi_Cmnd *SCpnt ) |
SCpnt | 1285 | drivers/scsi/fdomain.c | fdomain_16x0_queue( SCpnt, internal_done ); |
SCpnt | 1295 | drivers/scsi/fdomain.c | void print_info( Scsi_Cmnd *SCpnt ) |
SCpnt | 1302 | drivers/scsi/fdomain.c | switch (SCpnt->SCp.phase) { |
SCpnt | 1310 | drivers/scsi/fdomain.c | SCpnt->SCp.phase, |
SCpnt | 1311 | drivers/scsi/fdomain.c | SCpnt->target, |
SCpnt | 1312 | drivers/scsi/fdomain.c | *(unsigned char *)SCpnt->cmnd, |
SCpnt | 1313 | drivers/scsi/fdomain.c | SCpnt->use_sg, |
SCpnt | 1314 | drivers/scsi/fdomain.c | SCpnt->request_bufflen ); |
SCpnt | 1316 | drivers/scsi/fdomain.c | SCpnt->SCp.sent_command, |
SCpnt | 1317 | drivers/scsi/fdomain.c | SCpnt->SCp.have_data_in, |
SCpnt | 1318 | drivers/scsi/fdomain.c | SCpnt->timeout ); |
SCpnt | 1359 | drivers/scsi/fdomain.c | int fdomain_16x0_abort( Scsi_Cmnd *SCpnt, int code ) |
SCpnt | 1380 | drivers/scsi/fdomain.c | print_info( SCpnt ); |
SCpnt | 1397 | drivers/scsi/fdomain.c | int fdomain_16x0_reset( Scsi_Cmnd *SCpnt ) |
SCpnt | 1423 | drivers/scsi/fdomain.c | if (SCpnt) |
SCpnt | 1424 | drivers/scsi/fdomain.c | SCpnt->flags |= NEEDS_JUMPSTART; |
SCpnt | 37 | drivers/scsi/scsi.c | static void scsi_done (Scsi_Cmnd *SCpnt); |
SCpnt | 40 | drivers/scsi/scsi.c | static void scsi_times_out (Scsi_Cmnd * SCpnt); |
SCpnt | 171 | drivers/scsi/scsi.c | static void scan_scsis_done (Scsi_Cmnd * SCpnt) |
SCpnt | 175 | drivers/scsi/scsi.c | printk ("scan_scsis_done(%d, %06x)\n", SCpnt->host, SCpnt->result); |
SCpnt | 177 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xfffe; |
SCpnt | 489 | drivers/scsi/scsi.c | static void scsi_times_out (Scsi_Cmnd * SCpnt) |
SCpnt | 492 | drivers/scsi/scsi.c | switch (SCpnt->internal_timeout & (IN_ABORT | IN_RESET)) |
SCpnt | 497 | drivers/scsi/scsi.c | SCpnt->host->host_no); |
SCpnt | 499 | drivers/scsi/scsi.c | if (!scsi_abort (SCpnt, DID_TIME_OUT)) |
SCpnt | 503 | drivers/scsi/scsi.c | SCpnt->host->host_no); |
SCpnt | 504 | drivers/scsi/scsi.c | if (!scsi_reset (SCpnt)) |
SCpnt | 508 | drivers/scsi/scsi.c | panic("Unable to reset scsi host %d\n",SCpnt->host->host_no); |
SCpnt | 524 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 534 | drivers/scsi/scsi.c | SCpnt = scsi_devices[index].host->host_queue; |
SCpnt | 535 | drivers/scsi/scsi.c | while(SCpnt){ |
SCpnt | 536 | drivers/scsi/scsi.c | if(SCpnt->target == scsi_devices[index].id && |
SCpnt | 537 | drivers/scsi/scsi.c | SCpnt->lun == scsi_devices[index].lun) |
SCpnt | 538 | drivers/scsi/scsi.c | if(SCpnt->request.dev < 0) break; |
SCpnt | 539 | drivers/scsi/scsi.c | SCpnt = SCpnt->next; |
SCpnt | 542 | drivers/scsi/scsi.c | if (!SCpnt) return NULL; |
SCpnt | 548 | drivers/scsi/scsi.c | memcpy(&SCpnt->request, req, sizeof(struct request)); |
SCpnt | 562 | drivers/scsi/scsi.c | SCpnt->request.bhtail = bh; |
SCpnt | 568 | drivers/scsi/scsi.c | SCpnt->request.nr_sectors -= req->nr_sectors; |
SCpnt | 571 | drivers/scsi/scsi.c | SCpnt->request.waiting = NULL; /* Wait until whole thing done */ |
SCpnt | 576 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xffff; /* Busy, but no request */ |
SCpnt | 577 | drivers/scsi/scsi.c | SCpnt->request.waiting = NULL; /* And no one is waiting for the device either */ |
SCpnt | 580 | drivers/scsi/scsi.c | SCpnt->use_sg = 0; /* Reset the scatter-gather flag */ |
SCpnt | 581 | drivers/scsi/scsi.c | SCpnt->old_use_sg = 0; |
SCpnt | 582 | drivers/scsi/scsi.c | SCpnt->transfersize = 0; |
SCpnt | 583 | drivers/scsi/scsi.c | SCpnt->underflow = 0; |
SCpnt | 584 | drivers/scsi/scsi.c | return SCpnt; |
SCpnt | 603 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 617 | drivers/scsi/scsi.c | SCpnt = host->host_queue; |
SCpnt | 618 | drivers/scsi/scsi.c | while(SCpnt){ |
SCpnt | 619 | drivers/scsi/scsi.c | if(SCpnt->target == scsi_devices[index].id && |
SCpnt | 620 | drivers/scsi/scsi.c | SCpnt->lun == scsi_devices[index].lun) { |
SCpnt | 621 | drivers/scsi/scsi.c | SCwait = SCpnt; |
SCpnt | 622 | drivers/scsi/scsi.c | if(SCpnt->request.dev < 0) break; |
SCpnt | 624 | drivers/scsi/scsi.c | SCpnt = SCpnt->next; |
SCpnt | 632 | drivers/scsi/scsi.c | if (!SCpnt || SCpnt->request.dev >= 0) /* Might have changed */ |
SCpnt | 645 | drivers/scsi/scsi.c | memcpy(&SCpnt->request, req, sizeof(struct request)); |
SCpnt | 659 | drivers/scsi/scsi.c | SCpnt->request.bhtail = bh; |
SCpnt | 664 | drivers/scsi/scsi.c | SCpnt->request.nr_sectors -= req->nr_sectors; |
SCpnt | 667 | drivers/scsi/scsi.c | SCpnt->request.waiting = NULL; /* Wait until whole thing done */ |
SCpnt | 675 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xffff; /* Busy */ |
SCpnt | 676 | drivers/scsi/scsi.c | SCpnt->request.waiting = NULL; /* And no one is waiting for this to complete */ |
SCpnt | 683 | drivers/scsi/scsi.c | SCpnt->use_sg = 0; /* Reset the scatter-gather flag */ |
SCpnt | 684 | drivers/scsi/scsi.c | SCpnt->old_use_sg = 0; |
SCpnt | 685 | drivers/scsi/scsi.c | SCpnt->transfersize = 0; /* No default transfer size */ |
SCpnt | 686 | drivers/scsi/scsi.c | SCpnt->underflow = 0; /* Do not flag underflow conditions */ |
SCpnt | 687 | drivers/scsi/scsi.c | return SCpnt; |
SCpnt | 694 | drivers/scsi/scsi.c | inline void internal_cmnd (Scsi_Cmnd * SCpnt) |
SCpnt | 702 | drivers/scsi/scsi.c | if ((unsigned long) &SCpnt < current->kernel_stack_page) |
SCpnt | 705 | drivers/scsi/scsi.c | host = SCpnt->host; |
SCpnt | 714 | drivers/scsi/scsi.c | update_timeout(SCpnt, SCpnt->timeout_per_command); |
SCpnt | 722 | drivers/scsi/scsi.c | "bufflen = %d, done = %08x)\n", SCpnt->host->host_no, SCpnt->target, SCpnt->cmnd, SCpnt->buffer, SCpnt->bufflen, SCpnt->done); |
SCpnt | 731 | drivers/scsi/scsi.c | host->hostt->queuecommand (SCpnt, scsi_done); |
SCpnt | 739 | drivers/scsi/scsi.c | temp=host->hostt->command (SCpnt); |
SCpnt | 740 | drivers/scsi/scsi.c | SCpnt->result = temp; |
SCpnt | 746 | drivers/scsi/scsi.c | scsi_done(SCpnt); |
SCpnt | 753 | drivers/scsi/scsi.c | static void scsi_request_sense (Scsi_Cmnd * SCpnt) |
SCpnt | 756 | drivers/scsi/scsi.c | SCpnt->flags |= WAS_SENSE | ASKED_FOR_SENSE; |
SCpnt | 757 | drivers/scsi/scsi.c | update_timeout(SCpnt, SENSE_TIMEOUT); |
SCpnt | 761 | drivers/scsi/scsi.c | memcpy ((void *) SCpnt->cmnd , (void *) generic_sense, |
SCpnt | 764 | drivers/scsi/scsi.c | SCpnt->cmnd[1] = SCpnt->lun << 5; |
SCpnt | 765 | drivers/scsi/scsi.c | SCpnt->cmnd[4] = sizeof(SCpnt->sense_buffer); |
SCpnt | 767 | drivers/scsi/scsi.c | SCpnt->request_buffer = &SCpnt->sense_buffer; |
SCpnt | 768 | drivers/scsi/scsi.c | SCpnt->request_bufflen = sizeof(SCpnt->sense_buffer); |
SCpnt | 769 | drivers/scsi/scsi.c | SCpnt->use_sg = 0; |
SCpnt | 770 | drivers/scsi/scsi.c | internal_cmnd (SCpnt); |
SCpnt | 771 | drivers/scsi/scsi.c | SCpnt->use_sg = SCpnt->old_use_sg; |
SCpnt | 783 | drivers/scsi/scsi.c | void scsi_do_cmd (Scsi_Cmnd * SCpnt, const void *cmnd , |
SCpnt | 788 | drivers/scsi/scsi.c | struct Scsi_Host * host = SCpnt->host; |
SCpnt | 793 | drivers/scsi/scsi.c | int target = SCpnt->target; |
SCpnt | 839 | drivers/scsi/scsi.c | memcpy ((void *) SCpnt->data_cmnd , (void *) cmnd, 12); |
SCpnt | 841 | drivers/scsi/scsi.c | SCpnt->host = host; |
SCpnt | 842 | drivers/scsi/scsi.c | SCpnt->target = target; |
SCpnt | 843 | drivers/scsi/scsi.c | SCpnt->lun = (SCpnt->data_cmnd[1] >> 5); |
SCpnt | 845 | drivers/scsi/scsi.c | SCpnt->bufflen = bufflen; |
SCpnt | 846 | drivers/scsi/scsi.c | SCpnt->buffer = buffer; |
SCpnt | 847 | drivers/scsi/scsi.c | SCpnt->flags=0; |
SCpnt | 848 | drivers/scsi/scsi.c | SCpnt->retries=0; |
SCpnt | 849 | drivers/scsi/scsi.c | SCpnt->allowed=retries; |
SCpnt | 850 | drivers/scsi/scsi.c | SCpnt->done = done; |
SCpnt | 851 | drivers/scsi/scsi.c | SCpnt->timeout_per_command = timeout; |
SCpnt | 853 | drivers/scsi/scsi.c | memcpy ((void *) SCpnt->cmnd , (void *) cmnd, 12); |
SCpnt | 856 | drivers/scsi/scsi.c | memset ((void *) SCpnt->sense_buffer, 0, sizeof SCpnt->sense_buffer); |
SCpnt | 857 | drivers/scsi/scsi.c | SCpnt->request_buffer = buffer; |
SCpnt | 858 | drivers/scsi/scsi.c | SCpnt->request_bufflen = bufflen; |
SCpnt | 859 | drivers/scsi/scsi.c | SCpnt->old_use_sg = SCpnt->use_sg; |
SCpnt | 863 | drivers/scsi/scsi.c | SCpnt->internal_timeout = 0; |
SCpnt | 864 | drivers/scsi/scsi.c | internal_cmnd (SCpnt); |
SCpnt | 879 | drivers/scsi/scsi.c | static void reset (Scsi_Cmnd * SCpnt) |
SCpnt | 882 | drivers/scsi/scsi.c | printk("scsi: reset(%d)\n", SCpnt->host->host_no); |
SCpnt | 885 | drivers/scsi/scsi.c | SCpnt->flags |= (WAS_RESET | IS_RESETTING); |
SCpnt | 886 | drivers/scsi/scsi.c | scsi_reset(SCpnt); |
SCpnt | 892 | drivers/scsi/scsi.c | if(SCpnt->flags & NEEDS_JUMPSTART) { |
SCpnt | 893 | drivers/scsi/scsi.c | SCpnt->flags &= ~NEEDS_JUMPSTART; |
SCpnt | 894 | drivers/scsi/scsi.c | scsi_request_sense (SCpnt); |
SCpnt | 900 | drivers/scsi/scsi.c | static int check_sense (Scsi_Cmnd * SCpnt) |
SCpnt | 905 | drivers/scsi/scsi.c | if (((SCpnt->sense_buffer[0] & 0x70) >> 4) != 7) { |
SCpnt | 906 | drivers/scsi/scsi.c | if(!(SCpnt->flags & ASKED_FOR_SENSE)) |
SCpnt | 912 | drivers/scsi/scsi.c | SCpnt->flags &= ~ASKED_FOR_SENSE; |
SCpnt | 915 | drivers/scsi/scsi.c | printk("scsi%d : ", SCpnt->host->host_no); |
SCpnt | 916 | drivers/scsi/scsi.c | print_sense("", SCpnt); |
SCpnt | 919 | drivers/scsi/scsi.c | if (SCpnt->sense_buffer[2] &0xe0) |
SCpnt | 922 | drivers/scsi/scsi.c | switch (SCpnt->sense_buffer[2] & 0xf) |
SCpnt | 971 | drivers/scsi/scsi.c | static void scsi_done (Scsi_Cmnd * SCpnt) |
SCpnt | 977 | drivers/scsi/scsi.c | struct Scsi_Host * host = SCpnt->host; |
SCpnt | 978 | drivers/scsi/scsi.c | int result = SCpnt->result; |
SCpnt | 979 | drivers/scsi/scsi.c | oldto = update_timeout(SCpnt, 0); |
SCpnt | 992 | drivers/scsi/scsi.c | if (SCpnt->flags & IS_RESETTING) |
SCpnt | 994 | drivers/scsi/scsi.c | SCpnt->flags &= ~IS_RESETTING; |
SCpnt | 999 | drivers/scsi/scsi.c | if (status_byte(result) && (SCpnt->flags & WAS_SENSE)) |
SCpnt | 1002 | drivers/scsi/scsi.c | SCpnt->flags &= ~WAS_SENSE; |
SCpnt | 1003 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~SENSE_TIMEOUT; |
SCpnt | 1005 | drivers/scsi/scsi.c | if (!(SCpnt->flags & WAS_RESET)) |
SCpnt | 1008 | drivers/scsi/scsi.c | SCpnt->host->host_no, SCpnt->target, SCpnt->lun); |
SCpnt | 1009 | drivers/scsi/scsi.c | reset(SCpnt); |
SCpnt | 1024 | drivers/scsi/scsi.c | if (SCpnt->flags & WAS_SENSE) |
SCpnt | 1030 | drivers/scsi/scsi.c | SCpnt->flags &= ~WAS_SENSE; |
SCpnt | 1031 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~SENSE_TIMEOUT; |
SCpnt | 1033 | drivers/scsi/scsi.c | switch (checked = check_sense(SCpnt)) |
SCpnt | 1041 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1078 | drivers/scsi/scsi.c | switch (check_sense(SCpnt)) |
SCpnt | 1081 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1094 | drivers/scsi/scsi.c | scsi_request_sense (SCpnt); |
SCpnt | 1106 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1112 | drivers/scsi/scsi.c | SCpnt->host->host_no); |
SCpnt | 1113 | drivers/scsi/scsi.c | reset(SCpnt); |
SCpnt | 1136 | drivers/scsi/scsi.c | if (SCpnt->flags & WAS_TIMEDOUT) |
SCpnt | 1148 | drivers/scsi/scsi.c | SCpnt->flags |= WAS_TIMEDOUT; |
SCpnt | 1173 | drivers/scsi/scsi.c | switch (check_sense(SCpnt)) { |
SCpnt | 1175 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1188 | drivers/scsi/scsi.c | scsi_request_sense (SCpnt); |
SCpnt | 1210 | drivers/scsi/scsi.c | SCpnt->allowed, SCpnt->retries); |
SCpnt | 1213 | drivers/scsi/scsi.c | if ((++SCpnt->retries) < SCpnt->allowed) |
SCpnt | 1215 | drivers/scsi/scsi.c | if ((SCpnt->retries >= (SCpnt->allowed >> 1)) |
SCpnt | 1216 | drivers/scsi/scsi.c | && !(SCpnt->flags & WAS_RESET)) |
SCpnt | 1219 | drivers/scsi/scsi.c | SCpnt->host->host_no); |
SCpnt | 1220 | drivers/scsi/scsi.c | reset(SCpnt); |
SCpnt | 1233 | drivers/scsi/scsi.c | if (SCpnt->flags & WAS_SENSE) |
SCpnt | 1234 | drivers/scsi/scsi.c | scsi_request_sense(SCpnt); |
SCpnt | 1237 | drivers/scsi/scsi.c | memcpy ((void *) SCpnt->cmnd, |
SCpnt | 1238 | drivers/scsi/scsi.c | (void*) SCpnt->data_cmnd, |
SCpnt | 1239 | drivers/scsi/scsi.c | sizeof(SCpnt->data_cmnd)); |
SCpnt | 1240 | drivers/scsi/scsi.c | SCpnt->request_buffer = SCpnt->buffer; |
SCpnt | 1241 | drivers/scsi/scsi.c | SCpnt->request_bufflen = SCpnt->bufflen; |
SCpnt | 1242 | drivers/scsi/scsi.c | SCpnt->use_sg = SCpnt->old_use_sg; |
SCpnt | 1243 | drivers/scsi/scsi.c | internal_cmnd (SCpnt); |
SCpnt | 1253 | drivers/scsi/scsi.c | printk("Calling done function - at address %08x\n", SCpnt->done); |
SCpnt | 1257 | drivers/scsi/scsi.c | SCpnt->result = result | ((exit & 0xff) << 24); |
SCpnt | 1258 | drivers/scsi/scsi.c | SCpnt->use_sg = SCpnt->old_use_sg; |
SCpnt | 1259 | drivers/scsi/scsi.c | SCpnt->done (SCpnt); |
SCpnt | 1285 | drivers/scsi/scsi.c | int scsi_abort (Scsi_Cmnd * SCpnt, int why) |
SCpnt | 1288 | drivers/scsi/scsi.c | struct Scsi_Host * host = SCpnt->host; |
SCpnt | 1293 | drivers/scsi/scsi.c | if (SCpnt->internal_timeout & IN_ABORT) |
SCpnt | 1296 | drivers/scsi/scsi.c | while (SCpnt->internal_timeout & IN_ABORT); |
SCpnt | 1300 | drivers/scsi/scsi.c | SCpnt->internal_timeout |= IN_ABORT; |
SCpnt | 1301 | drivers/scsi/scsi.c | oldto = update_timeout(SCpnt, ABORT_TIMEOUT); |
SCpnt | 1305 | drivers/scsi/scsi.c | if (!host->host_busy || !host->hostt->abort(SCpnt, why)) |
SCpnt | 1311 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_ABORT; |
SCpnt | 1312 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1319 | drivers/scsi/scsi.c | int scsi_reset (Scsi_Cmnd * SCpnt) |
SCpnt | 1323 | drivers/scsi/scsi.c | struct Scsi_Host * host = SCpnt->host; |
SCpnt | 1330 | drivers/scsi/scsi.c | if (SCpnt->internal_timeout & IN_RESET) |
SCpnt | 1333 | drivers/scsi/scsi.c | while (SCpnt->internal_timeout & IN_RESET); |
SCpnt | 1337 | drivers/scsi/scsi.c | SCpnt->internal_timeout |= IN_RESET; |
SCpnt | 1338 | drivers/scsi/scsi.c | oldto = update_timeout(SCpnt, RESET_TIMEOUT); |
SCpnt | 1352 | drivers/scsi/scsi.c | temp = host->hostt->reset(SCpnt); |
SCpnt | 1359 | drivers/scsi/scsi.c | temp = host->hostt->reset(SCpnt); |
SCpnt | 1365 | drivers/scsi/scsi.c | SCpnt->internal_timeout &= ~IN_RESET; |
SCpnt | 1366 | drivers/scsi/scsi.c | update_timeout(SCpnt, oldto); |
SCpnt | 1382 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 1394 | drivers/scsi/scsi.c | SCpnt = host->host_queue; |
SCpnt | 1395 | drivers/scsi/scsi.c | while (SCpnt){ |
SCpnt | 1396 | drivers/scsi/scsi.c | if (SCpnt->timeout > 0 && SCpnt->timeout <= time_elapsed) |
SCpnt | 1399 | drivers/scsi/scsi.c | SCpnt->timeout = 0; |
SCpnt | 1400 | drivers/scsi/scsi.c | scsi_times_out(SCpnt); |
SCpnt | 1404 | drivers/scsi/scsi.c | SCpnt = SCpnt->next; |
SCpnt | 1425 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 1451 | drivers/scsi/scsi.c | SCpnt = host->host_queue; |
SCpnt | 1452 | drivers/scsi/scsi.c | while (SCpnt){ |
SCpnt | 1453 | drivers/scsi/scsi.c | if (SCpnt->timeout > 0 && (SCpnt->timeout -= used) < least) |
SCpnt | 1454 | drivers/scsi/scsi.c | least = SCpnt->timeout; |
SCpnt | 1455 | drivers/scsi/scsi.c | SCpnt = SCpnt->next; |
SCpnt | 1555 | drivers/scsi/scsi.c | Scsi_Cmnd * SCpnt; |
SCpnt | 1576 | drivers/scsi/scsi.c | SCpnt = last_cmnd; |
SCpnt | 1597 | drivers/scsi/scsi.c | SCpnt->host = scsi_devices[i].host; |
SCpnt | 1598 | drivers/scsi/scsi.c | SCpnt->target = scsi_devices[i].id; |
SCpnt | 1599 | drivers/scsi/scsi.c | SCpnt->lun = scsi_devices[i].lun; |
SCpnt | 1600 | drivers/scsi/scsi.c | SCpnt->index = i; |
SCpnt | 1601 | drivers/scsi/scsi.c | SCpnt->request.dev = -1; /* Mark not busy */ |
SCpnt | 1602 | drivers/scsi/scsi.c | SCpnt->use_sg = 0; |
SCpnt | 1603 | drivers/scsi/scsi.c | SCpnt->old_use_sg = 0; |
SCpnt | 1604 | drivers/scsi/scsi.c | SCpnt->underflow = 0; |
SCpnt | 1605 | drivers/scsi/scsi.c | SCpnt->transfersize = 0; |
SCpnt | 1606 | drivers/scsi/scsi.c | SCpnt->host_scribble = NULL; |
SCpnt | 1609 | drivers/scsi/scsi.c | host->host_queue->prev = SCpnt; |
SCpnt | 1610 | drivers/scsi/scsi.c | SCpnt->next = host->host_queue; |
SCpnt | 1611 | drivers/scsi/scsi.c | SCpnt->prev = NULL; |
SCpnt | 1612 | drivers/scsi/scsi.c | host->host_queue = SCpnt; |
SCpnt | 1613 | drivers/scsi/scsi.c | SCpnt++; |
SCpnt | 1618 | drivers/scsi/scsi.c | memory_start = (int) SCpnt; |
SCpnt | 450 | drivers/scsi/scsi.h | static void end_scsi_request(Scsi_Cmnd * SCpnt, int uptodate, int sectors) |
SCpnt | 456 | drivers/scsi/scsi.h | req = &SCpnt->request; |
SCpnt | 493 | drivers/scsi/scsi.h | wake_up(&scsi_devices[SCpnt->index].device_wait); |
SCpnt | 49 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xf) != 0) start = starts[(SCpnt->request.dev & 0xf) - 1]; \ |
SCpnt | 55 | drivers/scsi/scsi_debug.c | if (bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\ |
SCpnt | 61 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xfff0) != ((target + NR_REAL) << 4) +(MAJOR_NR << 8)){ \ |
SCpnt | 62 | drivers/scsi/scsi_debug.c | printk("Dev #s %x %x ",SCpnt->request.dev, target); \ |
SCpnt | 68 | drivers/scsi/scsi_debug.c | if (bufflen != 1024 && (!SCpnt->use_sg)) {printk("%x %d\n ",bufflen, SCpnt->use_sg); panic("Bad bufflen");}; \ |
SCpnt | 70 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xf) > npart) panic ("Bad partition"); \ |
SCpnt | 71 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xf) != 0) start = starts[(SCpnt->request.dev & 0xf) - 1]; \ |
SCpnt | 72 | drivers/scsi/scsi_debug.c | if (SCpnt->request.cmd != RW) panic ("Wrong operation"); \ |
SCpnt | 73 | drivers/scsi/scsi_debug.c | if (SCpnt->request.sector + start != block) panic("Wrong block."); \ |
SCpnt | 74 | drivers/scsi/scsi_debug.c | if (SCpnt->request.current_nr_sectors != 2 && (!SCpnt->use_sg)) panic ("Wrong # blocks"); \ |
SCpnt | 75 | drivers/scsi/scsi_debug.c | if (SCpnt->request.bh){ \ |
SCpnt | 76 | drivers/scsi/scsi_debug.c | if (SCpnt->request.bh->b_size != 1024) panic ("Wrong bh size"); \ |
SCpnt | 77 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.bh->b_blocknr << 1) + start != block) \ |
SCpnt | 78 | drivers/scsi/scsi_debug.c | { printk("Wrong bh block# %d %d ",SCpnt->request.bh->b_blocknr, block); \ |
SCpnt | 80 | drivers/scsi/scsi_debug.c | if (SCpnt->request.bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\ |
SCpnt | 92 | drivers/scsi/scsi_debug.c | static void scsi_dump(Scsi_Cmnd * SCpnt, int flag){ |
SCpnt | 99 | drivers/scsi/scsi_debug.c | printk("use_sg: %d",SCpnt->use_sg); |
SCpnt | 100 | drivers/scsi/scsi_debug.c | if (SCpnt->use_sg){ |
SCpnt | 101 | drivers/scsi/scsi_debug.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 102 | drivers/scsi/scsi_debug.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 108 | drivers/scsi/scsi_debug.c | printk("nosg: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 109 | drivers/scsi/scsi_debug.c | SCpnt->bufflen); |
SCpnt | 110 | drivers/scsi/scsi_debug.c | lpnt = (int *) SCpnt->request.buffer; |
SCpnt | 113 | drivers/scsi/scsi_debug.c | lpnt = (unsigned int *) SCpnt; |
SCpnt | 137 | drivers/scsi/scsi_debug.c | int scsi_debug_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 139 | drivers/scsi/scsi_debug.c | unchar *cmd = (unchar *) SCpnt->cmnd; |
SCpnt | 147 | drivers/scsi/scsi_debug.c | int target = SCpnt->target; |
SCpnt | 148 | drivers/scsi/scsi_debug.c | int bufflen = SCpnt->request_bufflen; |
SCpnt | 153 | drivers/scsi/scsi_debug.c | DEB(if (target > 1) { SCpnt->result = DID_TIME_OUT << 16;done(SCpnt);return 0;}); |
SCpnt | 155 | drivers/scsi/scsi_debug.c | buff = (unsigned char *) SCpnt->request_buffer; |
SCpnt | 157 | drivers/scsi/scsi_debug.c | if(target>=2 || SCpnt->lun != 0) { |
SCpnt | 158 | drivers/scsi/scsi_debug.c | SCpnt->result = DID_NO_CONNECT << 16; |
SCpnt | 159 | drivers/scsi/scsi_debug.c | done(SCpnt); |
SCpnt | 168 | drivers/scsi/scsi_debug.c | printk("scsi_debug: Requesting sense buffer (%x %x %x %d):", SCpnt, buff, done, bufflen); |
SCpnt | 176 | drivers/scsi/scsi_debug.c | SCpnt->result = 0; |
SCpnt | 177 | drivers/scsi/scsi_debug.c | done(SCpnt); |
SCpnt | 203 | drivers/scsi/scsi_debug.c | if(NR_REAL < 0) NR_REAL = (SCpnt->request.dev >> 4) & 0x0f; |
SCpnt | 222 | drivers/scsi/scsi_debug.c | printk("(r%d)",SCpnt->request.nr_sectors); |
SCpnt | 224 | drivers/scsi/scsi_debug.c | if(SCpnt->use_sg){ |
SCpnt | 229 | drivers/scsi/scsi_debug.c | bh = SCpnt->request.bh; |
SCpnt | 252 | drivers/scsi/scsi_debug.c | if (SCpnt->use_sg) printk("Block %x (%d %d)\n",block, SCpnt->request.nr_sectors, |
SCpnt | 253 | drivers/scsi/scsi_debug.c | SCpnt->request.current_nr_sectors); |
SCpnt | 277 | drivers/scsi/scsi_debug.c | memcpy(buff+64, SCpnt, sizeof(Scsi_Cmnd)); |
SCpnt | 279 | drivers/scsi/scsi_debug.c | if(SCpnt->use_sg){ |
SCpnt | 291 | drivers/scsi/scsi_debug.c | if (SCpnt->use_sg && !scsi_debug_errsts) |
SCpnt | 292 | drivers/scsi/scsi_debug.c | if(bh) scsi_dump(SCpnt, 0); |
SCpnt | 304 | drivers/scsi/scsi_debug.c | printk("(w%d)",SCpnt->request.nr_sectors); |
SCpnt | 305 | drivers/scsi/scsi_debug.c | if (SCpnt->use_sg){ |
SCpnt | 306 | drivers/scsi/scsi_debug.c | if ((bufflen >> 9) != SCpnt->request.nr_sectors) |
SCpnt | 314 | drivers/scsi/scsi_debug.c | scsi_dump(SCpnt,1); |
SCpnt | 322 | drivers/scsi/scsi_debug.c | SCpnt->result = DID_NO_CONNECT << 16; |
SCpnt | 323 | drivers/scsi/scsi_debug.c | done(SCpnt); |
SCpnt | 335 | drivers/scsi/scsi_debug.c | SCint[i] = SCpnt; |
SCpnt | 355 | drivers/scsi/scsi_debug.c | SCpnt->result = scsi_debug_errsts; |
SCpnt | 367 | drivers/scsi/scsi_debug.c | static void internal_done(Scsi_Cmnd * SCpnt) |
SCpnt | 369 | drivers/scsi/scsi_debug.c | internal_done_errcode = SCpnt->result; |
SCpnt | 373 | drivers/scsi/scsi_debug.c | int scsi_debug_command(Scsi_Cmnd * SCpnt) |
SCpnt | 376 | drivers/scsi/scsi_debug.c | scsi_debug_queuecommand(SCpnt, internal_done); |
SCpnt | 462 | drivers/scsi/scsi_debug.c | int scsi_debug_abort(Scsi_Cmnd * SCpnt,int i) |
SCpnt | 467 | drivers/scsi/scsi_debug.c | SCpnt->result = i << 16; |
SCpnt | 469 | drivers/scsi/scsi_debug.c | if(SCpnt == SCint[j]) { |
SCpnt | 471 | drivers/scsi/scsi_debug.c | my_done(SCpnt); |
SCpnt | 490 | drivers/scsi/scsi_debug.c | int scsi_debug_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 73 | drivers/scsi/scsi_ioctl.c | static void scsi_ioctl_done (Scsi_Cmnd * SCpnt) |
SCpnt | 78 | drivers/scsi/scsi_ioctl.c | req = &SCpnt->request; |
SCpnt | 92 | drivers/scsi/scsi_ioctl.c | Scsi_Cmnd * SCpnt; |
SCpnt | 94 | drivers/scsi/scsi_ioctl.c | SCpnt = allocate_device(NULL, dev->index, 1); |
SCpnt | 95 | drivers/scsi/scsi_ioctl.c | scsi_do_cmd(SCpnt, cmd, NULL, 0, |
SCpnt | 99 | drivers/scsi/scsi_ioctl.c | if (SCpnt->request.dev != 0xfffe){ |
SCpnt | 100 | drivers/scsi/scsi_ioctl.c | SCpnt->request.waiting = current; |
SCpnt | 102 | drivers/scsi/scsi_ioctl.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 105 | drivers/scsi/scsi_ioctl.c | if(driver_byte(SCpnt->result) != 0) |
SCpnt | 106 | drivers/scsi/scsi_ioctl.c | switch(SCpnt->sense_buffer[2] & 0xf) { |
SCpnt | 119 | drivers/scsi/scsi_ioctl.c | SCpnt->result = 0; /* This is no longer considered an error */ |
SCpnt | 128 | drivers/scsi/scsi_ioctl.c | SCpnt->result); |
SCpnt | 130 | drivers/scsi/scsi_ioctl.c | sense_class(SCpnt->sense_buffer[0]), |
SCpnt | 131 | drivers/scsi/scsi_ioctl.c | sense_error(SCpnt->sense_buffer[0]), |
SCpnt | 132 | drivers/scsi/scsi_ioctl.c | SCpnt->sense_buffer[2] & 0xf); |
SCpnt | 136 | drivers/scsi/scsi_ioctl.c | result = SCpnt->result; |
SCpnt | 137 | drivers/scsi/scsi_ioctl.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 138 | drivers/scsi/scsi_ioctl.c | wake_up(&scsi_devices[SCpnt->index].device_wait); |
SCpnt | 147 | drivers/scsi/scsi_ioctl.c | Scsi_Cmnd * SCpnt; |
SCpnt | 178 | drivers/scsi/scsi_ioctl.c | SCpnt = allocate_device(NULL, dev->index, 1); |
SCpnt | 180 | drivers/scsi/scsi_ioctl.c | scsi_do_cmd(SCpnt, cmd, buf, needed, scsi_ioctl_done, MAX_TIMEOUT, |
SCpnt | 183 | drivers/scsi/scsi_ioctl.c | if (SCpnt->request.dev != 0xfffe){ |
SCpnt | 184 | drivers/scsi/scsi_ioctl.c | SCpnt->request.waiting = current; |
SCpnt | 186 | drivers/scsi/scsi_ioctl.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 191 | drivers/scsi/scsi_ioctl.c | if(SCpnt->result) { |
SCpnt | 192 | drivers/scsi/scsi_ioctl.c | result = verify_area(VERIFY_WRITE, cmd_in, sizeof(SCpnt->sense_buffer)); |
SCpnt | 195 | drivers/scsi/scsi_ioctl.c | memcpy_tofs((void *) cmd_in, SCpnt->sense_buffer, sizeof(SCpnt->sense_buffer)); |
SCpnt | 203 | drivers/scsi/scsi_ioctl.c | result = SCpnt->result; |
SCpnt | 204 | drivers/scsi/scsi_ioctl.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 206 | drivers/scsi/scsi_ioctl.c | wake_up(&scsi_devices[SCpnt->index].device_wait); |
SCpnt | 54 | drivers/scsi/sd.c | static void requeue_sd_request (Scsi_Cmnd * SCpnt); |
SCpnt | 138 | drivers/scsi/sd.c | static void rw_intr (Scsi_Cmnd *SCpnt) |
SCpnt | 140 | drivers/scsi/sd.c | int result = SCpnt->result; |
SCpnt | 141 | drivers/scsi/sd.c | int this_count = SCpnt->bufflen >> 9; |
SCpnt | 144 | drivers/scsi/sd.c | printk("sd%d : rw_intr(%d, %d)\n", MINOR(SCpnt->request.dev), SCpnt->host->host_no, result); |
SCpnt | 156 | drivers/scsi/sd.c | printk("sd%d : %d sectors remain.\n", MINOR(SCpnt->request.dev), SCpnt->request.nr_sectors); |
SCpnt | 157 | drivers/scsi/sd.c | printk("use_sg is %d\n ",SCpnt->use_sg); |
SCpnt | 159 | drivers/scsi/sd.c | if (SCpnt->use_sg) { |
SCpnt | 162 | drivers/scsi/sd.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 163 | drivers/scsi/sd.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 168 | drivers/scsi/sd.c | if (SCpnt->request.cmd == READ) |
SCpnt | 173 | drivers/scsi/sd.c | scsi_free(SCpnt->buffer, SCpnt->sglist_len); /* Free list of scatter-gather pointers */ |
SCpnt | 175 | drivers/scsi/sd.c | if (SCpnt->buffer != SCpnt->request.buffer) { |
SCpnt | 177 | drivers/scsi/sd.c | printk("nosg: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 178 | drivers/scsi/sd.c | SCpnt->bufflen); |
SCpnt | 180 | drivers/scsi/sd.c | if (SCpnt->request.cmd == READ) |
SCpnt | 181 | drivers/scsi/sd.c | memcpy(SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 182 | drivers/scsi/sd.c | SCpnt->bufflen); |
SCpnt | 183 | drivers/scsi/sd.c | scsi_free(SCpnt->buffer, SCpnt->bufflen); |
SCpnt | 191 | drivers/scsi/sd.c | if (SCpnt->request.nr_sectors > this_count) |
SCpnt | 193 | drivers/scsi/sd.c | SCpnt->request.errors = 0; |
SCpnt | 195 | drivers/scsi/sd.c | if (!SCpnt->request.bh) |
SCpnt | 199 | drivers/scsi/sd.c | MINOR(SCpnt->request.dev)); |
SCpnt | 206 | drivers/scsi/sd.c | SCpnt->request.sector, this_count); |
SCpnt | 209 | drivers/scsi/sd.c | end_scsi_request(SCpnt, 1, this_count); |
SCpnt | 210 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 215 | drivers/scsi/sd.c | if (SCpnt->use_sg) { |
SCpnt | 218 | drivers/scsi/sd.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 219 | drivers/scsi/sd.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 221 | drivers/scsi/sd.c | printk("err: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 222 | drivers/scsi/sd.c | SCpnt->bufflen); |
SCpnt | 228 | drivers/scsi/sd.c | scsi_free(SCpnt->buffer, SCpnt->sglist_len); /* Free list of scatter-gather pointers */ |
SCpnt | 231 | drivers/scsi/sd.c | printk("nosgerr: %x %x %d\n",SCpnt->request.buffer, SCpnt->buffer, |
SCpnt | 232 | drivers/scsi/sd.c | SCpnt->bufflen); |
SCpnt | 234 | drivers/scsi/sd.c | if (SCpnt->buffer != SCpnt->request.buffer) |
SCpnt | 235 | drivers/scsi/sd.c | scsi_free(SCpnt->buffer, SCpnt->bufflen); |
SCpnt | 251 | drivers/scsi/sd.c | if rscsi_disks[DEVICE_NR(SCpnt->request.dev)].remap |
SCpnt | 260 | drivers/scsi/sd.c | if ((SCpnt->sense_buffer[0] & 0x7f) == 0x70) { |
SCpnt | 261 | drivers/scsi/sd.c | if ((SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) { |
SCpnt | 262 | drivers/scsi/sd.c | if(rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->removable) { |
SCpnt | 266 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->changed = 1; |
SCpnt | 267 | drivers/scsi/sd.c | end_scsi_request(SCpnt, 0, this_count); |
SCpnt | 268 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 282 | drivers/scsi/sd.c | if (SCpnt->sense_buffer[2] == ILLEGAL_REQUEST) { |
SCpnt | 283 | drivers/scsi/sd.c | if (rscsi_disks[DEVICE_NR(SCpnt->request.dev)].ten) { |
SCpnt | 284 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].ten = 0; |
SCpnt | 285 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 293 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->host->host_no, |
SCpnt | 294 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->id, |
SCpnt | 295 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->lun, result); |
SCpnt | 298 | drivers/scsi/sd.c | print_sense("sd", SCpnt); |
SCpnt | 299 | drivers/scsi/sd.c | end_scsi_request(SCpnt, 0, SCpnt->request.current_nr_sectors); |
SCpnt | 300 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 313 | drivers/scsi/sd.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 338 | drivers/scsi/sd.c | SCpnt = allocate_device(&CURRENT, |
SCpnt | 340 | drivers/scsi/sd.c | else SCpnt = NULL; |
SCpnt | 350 | drivers/scsi/sd.c | if (!SCpnt && NR_SD > 1){ |
SCpnt | 356 | drivers/scsi/sd.c | SCpnt = request_queueable(req, |
SCpnt | 358 | drivers/scsi/sd.c | if(SCpnt) break; |
SCpnt | 362 | drivers/scsi/sd.c | if (SCpnt && req->dev == -1) { |
SCpnt | 371 | drivers/scsi/sd.c | if (!SCpnt) return; /* Could not find anything to do */ |
SCpnt | 376 | drivers/scsi/sd.c | requeue_sd_request(SCpnt); |
SCpnt | 380 | drivers/scsi/sd.c | static void requeue_sd_request (Scsi_Cmnd * SCpnt) |
SCpnt | 388 | drivers/scsi/sd.c | if(SCpnt->request.dev <= 0) { |
SCpnt | 393 | drivers/scsi/sd.c | dev = MINOR(SCpnt->request.dev); |
SCpnt | 394 | drivers/scsi/sd.c | block = SCpnt->request.sector; |
SCpnt | 401 | drivers/scsi/sd.c | if (dev >= (NR_SD << 4) || block + SCpnt->request.nr_sectors > sd[dev].nr_sects) |
SCpnt | 403 | drivers/scsi/sd.c | end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 416 | drivers/scsi/sd.c | end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 421 | drivers/scsi/sd.c | printk("sd%d : real dev = /dev/sd%d, block = %d\n", MINOR(SCpnt->request.dev), dev, block); |
SCpnt | 424 | drivers/scsi/sd.c | switch (SCpnt->request.cmd) |
SCpnt | 429 | drivers/scsi/sd.c | end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 438 | drivers/scsi/sd.c | panic ("Unknown sd command %d\n", SCpnt->request.cmd); |
SCpnt | 441 | drivers/scsi/sd.c | SCpnt->this_count = 0; |
SCpnt | 443 | drivers/scsi/sd.c | if (!SCpnt->request.bh || |
SCpnt | 444 | drivers/scsi/sd.c | (SCpnt->request.nr_sectors == SCpnt->request.current_nr_sectors)) { |
SCpnt | 447 | drivers/scsi/sd.c | this_count = SCpnt->request.nr_sectors; |
SCpnt | 448 | drivers/scsi/sd.c | buff = SCpnt->request.buffer; |
SCpnt | 449 | drivers/scsi/sd.c | SCpnt->use_sg = 0; |
SCpnt | 451 | drivers/scsi/sd.c | } else if (SCpnt->host->sg_tablesize == 0 || |
SCpnt | 462 | drivers/scsi/sd.c | if (SCpnt->host->sg_tablesize != 0 && |
SCpnt | 467 | drivers/scsi/sd.c | this_count = SCpnt->request.current_nr_sectors; |
SCpnt | 468 | drivers/scsi/sd.c | buff = SCpnt->request.buffer; |
SCpnt | 469 | drivers/scsi/sd.c | SCpnt->use_sg = 0; |
SCpnt | 477 | drivers/scsi/sd.c | bh = SCpnt->request.bh; |
SCpnt | 481 | drivers/scsi/sd.c | while(bh && count < SCpnt->host->sg_tablesize) { |
SCpnt | 487 | drivers/scsi/sd.c | SCpnt->use_sg = count; /* Number of chains */ |
SCpnt | 489 | drivers/scsi/sd.c | while( count < (SCpnt->use_sg * sizeof(struct scatterlist))) |
SCpnt | 491 | drivers/scsi/sd.c | SCpnt->sglist_len = count; |
SCpnt | 495 | drivers/scsi/sd.c | SCpnt->use_sg = 0; /* No memory left - bail out */ |
SCpnt | 496 | drivers/scsi/sd.c | this_count = SCpnt->request.current_nr_sectors; |
SCpnt | 497 | drivers/scsi/sd.c | buff = SCpnt->request.buffer; |
SCpnt | 501 | drivers/scsi/sd.c | bh = SCpnt->request.bh; |
SCpnt | 502 | drivers/scsi/sd.c | for(count = 0, bh = SCpnt->request.bh; count < SCpnt->use_sg; |
SCpnt | 508 | drivers/scsi/sd.c | ISA_DMA_THRESHOLD & (SCpnt->host->unchecked_isa_dma)) { |
SCpnt | 529 | drivers/scsi/sd.c | this_count = SCpnt->request.current_nr_sectors; |
SCpnt | 530 | drivers/scsi/sd.c | buff = SCpnt->request.buffer; |
SCpnt | 531 | drivers/scsi/sd.c | SCpnt->use_sg = 0; |
SCpnt | 532 | drivers/scsi/sd.c | scsi_free(buff, SCpnt->sglist_len); |
SCpnt | 536 | drivers/scsi/sd.c | if (SCpnt->request.cmd == WRITE) |
SCpnt | 546 | drivers/scsi/sd.c | if(SCpnt->use_sg == 0){ |
SCpnt | 548 | drivers/scsi/sd.c | (SCpnt->host->unchecked_isa_dma)) { |
SCpnt | 551 | drivers/scsi/sd.c | if (SCpnt->request.cmd == WRITE) |
SCpnt | 552 | drivers/scsi/sd.c | memcpy(buff, (char *)SCpnt->request.buffer, this_count << 9); |
SCpnt | 557 | drivers/scsi/sd.c | printk("sd%d : %s %d/%d 512 byte blocks.\n", MINOR(SCpnt->request.dev), |
SCpnt | 558 | drivers/scsi/sd.c | (SCpnt->request.cmd == WRITE) ? "writing" : "reading", |
SCpnt | 559 | drivers/scsi/sd.c | this_count, SCpnt->request.nr_sectors); |
SCpnt | 562 | drivers/scsi/sd.c | cmd[1] = (SCpnt->lun << 5) & 0xe0; |
SCpnt | 608 | drivers/scsi/sd.c | SCpnt->transfersize = rscsi_disks[dev].sector_size; |
SCpnt | 609 | drivers/scsi/sd.c | SCpnt->underflow = this_count << 9; |
SCpnt | 611 | drivers/scsi/sd.c | scsi_do_cmd (SCpnt, (void *) cmd, buff, |
SCpnt | 648 | drivers/scsi/sd.c | static void sd_init_done (Scsi_Cmnd * SCpnt) |
SCpnt | 653 | drivers/scsi/sd.c | req = &SCpnt->request; |
SCpnt | 671 | drivers/scsi/sd.c | Scsi_Cmnd * SCpnt; |
SCpnt | 677 | drivers/scsi/sd.c | SCpnt = allocate_device(NULL, rscsi_disks[i].device->index, 1); |
SCpnt | 688 | drivers/scsi/sd.c | SCpnt->request.dev = 0xffff; /* Mark as really busy again */ |
SCpnt | 689 | drivers/scsi/sd.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 690 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] = 0; |
SCpnt | 692 | drivers/scsi/sd.c | scsi_do_cmd (SCpnt, |
SCpnt | 697 | drivers/scsi/sd.c | while(SCpnt->request.dev != 0xfffe); |
SCpnt | 699 | drivers/scsi/sd.c | the_result = SCpnt->result; |
SCpnt | 704 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] == NOT_READY) { |
SCpnt | 713 | drivers/scsi/sd.c | SCpnt->request.dev = 0xffff; /* Mark as really busy again */ |
SCpnt | 714 | drivers/scsi/sd.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 715 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] = 0; |
SCpnt | 717 | drivers/scsi/sd.c | scsi_do_cmd (SCpnt, |
SCpnt | 722 | drivers/scsi/sd.c | while(SCpnt->request.dev != 0xfffe); |
SCpnt | 747 | drivers/scsi/sd.c | SCpnt->request.dev = 0xffff; /* Mark as really busy again */ |
SCpnt | 748 | drivers/scsi/sd.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 749 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] = 0; |
SCpnt | 751 | drivers/scsi/sd.c | scsi_do_cmd (SCpnt, |
SCpnt | 757 | drivers/scsi/sd.c | while(SCpnt->request.dev != 0xfffe); |
SCpnt | 759 | drivers/scsi/sd.c | if (SCpnt->request.dev != 0xfffe){ |
SCpnt | 760 | drivers/scsi/sd.c | SCpnt->request.waiting = current; |
SCpnt | 762 | drivers/scsi/sd.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 765 | drivers/scsi/sd.c | the_result = SCpnt->result; |
SCpnt | 770 | drivers/scsi/sd.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 772 | drivers/scsi/sd.c | wake_up(&scsi_devices[SCpnt->index].device_wait); |
SCpnt | 800 | drivers/scsi/sd.c | printk("sd%d : extended sense code = %1x \n", i, SCpnt->sense_buffer[2] & 0xf); |
SCpnt | 811 | drivers/scsi/sd.c | SCpnt->sense_buffer[2] == NOT_READY) |
SCpnt | 514 | drivers/scsi/seagate.c | int seagate_st0x_queue_command (Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 520 | drivers/scsi/seagate.c | current_target = SCpnt->target; |
SCpnt | 521 | drivers/scsi/seagate.c | current_lun = SCpnt->lun; |
SCpnt | 522 | drivers/scsi/seagate.c | (const void *) current_cmnd = SCpnt->cmnd; |
SCpnt | 523 | drivers/scsi/seagate.c | current_data = (unsigned char *) SCpnt->request_buffer; |
SCpnt | 524 | drivers/scsi/seagate.c | current_bufflen = SCpnt->request_bufflen; |
SCpnt | 525 | drivers/scsi/seagate.c | SCint = SCpnt; |
SCpnt | 575 | drivers/scsi/seagate.c | int seagate_st0x_command (Scsi_Cmnd * SCpnt) { |
SCpnt | 576 | drivers/scsi/seagate.c | return internal_command (SCpnt->target, SCpnt->lun, SCpnt->cmnd, SCpnt->request_buffer, |
SCpnt | 577 | drivers/scsi/seagate.c | SCpnt->request_bufflen, |
SCpnt | 1549 | drivers/scsi/seagate.c | int seagate_st0x_abort (Scsi_Cmnd * SCpnt, int code) |
SCpnt | 1563 | drivers/scsi/seagate.c | int seagate_st0x_reset (Scsi_Cmnd * SCpnt) |
SCpnt | 1593 | drivers/scsi/seagate.c | if(SCpnt) SCpnt->flags |= NEEDS_JUMPSTART; |
SCpnt | 186 | drivers/scsi/sg.c | static void sg_command_done(Scsi_Cmnd * SCpnt) |
SCpnt | 188 | drivers/scsi/sg.c | int dev=SCpnt->request.dev; |
SCpnt | 193 | drivers/scsi/sg.c | SCpnt->request.dev=-1; |
SCpnt | 196 | drivers/scsi/sg.c | if (SCpnt->sense_buffer[0]) |
SCpnt | 201 | drivers/scsi/sg.c | device->header.result=SCpnt->result; |
SCpnt | 203 | drivers/scsi/sg.c | SCpnt->request.dev=-1; |
SCpnt | 210 | drivers/scsi/sg.c | Scsi_Cmnd *SCpnt; |
SCpnt | 251 | drivers/scsi/sg.c | if (!(SCpnt=allocate_device(NULL,device->device->index, !(filp->f_flags & O_NONBLOCK)))) |
SCpnt | 262 | drivers/scsi/sg.c | SCpnt->request.dev=dev; |
SCpnt | 263 | drivers/scsi/sg.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 272 | drivers/scsi/sg.c | scsi_do_cmd (SCpnt,(void *) cmnd, |
SCpnt | 46 | drivers/scsi/sr.c | void requeue_sr_request (Scsi_Cmnd * SCpnt); |
SCpnt | 113 | drivers/scsi/sr.c | static void rw_intr (Scsi_Cmnd * SCpnt) |
SCpnt | 115 | drivers/scsi/sr.c | int result = SCpnt->result; |
SCpnt | 116 | drivers/scsi/sr.c | int this_count = SCpnt->this_count; |
SCpnt | 119 | drivers/scsi/sr.c | printk("sr.c done: %x %x\n",result, SCpnt->request.bh->b_data); |
SCpnt | 123 | drivers/scsi/sr.c | if (SCpnt->use_sg == 0) { |
SCpnt | 124 | drivers/scsi/sr.c | if (SCpnt->buffer != SCpnt->request.buffer) |
SCpnt | 127 | drivers/scsi/sr.c | offset = (SCpnt->request.sector % 4) << 9; |
SCpnt | 128 | drivers/scsi/sr.c | memcpy((char *)SCpnt->request.buffer, |
SCpnt | 129 | drivers/scsi/sr.c | (char *)SCpnt->buffer + offset, |
SCpnt | 136 | drivers/scsi/sr.c | SCpnt->request.nr_sectors > this_count && |
SCpnt | 137 | drivers/scsi/sr.c | SCpnt->request.bh && |
SCpnt | 138 | drivers/scsi/sr.c | SCpnt->request.bh->b_reqnext && |
SCpnt | 139 | drivers/scsi/sr.c | SCpnt->request.bh->b_reqnext->b_size == 1024) { |
SCpnt | 140 | drivers/scsi/sr.c | memcpy((char *)SCpnt->request.bh->b_reqnext->b_data, |
SCpnt | 141 | drivers/scsi/sr.c | (char *)SCpnt->buffer + 1024, |
SCpnt | 146 | drivers/scsi/sr.c | scsi_free(SCpnt->buffer, 2048); |
SCpnt | 151 | drivers/scsi/sr.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 152 | drivers/scsi/sr.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 160 | drivers/scsi/sr.c | scsi_free(SCpnt->buffer, SCpnt->sglist_len); /* Free list of scatter-gather pointers */ |
SCpnt | 161 | drivers/scsi/sr.c | if(SCpnt->request.sector % 4) this_count -= 2; |
SCpnt | 163 | drivers/scsi/sr.c | if(this_count > SCpnt->request.nr_sectors) |
SCpnt | 168 | drivers/scsi/sr.c | printk("(%x %x %x) ",SCpnt->request.bh, SCpnt->request.nr_sectors, |
SCpnt | 171 | drivers/scsi/sr.c | if (SCpnt->request.nr_sectors > this_count) |
SCpnt | 173 | drivers/scsi/sr.c | SCpnt->request.errors = 0; |
SCpnt | 174 | drivers/scsi/sr.c | if (!SCpnt->request.bh) |
SCpnt | 176 | drivers/scsi/sr.c | SCpnt->request.sector, this_count); |
SCpnt | 179 | drivers/scsi/sr.c | end_scsi_request(SCpnt, 1, this_count); /* All done */ |
SCpnt | 180 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 187 | drivers/scsi/sr.c | if (SCpnt->use_sg) { |
SCpnt | 190 | drivers/scsi/sr.c | sgpnt = (struct scatterlist *) SCpnt->buffer; |
SCpnt | 191 | drivers/scsi/sr.c | for(i=0; i<SCpnt->use_sg; i++) { |
SCpnt | 196 | drivers/scsi/sr.c | scsi_free(SCpnt->buffer, SCpnt->sglist_len); /* Free list of scatter-gather pointers */ |
SCpnt | 198 | drivers/scsi/sr.c | if (SCpnt->buffer != SCpnt->request.buffer) |
SCpnt | 199 | drivers/scsi/sr.c | scsi_free(SCpnt->buffer, SCpnt->bufflen); |
SCpnt | 203 | drivers/scsi/sr.c | if ((SCpnt->sense_buffer[0] & 0x7f) == 0x70) { |
SCpnt | 204 | drivers/scsi/sr.c | if ((SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) { |
SCpnt | 208 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->changed = 1; |
SCpnt | 209 | drivers/scsi/sr.c | end_scsi_request(SCpnt, 0, this_count); |
SCpnt | 210 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 215 | drivers/scsi/sr.c | if (SCpnt->sense_buffer[2] == ILLEGAL_REQUEST) { |
SCpnt | 217 | drivers/scsi/sr.c | if (scsi_CDs[DEVICE_NR(SCpnt->request.dev)].ten) { |
SCpnt | 218 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].ten = 0; |
SCpnt | 219 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 223 | drivers/scsi/sr.c | printk("CD-ROM error: Drive reports %d.\n", SCpnt->sense_buffer[2]); |
SCpnt | 224 | drivers/scsi/sr.c | end_scsi_request(SCpnt, 0, this_count); |
SCpnt | 225 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); /* Do next request */ |
SCpnt | 231 | drivers/scsi/sr.c | if (SCpnt->sense_buffer[2] == NOT_READY) { |
SCpnt | 233 | drivers/scsi/sr.c | end_scsi_request(SCpnt, 0, this_count); |
SCpnt | 234 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); /* Do next request */ |
SCpnt | 242 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->host->host_no, |
SCpnt | 243 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->id, |
SCpnt | 244 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->lun, |
SCpnt | 248 | drivers/scsi/sr.c | print_sense("sr", SCpnt); |
SCpnt | 250 | drivers/scsi/sr.c | end_scsi_request(SCpnt, 0, SCpnt->request.current_nr_sectors); |
SCpnt | 251 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 284 | drivers/scsi/sr.c | Scsi_Cmnd * SCpnt = NULL; |
SCpnt | 298 | drivers/scsi/sr.c | SCpnt = allocate_device(&CURRENT, |
SCpnt | 300 | drivers/scsi/sr.c | else SCpnt = NULL; |
SCpnt | 310 | drivers/scsi/sr.c | if (!SCpnt && NR_SR > 1){ |
SCpnt | 316 | drivers/scsi/sr.c | SCpnt = request_queueable(req, |
SCpnt | 318 | drivers/scsi/sr.c | if(SCpnt) break; |
SCpnt | 322 | drivers/scsi/sr.c | if (SCpnt && req->dev == -1) { |
SCpnt | 331 | drivers/scsi/sr.c | if (!SCpnt) |
SCpnt | 337 | drivers/scsi/sr.c | requeue_sr_request(SCpnt); |
SCpnt | 341 | drivers/scsi/sr.c | void requeue_sr_request (Scsi_Cmnd * SCpnt) |
SCpnt | 350 | drivers/scsi/sr.c | if(SCpnt->request.dev <= 0) { |
SCpnt | 355 | drivers/scsi/sr.c | dev = MINOR(SCpnt->request.dev); |
SCpnt | 356 | drivers/scsi/sr.c | block = SCpnt->request.sector; |
SCpnt | 363 | drivers/scsi/sr.c | end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 371 | drivers/scsi/sr.c | end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 382 | drivers/scsi/sr.c | end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 387 | drivers/scsi/sr.c | switch (SCpnt->request.cmd) |
SCpnt | 390 | drivers/scsi/sr.c | end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); |
SCpnt | 397 | drivers/scsi/sr.c | panic ("Unknown sr command %d\n", SCpnt->request.cmd); |
SCpnt | 400 | drivers/scsi/sr.c | cmd[1] = (SCpnt->lun << 5) & 0xe0; |
SCpnt | 418 | drivers/scsi/sr.c | SCpnt->use_sg = 0; |
SCpnt | 420 | drivers/scsi/sr.c | if (SCpnt->host->sg_tablesize > 0 && |
SCpnt | 426 | drivers/scsi/sr.c | bh = SCpnt->request.bh; |
SCpnt | 432 | drivers/scsi/sr.c | this_count = SCpnt->request.sector % 4; |
SCpnt | 434 | drivers/scsi/sr.c | while(bh && count < SCpnt->host->sg_tablesize) { |
SCpnt | 443 | drivers/scsi/sr.c | if (count < SCpnt->host->sg_tablesize) { |
SCpnt | 452 | drivers/scsi/sr.c | SCpnt->use_sg = count; /* Number of chains */ |
SCpnt | 454 | drivers/scsi/sr.c | while( count < (SCpnt->use_sg * sizeof(struct scatterlist))) |
SCpnt | 456 | drivers/scsi/sr.c | SCpnt->sglist_len = count; |
SCpnt | 460 | drivers/scsi/sr.c | SCpnt->use_sg = 0; /* No memory left - bail out */ |
SCpnt | 464 | drivers/scsi/sr.c | bh = SCpnt->request.bh; |
SCpnt | 465 | drivers/scsi/sr.c | if(SCpnt->request.sector % 4) { |
SCpnt | 466 | drivers/scsi/sr.c | sgpnt[count].length = (SCpnt->request.sector % 4) << 9; |
SCpnt | 473 | drivers/scsi/sr.c | for(bh = SCpnt->request.bh; count < SCpnt->use_sg; |
SCpnt | 484 | drivers/scsi/sr.c | if (count+1 != SCpnt->use_sg) panic("Bad sr request list"); |
SCpnt | 488 | drivers/scsi/sr.c | ISA_DMA_THRESHOLD & (SCpnt->host->unchecked_isa_dma)) { |
SCpnt | 509 | drivers/scsi/sr.c | SCpnt->use_sg = 0; |
SCpnt | 510 | drivers/scsi/sr.c | scsi_free(buffer, SCpnt->sglist_len); |
SCpnt | 516 | drivers/scsi/sr.c | printk("SG: %d %d %d %d %d *** ",SCpnt->use_sg, SCpnt->request.sector, |
SCpnt | 518 | drivers/scsi/sr.c | SCpnt->request.current_nr_sectors, |
SCpnt | 519 | drivers/scsi/sr.c | SCpnt->request.nr_sectors); |
SCpnt | 520 | drivers/scsi/sr.c | for(count=0; count<SCpnt->use_sg; count++) |
SCpnt | 529 | drivers/scsi/sr.c | if (SCpnt->use_sg == 0){ |
SCpnt | 531 | drivers/scsi/sr.c | if (!SCpnt->request.bh) |
SCpnt | 532 | drivers/scsi/sr.c | this_count = SCpnt->request.nr_sectors; |
SCpnt | 534 | drivers/scsi/sr.c | this_count = (SCpnt->request.bh->b_size >> 9); |
SCpnt | 550 | drivers/scsi/sr.c | buffer = (unsigned char *) SCpnt->request.buffer; |
SCpnt | 552 | drivers/scsi/sr.c | (SCpnt->host->unchecked_isa_dma)) |
SCpnt | 602 | drivers/scsi/sr.c | printk("Use sg: %d\n", SCpnt->use_sg); |
SCpnt | 609 | drivers/scsi/sr.c | SCpnt->this_count = this_count; |
SCpnt | 610 | drivers/scsi/sr.c | scsi_do_cmd (SCpnt, (void *) cmd, buffer, |
SCpnt | 626 | drivers/scsi/sr.c | static void sr_init_done (Scsi_Cmnd * SCpnt) |
SCpnt | 631 | drivers/scsi/sr.c | req = &SCpnt->request; |
SCpnt | 646 | drivers/scsi/sr.c | Scsi_Cmnd * SCpnt; |
SCpnt | 648 | drivers/scsi/sr.c | SCpnt = allocate_device(NULL, scsi_CDs[i].device->index, 1); |
SCpnt | 655 | drivers/scsi/sr.c | SCpnt->request.dev = 0xffff; /* Mark as really busy */ |
SCpnt | 657 | drivers/scsi/sr.c | scsi_do_cmd (SCpnt, |
SCpnt | 663 | drivers/scsi/sr.c | while(SCpnt->request.dev != 0xfffe); |
SCpnt | 665 | drivers/scsi/sr.c | if (SCpnt->request.dev != 0xfffe){ |
SCpnt | 666 | drivers/scsi/sr.c | SCpnt->request.waiting = current; |
SCpnt | 668 | drivers/scsi/sr.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 671 | drivers/scsi/sr.c | the_result = SCpnt->result; |
SCpnt | 676 | drivers/scsi/sr.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 678 | drivers/scsi/sr.c | wake_up(&scsi_devices[SCpnt->index].device_wait); |
SCpnt | 21 | drivers/scsi/sr_ioctl.c | static void sr_ioctl_done(Scsi_Cmnd * SCpnt) |
SCpnt | 26 | drivers/scsi/sr_ioctl.c | req = &SCpnt->request; |
SCpnt | 43 | drivers/scsi/sr_ioctl.c | Scsi_Cmnd * SCpnt; |
SCpnt | 46 | drivers/scsi/sr_ioctl.c | SCpnt = allocate_device(NULL, scsi_CDs[target].device->index, 1); |
SCpnt | 47 | drivers/scsi/sr_ioctl.c | scsi_do_cmd(SCpnt, |
SCpnt | 52 | drivers/scsi/sr_ioctl.c | if (SCpnt->request.dev != 0xfffe){ |
SCpnt | 53 | drivers/scsi/sr_ioctl.c | SCpnt->request.waiting = current; |
SCpnt | 55 | drivers/scsi/sr_ioctl.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
SCpnt | 58 | drivers/scsi/sr_ioctl.c | result = SCpnt->result; |
SCpnt | 62 | drivers/scsi/sr_ioctl.c | switch(SCpnt->sense_buffer[2] & 0xf) { |
SCpnt | 80 | drivers/scsi/sr_ioctl.c | sense_class(SCpnt->sense_buffer[0]), |
SCpnt | 81 | drivers/scsi/sr_ioctl.c | sense_error(SCpnt->sense_buffer[0]), |
SCpnt | 82 | drivers/scsi/sr_ioctl.c | SCpnt->sense_buffer[2] & 0xf); |
SCpnt | 86 | drivers/scsi/sr_ioctl.c | result = SCpnt->result; |
SCpnt | 87 | drivers/scsi/sr_ioctl.c | SCpnt->request.dev = -1; /* Deallocate */ |
SCpnt | 88 | drivers/scsi/sr_ioctl.c | wake_up(&scsi_devices[SCpnt->index].device_wait); |
SCpnt | 103 | drivers/scsi/st.c | static void st_sleep_done (Scsi_Cmnd * SCpnt) |
SCpnt | 107 | drivers/scsi/st.c | if ((st_nbr = SCpnt->request.dev) < NR_ST && st_nbr >= 0) { |
SCpnt | 109 | drivers/scsi/st.c | (SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 110 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x40)) |
SCpnt | 113 | drivers/scsi/st.c | scsi_tapes[st_nbr].buffer->last_result = SCpnt->result; |
SCpnt | 115 | drivers/scsi/st.c | SCpnt->request.dev = -1; |
SCpnt | 117 | drivers/scsi/st.c | SCpnt->request.dev = 0xffff; |
SCpnt | 128 | drivers/scsi/st.c | static int st_chk_result(Scsi_Cmnd * SCpnt) |
SCpnt | 131 | drivers/scsi/st.c | int dev = SCpnt->request.dev; |
SCpnt | 133 | drivers/scsi/st.c | int result = SCpnt->result; |
SCpnt | 134 | drivers/scsi/st.c | unsigned char * sense = SCpnt->sense_buffer; |
SCpnt | 140 | drivers/scsi/st.c | print_sense("st", SCpnt); |
SCpnt | 180 | drivers/scsi/st.c | Scsi_Cmnd *SCpnt; |
SCpnt | 197 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
SCpnt | 207 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 215 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 216 | drivers/scsi/st.c | scsi_do_cmd (SCpnt, |
SCpnt | 220 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
SCpnt | 222 | drivers/scsi/st.c | if (SCpnt->result != 0) { |
SCpnt | 225 | drivers/scsi/st.c | st_chk_result(SCpnt); |
SCpnt | 233 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 281 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt; |
SCpnt | 312 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
SCpnt | 313 | drivers/scsi/st.c | if (!SCpnt) { |
SCpnt | 318 | drivers/scsi/st.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 321 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 322 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 327 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
SCpnt | 329 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 330 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == UNIT_ATTENTION) { /* New media? */ |
SCpnt | 332 | drivers/scsi/st.c | print_sense("st", SCpnt); |
SCpnt | 334 | drivers/scsi/st.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 337 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 338 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 343 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
SCpnt | 346 | drivers/scsi/st.c | if (SCpnt->result != 0) { |
SCpnt | 348 | drivers/scsi/st.c | print_sense("st", SCpnt); |
SCpnt | 350 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 351 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x0f) == NO_TAPE) |
SCpnt | 354 | drivers/scsi/st.c | printk("st%d: Error %x.\n", dev, SCpnt->result); |
SCpnt | 357 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 361 | drivers/scsi/st.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 364 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 365 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 369 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
SCpnt | 371 | drivers/scsi/st.c | if (!SCpnt->result && !SCpnt->sense_buffer[0]) { |
SCpnt | 388 | drivers/scsi/st.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 392 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 393 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 397 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
SCpnt | 399 | drivers/scsi/st.c | i = st_chk_result(SCpnt); |
SCpnt | 407 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 477 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt; |
SCpnt | 492 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
SCpnt | 494 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 498 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 499 | drivers/scsi/st.c | scsi_do_cmd( SCpnt, |
SCpnt | 503 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
SCpnt | 505 | drivers/scsi/st.c | if (SCpnt->result) { |
SCpnt | 508 | drivers/scsi/st.c | st_chk_result(SCpnt); |
SCpnt | 511 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 543 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt; |
SCpnt | 583 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
SCpnt | 620 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 621 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 622 | drivers/scsi/st.c | scsi_do_cmd (SCpnt, |
SCpnt | 627 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
SCpnt | 629 | drivers/scsi/st.c | if (SCpnt->result || SCpnt->sense_buffer[0] != 0) { |
SCpnt | 632 | drivers/scsi/st.c | st_chk_result(SCpnt); |
SCpnt | 634 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 && |
SCpnt | 635 | drivers/scsi/st.c | (SCpnt->sense_buffer[2] & 0x40)) |
SCpnt | 639 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 660 | drivers/scsi/st.c | do_count = st_chk_result(SCpnt); |
SCpnt | 662 | drivers/scsi/st.c | SCpnt->request.dev = -1; |
SCpnt | 684 | drivers/scsi/st.c | SCpnt->result = scsi_tapes[dev].buffer->last_result = -1; |
SCpnt | 685 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 686 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 687 | drivers/scsi/st.c | scsi_do_cmd (SCpnt, |
SCpnt | 694 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 707 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt; |
SCpnt | 738 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
SCpnt | 758 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 759 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 760 | drivers/scsi/st.c | scsi_do_cmd (SCpnt, |
SCpnt | 765 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
SCpnt | 770 | drivers/scsi/st.c | if (SCpnt->result != 0 || SCpnt->sense_buffer[0] != 0) { |
SCpnt | 773 | drivers/scsi/st.c | SCpnt->sense_buffer[0], SCpnt->sense_buffer[1], |
SCpnt | 774 | drivers/scsi/st.c | SCpnt->sense_buffer[2], SCpnt->sense_buffer[3], |
SCpnt | 775 | drivers/scsi/st.c | SCpnt->sense_buffer[4], SCpnt->sense_buffer[5], |
SCpnt | 776 | drivers/scsi/st.c | SCpnt->sense_buffer[6], SCpnt->sense_buffer[7]); |
SCpnt | 778 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[0] & 0x70) == 0x70) { /* extended sense */ |
SCpnt | 780 | drivers/scsi/st.c | if ((SCpnt->sense_buffer[2] & 0xe0) != 0) { /* EOF, EOM, or ILI */ |
SCpnt | 781 | drivers/scsi/st.c | transfer = (SCpnt->sense_buffer[3] << 24) | |
SCpnt | 782 | drivers/scsi/st.c | (SCpnt->sense_buffer[4] << 16) | |
SCpnt | 783 | drivers/scsi/st.c | (SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6]; |
SCpnt | 785 | drivers/scsi/st.c | if (SCpnt->sense_buffer[2] & 0x20) { |
SCpnt | 793 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 797 | drivers/scsi/st.c | else if (SCpnt->sense_buffer[2] & 0x40) { |
SCpnt | 807 | drivers/scsi/st.c | else if (SCpnt->sense_buffer[2] & 0x80) { |
SCpnt | 825 | drivers/scsi/st.c | SCpnt->sense_buffer[2] & 0x0f); |
SCpnt | 826 | drivers/scsi/st.c | print_sense("st", SCpnt); |
SCpnt | 828 | drivers/scsi/st.c | SCpnt->request.dev = -1; |
SCpnt | 836 | drivers/scsi/st.c | transfer = st_chk_result(SCpnt); |
SCpnt | 837 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 865 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 878 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 893 | drivers/scsi/st.c | Scsi_Cmnd * SCpnt; |
SCpnt | 1094 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
SCpnt | 1095 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 1096 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 1097 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 1101 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
SCpnt | 1103 | drivers/scsi/st.c | ioctl_result = st_chk_result(SCpnt); |
SCpnt | 1105 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 1155 | drivers/scsi/st.c | Scsi_Cmnd *SCpnt; |
SCpnt | 1212 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
SCpnt | 1214 | drivers/scsi/st.c | SCpnt->sense_buffer[0]=0; |
SCpnt | 1224 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
SCpnt | 1225 | drivers/scsi/st.c | SCpnt->sense_buffer[0] = 0; |
SCpnt | 1226 | drivers/scsi/st.c | scsi_do_cmd(SCpnt, |
SCpnt | 1230 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
SCpnt | 1232 | drivers/scsi/st.c | if (SCpnt->result || SCpnt->sense_buffer[0]) { |
SCpnt | 1253 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
SCpnt | 40 | drivers/scsi/st.h | Scsi_Cmnd SCpnt; |
SCpnt | 279 | drivers/scsi/ultrastor.c | static inline void build_sg_list(struct mscp *, Scsi_Cmnd *SCpnt); |
SCpnt | 640 | drivers/scsi/ultrastor.c | static inline void build_sg_list(register struct mscp *mscp, Scsi_Cmnd *SCpnt) |
SCpnt | 646 | drivers/scsi/ultrastor.c | sl = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 647 | drivers/scsi/ultrastor.c | max = SCpnt->use_sg; |
SCpnt | 661 | drivers/scsi/ultrastor.c | int ultrastor_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 699 | drivers/scsi/ultrastor.c | my_mscp->ca = scsi_devices[SCpnt->index].type != TYPE_TAPE; |
SCpnt | 700 | drivers/scsi/ultrastor.c | my_mscp->target_id = SCpnt->target; |
SCpnt | 702 | drivers/scsi/ultrastor.c | my_mscp->lun = SCpnt->lun; |
SCpnt | 703 | drivers/scsi/ultrastor.c | if (SCpnt->use_sg) { |
SCpnt | 706 | drivers/scsi/ultrastor.c | build_sg_list(my_mscp, SCpnt); |
SCpnt | 710 | drivers/scsi/ultrastor.c | my_mscp->transfer_data = (unsigned int)SCpnt->request_buffer; |
SCpnt | 711 | drivers/scsi/ultrastor.c | my_mscp->transfer_data_length = SCpnt->request_bufflen; |
SCpnt | 715 | drivers/scsi/ultrastor.c | my_mscp->length_of_sense_byte = sizeof SCpnt->sense_buffer; |
SCpnt | 716 | drivers/scsi/ultrastor.c | my_mscp->length_of_scsi_cdbs = COMMAND_SIZE(*(unsigned char *)SCpnt->cmnd); |
SCpnt | 717 | drivers/scsi/ultrastor.c | memcpy(my_mscp->scsi_cdbs, SCpnt->cmnd, my_mscp->length_of_scsi_cdbs); |
SCpnt | 720 | drivers/scsi/ultrastor.c | my_mscp->sense_data = (unsigned int)&SCpnt->sense_buffer; |
SCpnt | 722 | drivers/scsi/ultrastor.c | my_mscp->SCint = SCpnt; |
SCpnt | 723 | drivers/scsi/ultrastor.c | SCpnt->host_scribble = (unsigned char *)my_mscp; |
SCpnt | 769 | drivers/scsi/ultrastor.c | SCpnt->result = status; |
SCpnt | 770 | drivers/scsi/ultrastor.c | done(SCpnt); |
SCpnt | 813 | drivers/scsi/ultrastor.c | int ultrastor_abort(Scsi_Cmnd *SCpnt, int code) |
SCpnt | 826 | drivers/scsi/ultrastor.c | mscp_index = ((struct mscp *)SCpnt->host_scribble) - config.mscp; |
SCpnt | 909 | drivers/scsi/ultrastor.c | if (config.mscp[mscp_index].SCint != SCpnt) |
SCpnt | 911 | drivers/scsi/ultrastor.c | config.mscp[mscp_index].SCint, SCpnt); |
SCpnt | 916 | drivers/scsi/ultrastor.c | if (config.mscp[mscp_index].SCint != SCpnt) panic("Bad abort"); |
SCpnt | 920 | drivers/scsi/ultrastor.c | SCpnt->result = DID_ABORT << 16; |
SCpnt | 922 | drivers/scsi/ultrastor.c | done(SCpnt); |
SCpnt | 929 | drivers/scsi/ultrastor.c | int ultrastor_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 938 | drivers/scsi/ultrastor.c | if (SCpnt) SCpnt->flags |= NEEDS_JUMPSTART; |
SCpnt | 285 | drivers/scsi/wd7000.c | static void wd7000_scsi_done(Scsi_Cmnd * SCpnt) |
SCpnt | 287 | drivers/scsi/wd7000.c | DEB(printk("wd7000_scsi_done: %06x\n",SCpnt);) |
SCpnt | 288 | drivers/scsi/wd7000.c | SCpnt->SCp.phase = 0; |
SCpnt | 298 | drivers/scsi/wd7000.c | Scsi_Cmnd *SCpnt; |
SCpnt | 328 | drivers/scsi/wd7000.c | SCpnt = scb->SCpnt; |
SCpnt | 329 | drivers/scsi/wd7000.c | if (--(SCpnt->SCp.phase) <= 0) { /* all scbs for SCpnt are done */ |
SCpnt | 333 | drivers/scsi/wd7000.c | SCpnt->result = errstatus; |
SCpnt | 335 | drivers/scsi/wd7000.c | if (SCpnt->host_scribble != NULL) |
SCpnt | 336 | drivers/scsi/wd7000.c | scsi_free(SCpnt->host_scribble,WD7000_SCRIBBLE); |
SCpnt | 339 | drivers/scsi/wd7000.c | SCpnt->scsi_done(SCpnt); |
SCpnt | 353 | drivers/scsi/wd7000.c | int wd7000_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) |
SCpnt | 361 | drivers/scsi/wd7000.c | cdb = (unchar *) SCpnt->cmnd; |
SCpnt | 363 | drivers/scsi/wd7000.c | idlun = ((SCpnt->target << 5) & 0xe0) | (SCpnt->lun & 7); |
SCpnt | 364 | drivers/scsi/wd7000.c | SCpnt->scsi_done = done; |
SCpnt | 365 | drivers/scsi/wd7000.c | SCpnt->SCp.phase = 1; |
SCpnt | 370 | drivers/scsi/wd7000.c | scb->SCpnt = SCpnt; /* so we can find stuff later */ |
SCpnt | 371 | drivers/scsi/wd7000.c | SCpnt->host_scribble = NULL; |
SCpnt | 373 | drivers/scsi/wd7000.c | SCpnt->request_bufflen, SCpnt->bufflen);) |
SCpnt | 375 | drivers/scsi/wd7000.c | if (SCpnt->use_sg) { |
SCpnt | 376 | drivers/scsi/wd7000.c | struct scatterlist *sg = (struct scatterlist *) SCpnt->request_buffer; |
SCpnt | 383 | drivers/scsi/wd7000.c | printk("Using scatter/gather with %d elements.\n",SCpnt->use_sg); |
SCpnt | 390 | drivers/scsi/wd7000.c | if (SCpnt->use_sg > WD7000_SG) |
SCpnt | 393 | drivers/scsi/wd7000.c | SCpnt->host_scribble = (unsigned char *) scsi_malloc(WD7000_SCRIBBLE); |
SCpnt | 394 | drivers/scsi/wd7000.c | sgb = (Sgb *) SCpnt->host_scribble; |
SCpnt | 400 | drivers/scsi/wd7000.c | any2scsi(scb->maxlen, SCpnt->use_sg * sizeof (Sgb) ); |
SCpnt | 402 | drivers/scsi/wd7000.c | for (i = 0; i < SCpnt->use_sg; i++) { |
SCpnt | 408 | drivers/scsi/wd7000.c | scsi2int(scb->maxlen), SCpnt->use_sg);) |
SCpnt | 411 | drivers/scsi/wd7000.c | any2scsi(scb->dataptr, SCpnt->request_buffer); |
SCpnt | 412 | drivers/scsi/wd7000.c | any2scsi(scb->maxlen, SCpnt->request_bufflen); |
SCpnt | 419 | drivers/scsi/wd7000.c | int wd7000_command(Scsi_Cmnd *SCpnt) |
SCpnt | 421 | drivers/scsi/wd7000.c | wd7000_queuecommand(SCpnt, wd7000_scsi_done); |
SCpnt | 423 | drivers/scsi/wd7000.c | while (SCpnt->SCp.phase > 0); /* phase counts scbs down to 0 */ |
SCpnt | 425 | drivers/scsi/wd7000.c | return SCpnt->result; |
SCpnt | 581 | drivers/scsi/wd7000.c | int wd7000_abort(Scsi_Cmnd * SCpnt, int i) |
SCpnt | 584 | drivers/scsi/wd7000.c | printk("wd7000_abort: Scsi_Cmnd = 0x%08x, code = %d ", SCpnt, i); |
SCpnt | 585 | drivers/scsi/wd7000.c | printk("id %d lun %d cdb", SCpnt->target, SCpnt->lun); |
SCpnt | 586 | drivers/scsi/wd7000.c | { int j; unchar *cdbj = (unchar *) SCpnt->cmnd; |
SCpnt | 588 | drivers/scsi/wd7000.c | printk(" result %08x\n", SCpnt->result); |
SCpnt | 599 | drivers/scsi/wd7000.c | int wd7000_reset(Scsi_Cmnd * SCpnt) |
SCpnt | 604 | drivers/scsi/wd7000.c | if (SCpnt) SCpnt->flags |= NEEDS_JUMPSTART; |
SCpnt | 141 | drivers/scsi/wd7000.h | Scsi_Cmnd *SCpnt; /* Scsi_Cmnd using this SCB */ |