Lines Matching refs:tmp

942 	Scsi_Cmnd *tmp;
995 for (tmp = (Scsi_Cmnd *) hostdata->issue_queue; tmp->host_scribble; tmp = (Scsi_Cmnd *) tmp->host_scribble);
996 LIST(cmd, tmp);
997 tmp->host_scribble = (unsigned char *) cmd;
1026 Scsi_Cmnd *tmp, *prev;
1039 for (tmp = (Scsi_Cmnd *) hostdata->issue_queue, prev = NULL; tmp; prev = tmp, tmp = (Scsi_Cmnd *) tmp->host_scribble)
1041 if (prev != tmp)
1042 dprintk(NDEBUG_LISTS, "MAIN tmp=%p target=%d busy=%d lun=%llu\n", tmp, tmp->device->id, hostdata->busy[tmp->device->id], tmp->device->lun);
1044 if (!(hostdata->busy[tmp->device->id] &
1045 (1 << (u8)(tmp->device->lun & 0xff)))) {
1047 REMOVE(prev, prev->host_scribble, tmp, tmp->host_scribble);
1048 prev->host_scribble = tmp->host_scribble;
1050 REMOVE(-1, hostdata->issue_queue, tmp, tmp->host_scribble);
1051 hostdata->issue_queue = (Scsi_Cmnd *) tmp->host_scribble;
1053 tmp->host_scribble = NULL;
1061 dprintk(NDEBUG_MAIN|NDEBUG_QUEUES, "scsi%d : main() : command for target %d lun %llu removed from issue_queue\n", instance->host_no, tmp->device->id, tmp->device->lun);
1076 if (!NCR5380_select(instance, tmp,
1083 (tmp->cmnd[0] == REQUEST_SENSE) ? TAG_NONE : TAG_NEXT)) {
1086 LIST(tmp, hostdata->issue_queue);
1087 tmp->host_scribble = (unsigned char *) hostdata->issue_queue;
1088 hostdata->issue_queue = tmp;
1098 tmp = (Scsi_Cmnd *) hostdata->selecting;
1100 if (!NCR5380_select(instance, tmp, (tmp->cmnd[0] == REQUEST_SENSE) ? TAG_NONE : TAG_NEXT)) {
1107 printk(KERN_DEBUG "scsi%d: device %d did not respond in time\n", instance->host_no, tmp->device->id);
1108 LIST(tmp, hostdata->issue_queue);
1109 tmp->host_scribble = (unsigned char *) hostdata->issue_queue;
1110 hostdata->issue_queue = tmp;
1285 unsigned char tmp[3], phase;
1516 tmp[0] = IDENTIFY(((instance->irq == SCSI_IRQ_NONE) ? 0 : 1), cmd->device->lun);
1522 data = tmp;
1567 unsigned char p = *phase, tmp;
1608 while (!((tmp = NCR5380_read(STATUS_REG)) & SR_REQ) && !break_allowed);
1609 if (!(tmp & SR_REQ)) {
1618 if ((tmp & PHASE_MASK) != p) {
1680 tmp = NCR5380_read(STATUS_REG);
1681 if (tmp & SR_REQ)
1682 *phase = tmp & PHASE_MASK;
1726 unsigned char *msgptr, phase, tmp;
1750 tmp = (unsigned char)rc;
1752 NCR5380_write(TARGET_COMMAND_REG, PHASE_SR_TO_TCR(tmp));
1754 if ((tmp & PHASE_MASK) != PHASE_MSGOUT) {
1761 tmp = ABORT;
1762 msgptr = &tmp;
1802 unsigned char tmp;
1813 if ((tmp = (NCR5380_read(STATUS_REG) & PHASE_MASK)) != p) {
1814 *phase = tmp;
1872 tmp = NCR5380_read(BUS_AND_STATUS_REG);
1873 } while ((tmp & BASR_PHASE_MATCH) && !(tmp & (BASR_BUSY_ERROR | BASR_END_DMA_TRANSFER)));
1921 while (((tmp = NCR5380_read(BUS_AND_STATUS_REG)) & BASR_ACK) || (NCR5380_read(STATUS_REG) & SR_REQ)) {
1922 if (!(tmp & BASR_PHASE_MATCH))
1929 dprintk(NDEBUG_DMA, "scsi%d : polled DMA transfer complete, basr 0x%X, sr 0x%X\n", instance->host_no, tmp, NCR5380_read(STATUS_REG));
2088 unsigned char phase, tmp, extended_msg[10], old_phase = 0xff;
2096 tmp = NCR5380_read(STATUS_REG);
2098 if (tmp & SR_REQ) {
2099 phase = (tmp & PHASE_MASK);
2105 NCR5380_write(TARGET_COMMAND_REG, PHASE_SR_TO_TCR(tmp));
2194 data = &tmp;
2196 cmd->SCp.Message = tmp;
2198 switch (tmp) {
2392 tmp = 0;
2396 tmp = 0;
2399 tmp = 0;
2408 if (!tmp) {
2412 } else if (tmp != EXTENDED_MESSAGE)
2414 "rejecting unknown message %02x\n",tmp);
2422 } /* switch (tmp) */
2457 data = &tmp;
2459 cmd->SCp.Status = tmp;
2465 } /* if (tmp * SR_REQ) */
2499 Scsi_Cmnd *tmp = NULL, *prev;
2565 for (tmp = (Scsi_Cmnd *) hostdata->disconnected_queue, prev = NULL; tmp; prev = tmp, tmp = (Scsi_Cmnd *) tmp->host_scribble)
2566 if ((target_mask == (1 << tmp->device->id)) && (lun == (u8)tmp->device->lun)
2569 REMOVE(prev, prev->host_scribble, tmp, tmp->host_scribble);
2570 prev->host_scribble = tmp->host_scribble;
2572 REMOVE(-1, hostdata->disconnected_queue, tmp, tmp->host_scribble);
2573 hostdata->disconnected_queue = (Scsi_Cmnd *) tmp->host_scribble;
2575 tmp->host_scribble = NULL;
2578 if (!tmp) {
2591 hostdata->connected = tmp;
2592 dprintk(NDEBUG_RESELECTION, "scsi%d : nexus established, target = %d, lun = %llu, tag = %d\n", instance->host_no, tmp->device->id, tmp->device->lun, tmp->tag);
2668 Scsi_Cmnd *tmp, **prev;
2717 for (prev = (Scsi_Cmnd **) & (hostdata->issue_queue), tmp = (Scsi_Cmnd *) hostdata->issue_queue; tmp; prev = (Scsi_Cmnd **) & (tmp->host_scribble), tmp = (Scsi_Cmnd *) tmp->host_scribble)
2718 if (cmd == tmp) {
2719 REMOVE(5, *prev, tmp, tmp->host_scribble);
2720 (*prev) = (Scsi_Cmnd *) tmp->host_scribble;
2721 tmp->host_scribble = NULL;
2722 tmp->result = DID_ABORT << 16;
2724 tmp->scsi_done(tmp);
2729 else if (prev == tmp)
2773 for (tmp = (Scsi_Cmnd *) hostdata->disconnected_queue; tmp; tmp = (Scsi_Cmnd *) tmp->host_scribble)
2774 if (cmd == tmp) {
2783 for (prev = (Scsi_Cmnd **) & (hostdata->disconnected_queue), tmp = (Scsi_Cmnd *) hostdata->disconnected_queue; tmp; prev = (Scsi_Cmnd **) & (tmp->host_scribble), tmp = (Scsi_Cmnd *) tmp->host_scribble)
2784 if (cmd == tmp) {
2785 REMOVE(5, *prev, tmp, tmp->host_scribble);
2786 *prev = (Scsi_Cmnd *) tmp->host_scribble;
2787 tmp->host_scribble = NULL;
2788 tmp->result = DID_ABORT << 16;
2789 tmp->scsi_done(tmp);