Lines Matching defs:phase
229 SCpnt->SCp.phase = PH_UNDETERMINED;
237 SCp.phase : current state of the command */
361 * Start selection phase
370 unsigned char phase, arbit;
374 phase = nsp_index_read(base, SCSIBUSMON);
375 if(phase != BUSMON_BUS_FREE) {
382 SCpnt->SCp.phase = PH_ARBSTART;
402 SCpnt->SCp.phase = PH_SELSTART;
513 * wait for bus phase change
549 unsigned char phase, i_src;
555 phase = nsp_index_read(base, SCSIBUSMON);
556 if (phase == 0xff) {
565 if ((phase & mask) != 0 && (phase & BUSMON_PHASE_MASK) == current_phase) {
566 //nsp_dbg(NSP_DEBUG_INTR, "ret 1 phase=0x%x", phase);
578 static int nsp_xfer(struct scsi_cmnd *SCpnt, int phase)
590 ret = nsp_expect_signal(SCpnt, phase, BUSMON_REQ);
597 if (len == 1 && SCpnt->SCp.phase == PH_MSG_OUT) {
602 if (phase & BUSMON_IO) {
637 * data phase skip only occures in case of SCSI_LOW_READ
640 SCpnt->SCp.phase = PH_DATA;
714 * read data in DATA IN phase
744 if (stat == BUSPHASE_DATA_IN) { /* phase changed? */
748 nsp_dbg(NSP_DEBUG_DATA_IO, "phase changed stat=0x%x", stat);
813 * write data in DATA OUT phase
841 nsp_dbg(NSP_DEBUG_DATA_IO, "phase changed stat=0x%x, res=%d\n", stat, res);
957 unsigned char irq_status, irq_phase, phase;
996 * Do not read an irq_phase register if no scsi phase interrupt.
997 * Unless, you should lose a scsi phase interrupt.
999 phase = nsp_index_read(base, SCSIBUSMON);
1046 nsp_msg(KERN_ERR, "CurrentSC==NULL irq_status=0x%x phase=0x%x irq_phase=0x%x this can't be happen. reset everything", irq_status, phase, irq_phase);
1076 switch(tmpSC->SCp.phase) {
1079 if ((phase & BUSMON_BSY) == 0) {
1099 tmpSC->SCp.phase = PH_SELECTED;
1108 //nsp_dbg(NSP_DEBUG_INTR, "phase reselect");
1110 if ((phase & BUSMON_PHASE_MASK) != BUSPHASE_MESSAGE_IN) {
1130 if (((tmpSC->SCp.phase == PH_MSG_IN) || (tmpSC->SCp.phase == PH_MSG_OUT)) &&
1132 nsp_dbg(NSP_DEBUG_INTR, "normal disconnect irq_status=0x%x, phase=0x%x, irq_phase=0x%x", irq_status, phase, irq_phase);
1152 if (phase == 0) {
1153 nsp_msg(KERN_DEBUG, "unexpected bus free. irq_status=0x%x, phase=0x%x, irq_phase=0x%x", irq_status, phase, irq_phase);
1161 switch (phase & BUSMON_PHASE_MASK) {
1164 if ((phase & BUSMON_REQ) == 0) {
1169 tmpSC->SCp.phase = PH_COMMAND;
1185 tmpSC->SCp.phase = PH_DATA;
1195 tmpSC->SCp.phase = PH_DATA;
1206 tmpSC->SCp.phase = PH_STATUS;
1215 if ((phase & BUSMON_REQ) == 0) {
1219 tmpSC->SCp.phase = PH_MSG_OUT;
1248 if ((phase & BUSMON_REQ) == 0) {
1252 tmpSC->SCp.phase = PH_MSG_IN;