Lines Matching refs:tmp
831 struct scsi_cmnd *tmp; in NCR5380_queue_command() local
890 for (tmp = (struct scsi_cmnd *)hostdata->issue_queue; in NCR5380_queue_command()
891 NEXT(tmp); tmp = NEXT(tmp)) in NCR5380_queue_command()
893 LIST(cmd, tmp); in NCR5380_queue_command()
894 SET_NEXT(tmp, cmd); in NCR5380_queue_command()
943 struct scsi_cmnd *tmp, *prev; in NCR5380_main() local
984 for (tmp = (struct scsi_cmnd *) hostdata->issue_queue, prev = NULL; in NCR5380_main()
985 tmp && (tmp != prev); prev = tmp, tmp = NEXT(tmp)) in NCR5380_main()
988 if ((tmp == prev) && tmp) in NCR5380_main()
992 for (tmp = (struct scsi_cmnd *) hostdata->issue_queue, in NCR5380_main()
993 prev = NULL; tmp; prev = tmp, tmp = NEXT(tmp)) { in NCR5380_main()
994 u8 lun = tmp->device->lun; in NCR5380_main()
998 tmp, scmd_id(tmp), hostdata->busy[scmd_id(tmp)], in NCR5380_main()
1004 !is_lun_busy( tmp, tmp->cmnd[0] != REQUEST_SENSE) in NCR5380_main()
1006 !(hostdata->busy[tmp->device->id] & (1 << lun)) in NCR5380_main()
1012 REMOVE(prev, NEXT(prev), tmp, NEXT(tmp)); in NCR5380_main()
1013 SET_NEXT(prev, NEXT(tmp)); in NCR5380_main()
1015 REMOVE(-1, hostdata->issue_queue, tmp, NEXT(tmp)); in NCR5380_main()
1016 hostdata->issue_queue = NEXT(tmp); in NCR5380_main()
1018 SET_NEXT(tmp, NULL); in NCR5380_main()
1032 HOSTNO, tmp->device->id, lun); in NCR5380_main()
1044 cmd_get_tag(tmp, tmp->cmnd[0] != REQUEST_SENSE); in NCR5380_main()
1046 if (!NCR5380_select(instance, tmp)) { in NCR5380_main()
1055 LIST(tmp, hostdata->issue_queue); in NCR5380_main()
1056 SET_NEXT(tmp, hostdata->issue_queue); in NCR5380_main()
1057 hostdata->issue_queue = tmp; in NCR5380_main()
1059 cmd_free_tag(tmp); in NCR5380_main()
1310 unsigned char tmp[3], phase; in NCR5380_select() local
1576 tmp[0] = IDENTIFY(1, cmd->device->lun); in NCR5380_select()
1580 tmp[1] = hostdata->last_message = SIMPLE_QUEUE_TAG; in NCR5380_select()
1581 tmp[2] = cmd->tag; in NCR5380_select()
1591 data = tmp; in NCR5380_select()
1638 register unsigned char p = *phase, tmp; in NCR5380_transfer_pio() local
1655 while (!((tmp = NCR5380_read(STATUS_REG)) & SR_REQ)) in NCR5380_transfer_pio()
1661 if ((tmp & PHASE_MASK) != p) { in NCR5380_transfer_pio()
1728 tmp = NCR5380_read(STATUS_REG); in NCR5380_transfer_pio()
1733 if ((tmp & SR_REQ) || (p == PHASE_MSGIN && c == 0)) in NCR5380_transfer_pio()
1734 *phase = tmp & PHASE_MASK; in NCR5380_transfer_pio()
1755 unsigned char tmp, *msgptr, phase; in do_abort() local
1771 while (!((tmp = NCR5380_read(STATUS_REG)) & SR_REQ)) in do_abort()
1774 NCR5380_write(TARGET_COMMAND_REG, PHASE_SR_TO_TCR(tmp)); in do_abort()
1776 if ((tmp & PHASE_MASK) != PHASE_MSGOUT) { in do_abort()
1784 tmp = ABORT; in do_abort()
1785 msgptr = &tmp; in do_abort()
1873 unsigned char tmp; in NCR5380_transfer_dma() local
1875 if ((tmp = (NCR5380_read(STATUS_REG) & PHASE_MASK)) != p) { in NCR5380_transfer_dma()
1876 *phase = tmp; in NCR5380_transfer_dma()
1955 unsigned char phase, tmp, extended_msg[10], old_phase = 0xff; in NCR5380_information_transfer() local
1963 tmp = NCR5380_read(STATUS_REG); in NCR5380_information_transfer()
1965 if (tmp & SR_REQ) { in NCR5380_information_transfer()
1966 phase = (tmp & PHASE_MASK); in NCR5380_information_transfer()
2000 NCR5380_write(TARGET_COMMAND_REG, PHASE_SR_TO_TCR(tmp)); in NCR5380_information_transfer()
2107 data = &tmp; in NCR5380_information_transfer()
2110 cmd->SCp.Message = tmp; in NCR5380_information_transfer()
2112 switch (tmp) { in NCR5380_information_transfer()
2373 tmp = 0; in NCR5380_information_transfer()
2378 tmp = 0; in NCR5380_information_transfer()
2383 tmp = 0; in NCR5380_information_transfer()
2392 if (!tmp) { in NCR5380_information_transfer()
2397 } else if (tmp != EXTENDED_MESSAGE) in NCR5380_information_transfer()
2400 tmp); in NCR5380_information_transfer()
2445 data = &tmp; in NCR5380_information_transfer()
2447 cmd->SCp.Status = tmp; in NCR5380_information_transfer()
2483 struct scsi_cmnd *tmp = NULL, *prev; in NCR5380_reselect() local
2564 for (tmp = (struct scsi_cmnd *) hostdata->disconnected_queue, prev = NULL; in NCR5380_reselect()
2565 tmp; prev = tmp, tmp = NEXT(tmp)) { in NCR5380_reselect()
2566 if ((target_mask == (1 << tmp->device->id)) && (lun == tmp->device->lun) in NCR5380_reselect()
2568 && (tag == tmp->tag) in NCR5380_reselect()
2572 REMOVE(prev, NEXT(prev), tmp, NEXT(tmp)); in NCR5380_reselect()
2573 SET_NEXT(prev, NEXT(tmp)); in NCR5380_reselect()
2575 REMOVE(-1, hostdata->disconnected_queue, tmp, NEXT(tmp)); in NCR5380_reselect()
2576 hostdata->disconnected_queue = NEXT(tmp); in NCR5380_reselect()
2578 SET_NEXT(tmp, NULL); in NCR5380_reselect()
2583 if (!tmp) { in NCR5380_reselect()
2608 if (!tmp->SCp.this_residual && tmp->SCp.buffers_residual) { in NCR5380_reselect()
2609 count = tmp->SCp.buffer->length; in NCR5380_reselect()
2610 d = sg_virt(tmp->SCp.buffer); in NCR5380_reselect()
2612 count = tmp->SCp.this_residual; in NCR5380_reselect()
2613 d = tmp->SCp.ptr; in NCR5380_reselect()
2616 if ((count >= DMA_MIN_SIZE) && (sun3_dma_setup_done != tmp)) { in NCR5380_reselect()
2617 sun3scsi_dma_setup(d, count, rq_data_dir(tmp->request)); in NCR5380_reselect()
2618 sun3_dma_setup_done = tmp; in NCR5380_reselect()
2647 hostdata->connected = tmp; in NCR5380_reselect()
2649 HOSTNO, tmp->device->id, tmp->device->lun, tmp->tag); in NCR5380_reselect()
2675 struct scsi_cmnd *tmp, **prev; in NCR5380_abort() local
2741 tmp = (struct scsi_cmnd *)hostdata->issue_queue; in NCR5380_abort()
2742 tmp; prev = NEXTADDR(tmp), tmp = NEXT(tmp)) { in NCR5380_abort()
2743 if (cmd == tmp) { in NCR5380_abort()
2744 REMOVE(5, *prev, tmp, NEXT(tmp)); in NCR5380_abort()
2745 (*prev) = NEXT(tmp); in NCR5380_abort()
2746 SET_NEXT(tmp, NULL); in NCR5380_abort()
2747 tmp->result = DID_ABORT << 16; in NCR5380_abort()
2754 tmp->scsi_done(tmp); in NCR5380_abort()
2801 for (tmp = (struct scsi_cmnd *) hostdata->disconnected_queue; tmp; in NCR5380_abort()
2802 tmp = NEXT(tmp)) { in NCR5380_abort()
2803 if (cmd == tmp) { in NCR5380_abort()
2816 tmp = (struct scsi_cmnd *)hostdata->disconnected_queue; in NCR5380_abort()
2817 tmp; prev = NEXTADDR(tmp), tmp = NEXT(tmp)) { in NCR5380_abort()
2818 if (cmd == tmp) { in NCR5380_abort()
2819 REMOVE(5, *prev, tmp, NEXT(tmp)); in NCR5380_abort()
2820 *prev = NEXT(tmp); in NCR5380_abort()
2821 SET_NEXT(tmp, NULL); in NCR5380_abort()
2822 tmp->result = DID_ABORT << 16; in NCR5380_abort()
2828 cmd_free_tag(tmp); in NCR5380_abort()
2834 tmp->scsi_done(tmp); in NCR5380_abort()