Lines Matching refs:phase
97 * device is busy internally and the first SCSI-phase will be delayed.
300 reqp->phase = NR_PHASE;
369 tmp->phase = NR_PHASE;
634 transfer_dma(reqp, reqp->phase, 0);
661 transfer_dma(connected, connected->phase, 0);
692 u_char phase;
719 * Set phase bits to 0, otherwise the 5380 won't drive the bus during
803 * phase immediately after the selection.
865 reqp->phase = PH_CMD;
876 phase = PH_MSGOUT;
881 * phase should follow. Unfortunately, this does not happen on
884 * new phase is PH_CMD and has never been successfully selected
888 if (transfer_pio(&phase, tmp, &cnt, 0) || cnt) {
890 if ((phase == PH_CMD) && !(sc->sc_selected & targ_bit)) {
894 reqp->phase = PH_CMD;
919 reqp->phase = PH_MSGOUT;
946 u_char tmp, phase;
958 * Also REQ needs to be asserted here to indicate that the bus-phase
975 "Timeout waiting for phase-change");
980 phase = (tmp >> 2) & 7;
981 if (phase != reqp->phase) {
982 reqp->phase = phase;
983 DBG_INFPRINT(show_phase, reqp, phase);
987 * Same data-phase. If same error give up
990 && ((phase == PH_DATAOUT) || (phase == PH_DATAIN))) {
999 switch (phase) {
1020 * message-out phase by feeding/taking 100 byte.
1031 transfer_dma(reqp, phase, poll);
1041 if (transfer_pdma(&phase, reqp->xdata_ptr, &len) == 0)
1044 transfer_pio(&phase, reqp->xdata_ptr, &len, 0);
1055 transfer_pio(&phase, &tmp, &len, 1);
1060 transfer_pio(&phase, &reqp->msgout, &len, 0);
1074 transfer_pio(&phase, (u_char *)&reqp->xcmd, &len, 0);
1079 transfer_pio(&phase, &tmp, &len, 0);
1084 ncr_tprint(reqp, "Unknown phase\n");
1094 * -1 : Get on to the next phase.
1232 u_char phase;
1279 phase = PH_MSGIN;
1281 transfer_pio(&phase, &msg, &len, 0);
1309 phase = PH_MSGOUT;
1312 phase, &msg, &len, 0) || len)
1326 * Transfer data in a given phase using programmed I/O.
1327 * Returns -1 when a different phase is entered without transferring the
1329 * phase.
1332 transfer_pio(u_char *phase, u_char *data, u_long *len, int dont_drop_ack)
1335 u_char ph = *phase;
1338 DBG_PIOPRINT ("SCSI: transfer_pio start: phase: %d, len: %d\n", ph,cnt);
1347 DBG_PIOPRINT ("SCSI: transfer_pio: phase mismatch\n", 0, 0);
1361 * The SCSI-standard suggests that in the 'MESSAGE OUT' phase,
1363 * message phase after REQ has been asserted for the handshake
1386 *phase = (tmp >> 2) & 7;
1387 else *phase = NR_PHASE;
1389 DBG_PIOPRINT ("SCSI: transfer_pio done: phase: %d, len: %d\n",
1390 *phase, cnt);
1392 if (!cnt || (*phase == ph))
1403 transfer_dma(SC_REQ *reqp, u_int phase, int poll)
1413 * We should be in phase, otherwise we are not allowed to
1416 SET_5380_REG(NCR5380_TCOM, phase);
1439 scsi_dma_setup(reqp, phase, mbase);
1494 if ((reqp->dr_flag & DRIVER_BOUNCING) && (PH_IN(reqp->phase))) {
1511 if (PH_IN(reqp->phase) && (dmstat & SC_PAR_ERR)) {
1513 ncr_tprint(reqp, "parity error in data-phase\n");
1629 u_char phase;
1632 ncr_aprint(sc, "Trying to reach Message-out phase\n");
1633 if ((phase = GET_5380_REG(NCR5380_IDSTAT)) & SC_S_REQ)
1634 phase = (phase >> 2) & 7;
1636 ncr_aprint(sc, "Trying to reach Message-out phase, now: %d\n", phase);
1637 if (phase == PH_MSGOUT)
1640 SET_5380_REG(NCR5380_TCOM, phase);
1645 if (((GET_5380_REG(NCR5380_IDSTAT) >> 2) & 7) != phase)
1647 if (PH_IN(phase)) {
1660 if ((phase = GET_5380_REG(NCR5380_IDSTAT)) & SC_S_REQ) {
1661 phase = (phase >> 2) & 7;
1662 if (phase == PH_MSGOUT) {
1663 ncr_aprint(sc, "Message-out phase reached after "
1985 printf("phase = %d, ", connected->phase);