Lines Matching refs:tmp
917 struct scsi_cmnd *tmp; in NCR5380_queue_command_lck() local
951 …for (tmp = (struct scsi_cmnd *) hostdata->issue_queue; tmp->host_scribble; tmp = (struct scsi_cmnd… in NCR5380_queue_command_lck()
952 LIST(cmd, tmp); in NCR5380_queue_command_lck()
953 tmp->host_scribble = (unsigned char *) cmd; in NCR5380_queue_command_lck()
982 struct scsi_cmnd *tmp, *prev; in DEF_SCSI_QCMD() local
995 …for (tmp = (struct scsi_cmnd *) hostdata->issue_queue, prev = NULL; tmp; prev = tmp, tmp = (struct… in DEF_SCSI_QCMD()
997 if (prev != tmp) in DEF_SCSI_QCMD()
998 …MAIN tmp=%p target=%d busy=%d lun=%llu\n", tmp, tmp->device->id, hostdata->busy[tmp->device->i… in DEF_SCSI_QCMD()
1000 if (!(hostdata->busy[tmp->device->id] & in DEF_SCSI_QCMD()
1001 (1 << (u8)(tmp->device->lun & 0xff)))) { in DEF_SCSI_QCMD()
1003 REMOVE(prev, prev->host_scribble, tmp, tmp->host_scribble); in DEF_SCSI_QCMD()
1004 prev->host_scribble = tmp->host_scribble; in DEF_SCSI_QCMD()
1006 REMOVE(-1, hostdata->issue_queue, tmp, tmp->host_scribble); in DEF_SCSI_QCMD()
1007 hostdata->issue_queue = (struct scsi_cmnd *) tmp->host_scribble; in DEF_SCSI_QCMD()
1009 tmp->host_scribble = NULL; in DEF_SCSI_QCMD()
1017 …arget %d lun %llu removed from issue_queue\n", instance->host_no, tmp->device->id, tmp->device->lu… in DEF_SCSI_QCMD()
1039 if (!NCR5380_select(instance, tmp)) { in DEF_SCSI_QCMD()
1042 LIST(tmp, hostdata->issue_queue); in DEF_SCSI_QCMD()
1043 tmp->host_scribble = (unsigned char *) hostdata->issue_queue; in DEF_SCSI_QCMD()
1044 hostdata->issue_queue = tmp; in DEF_SCSI_QCMD()
1054 tmp = (struct scsi_cmnd *) hostdata->selecting; in DEF_SCSI_QCMD()
1056 if (!NCR5380_select(instance, tmp)) { in DEF_SCSI_QCMD()
1063 …printk(KERN_DEBUG "scsi%d: device %d did not respond in time\n", instance->host_no, tmp->device->i… in DEF_SCSI_QCMD()
1064 LIST(tmp, hostdata->issue_queue); in DEF_SCSI_QCMD()
1065 tmp->host_scribble = (unsigned char *) hostdata->issue_queue; in DEF_SCSI_QCMD()
1066 hostdata->issue_queue = tmp; in DEF_SCSI_QCMD()
1210 unsigned char tmp[3], phase; in NCR5380_select() local
1440 tmp[0] = IDENTIFY(((instance->irq == NO_IRQ) ? 0 : 1), cmd->device->lun); in NCR5380_select()
1446 data = tmp; in NCR5380_select()
1491 unsigned char p = *phase, tmp; in NCR5380_transfer_pio() local
1532 while (!((tmp = NCR5380_read(STATUS_REG)) & SR_REQ) && !break_allowed); in NCR5380_transfer_pio()
1533 if (!(tmp & SR_REQ)) { in NCR5380_transfer_pio()
1542 if ((tmp & PHASE_MASK) != p) { in NCR5380_transfer_pio()
1604 tmp = NCR5380_read(STATUS_REG); in NCR5380_transfer_pio()
1605 if (tmp & SR_REQ) in NCR5380_transfer_pio()
1606 *phase = tmp & PHASE_MASK; in NCR5380_transfer_pio()
1650 unsigned char *msgptr, phase, tmp; in do_abort() local
1674 tmp = (unsigned char)rc; in do_abort()
1676 NCR5380_write(TARGET_COMMAND_REG, PHASE_SR_TO_TCR(tmp)); in do_abort()
1678 if ((tmp & PHASE_MASK) != PHASE_MSGOUT) { in do_abort()
1685 tmp = ABORT; in do_abort()
1686 msgptr = &tmp; in do_abort()
1726 unsigned char tmp; in NCR5380_transfer_dma() local
1737 if ((tmp = (NCR5380_read(STATUS_REG) & PHASE_MASK)) != p) { in NCR5380_transfer_dma()
1738 *phase = tmp; in NCR5380_transfer_dma()
1796 tmp = NCR5380_read(BUS_AND_STATUS_REG); in NCR5380_transfer_dma()
1797 } while ((tmp & BASR_PHASE_MATCH) && !(tmp & (BASR_BUSY_ERROR | BASR_END_DMA_TRANSFER))); in NCR5380_transfer_dma()
1845 …while (((tmp = NCR5380_read(BUS_AND_STATUS_REG)) & BASR_ACK) || (NCR5380_read(STATUS_REG) & SR_REQ… in NCR5380_transfer_dma()
1846 if (!(tmp & BASR_PHASE_MATCH)) in NCR5380_transfer_dma()
1853 … : polled DMA transfer complete, basr 0x%X, sr 0x%X\n", instance->host_no, tmp, NCR5380_read(STATU… in NCR5380_transfer_dma()
2012 unsigned char phase, tmp, extended_msg[10], old_phase = 0xff; local
2020 tmp = NCR5380_read(STATUS_REG);
2022 if (tmp & SR_REQ) {
2023 phase = (tmp & PHASE_MASK);
2029 NCR5380_write(TARGET_COMMAND_REG, PHASE_SR_TO_TCR(tmp));
2118 data = &tmp;
2120 cmd->SCp.Message = tmp;
2122 switch (tmp) {
2311 tmp = 0;
2315 tmp = 0;
2318 tmp = 0;
2327 if (!tmp) {
2331 } else if (tmp != EXTENDED_MESSAGE)
2333 "rejecting unknown message %02x\n",tmp);
2375 data = &tmp;
2377 cmd->SCp.Status = tmp;
2417 struct scsi_cmnd *tmp = NULL, *prev; local
2483 …for (tmp = (struct scsi_cmnd *) hostdata->disconnected_queue, prev = NULL; tmp; prev = tmp, tmp = …
2484 if ((target_mask == (1 << tmp->device->id)) && (lun == (u8)tmp->device->lun)
2487 REMOVE(prev, prev->host_scribble, tmp, tmp->host_scribble);
2488 prev->host_scribble = tmp->host_scribble;
2490 REMOVE(-1, hostdata->disconnected_queue, tmp, tmp->host_scribble);
2491 hostdata->disconnected_queue = (struct scsi_cmnd *) tmp->host_scribble;
2493 tmp->host_scribble = NULL;
2496 if (!tmp) {
2509 hostdata->connected = tmp;
2510 …target = %d, lun = %llu, tag = %d\n", instance->host_no, tmp->device->id, tmp->device->lun, tmp->t…
2587 struct scsi_cmnd *tmp, **prev; local
2635 …queue), tmp = (struct scsi_cmnd *) hostdata->issue_queue; tmp; prev = (struct scsi_cmnd **) &(tmp-…
2636 if (cmd == tmp) {
2637 REMOVE(5, *prev, tmp, tmp->host_scribble);
2638 (*prev) = (struct scsi_cmnd *) tmp->host_scribble;
2639 tmp->host_scribble = NULL;
2640 tmp->result = DID_ABORT << 16;
2642 tmp->scsi_done(tmp);
2647 else if (prev == tmp)
2691 …for (tmp = (struct scsi_cmnd *) hostdata->disconnected_queue; tmp; tmp = (struct scsi_cmnd *) tmp-…
2692 if (cmd == tmp) {
2701 …e), tmp = (struct scsi_cmnd *) hostdata->disconnected_queue; tmp; prev = (struct scsi_cmnd **) &(t…
2702 if (cmd == tmp) {
2703 REMOVE(5, *prev, tmp, tmp->host_scribble);
2704 *prev = (struct scsi_cmnd *) tmp->host_scribble;
2705 tmp->host_scribble = NULL;
2706 tmp->result = DID_ABORT << 16;
2707 tmp->scsi_done(tmp);