Lines Matching defs:phase
97 * device is busy internally and the first SCSI-phase will be delayed.
308 reqp->phase = NR_PHASE;
376 tmp->phase = NR_PHASE;
649 transfer_dma(reqp, reqp->phase, 0);
680 connected->phase, 0);
711 uint8_t phase;
739 * Set phase bits to 0, otherwise the 5380 won't drive the bus during
823 * phase immediately after the selection.
885 reqp->phase = PH_CMD;
896 phase = PH_MSGOUT;
901 * phase should follow. Unfortunately, this does not happen on
904 * new phase is PH_CMD and has never been successfully selected
908 if (transfer_pio(&phase, tmp, &cnt, 0) || cnt) {
910 if ((phase == PH_CMD) && (sc->sc_selected & targ_bit) == 0) {
914 reqp->phase = PH_CMD;
940 reqp->phase = PH_MSGOUT;
967 uint8_t tmp, phase;
979 * Also REQ needs to be asserted here to indicate that the bus-phase
996 "Timeout waiting for phase-change");
1001 phase = (tmp >> 2) & 7;
1002 if (phase != reqp->phase) {
1003 reqp->phase = phase;
1006 DBG_INFPRINT(show_phase, reqp, phase);
1010 * Same data-phase. If same error give up
1013 ((phase == PH_DATAOUT) || (phase == PH_DATAIN))) {
1023 switch (phase) {
1045 * message-out phase by feeding/taking 100 byte.
1056 transfer_dma(reqp, phase, poll);
1065 if (transfer_pdma(&phase, reqp->xdata_ptr, &len) == 0)
1068 transfer_pio(&phase, reqp->xdata_ptr, &len, 0);
1079 transfer_pio(&phase, &tmp, &len, 1);
1084 transfer_pio(&phase, &reqp->msgout, &len, 0);
1098 transfer_pio(&phase, (uint8_t *)&reqp->xcmd, &len, 0);
1103 transfer_pio(&phase, &tmp, &len, 0);
1108 ncr_tprint(reqp, "Unknown phase\n");
1118 * -1 : Get on to the next phase.
1255 uint8_t phase;
1303 phase = PH_MSGIN;
1305 transfer_pio(&phase, &msg, &len, 0);
1335 phase = PH_MSGOUT;
1338 if (transfer_pio(&phase, &msg, &len, 0) || len)
1351 * Transfer data in a given phase using programmed I/O.
1352 * Returns -1 when a different phase is entered without transferring the
1354 * phase.
1357 transfer_pio(u_char *phase, u_char *data, u_long *len, int dont_drop_ack)
1360 uint8_t ph = *phase;
1363 DBG_PIOPRINT("SCSI: transfer_pio start: phase: %d, len: %d\n", ph,cnt);
1373 DBG_PIOPRINT("SCSI: transfer_pio: phase mismatch\n",
1389 * 'MESSAGE OUT' phase, the initiator should
1390 * drop ATN on the last byte of the * message phase
1415 *phase = (tmp >> 2) & 7;
1417 *phase = NR_PHASE;
1419 DBG_PIOPRINT("SCSI: transfer_pio done: phase: %d, len: %d\n",
1420 *phase, cnt);
1422 if (cnt == 0 || (*phase == ph))
1434 transfer_dma(SC_REQ *reqp, u_int phase, int poll)
1444 * We should be in phase, otherwise we are not allowed to
1447 SET_5380_REG(NCR5380_TCOM, phase);
1470 scsi_dma_setup(reqp, phase, mbase);
1526 if ((reqp->dr_flag & DRIVER_BOUNCING) && (PH_IN(reqp->phase))) {
1544 if (PH_IN(reqp->phase) && (dmstat & SC_PAR_ERR)) {
1546 ncr_tprint(reqp, "parity error in data-phase\n");
1664 uint8_t phase;
1667 ncr_aprint(sc, "Trying to reach Message-out phase\n");
1668 if ((phase = GET_5380_REG(NCR5380_IDSTAT)) & SC_S_REQ)
1669 phase = (phase >> 2) & 7;
1672 ncr_aprint(sc, "Trying to reach Message-out phase, now: %d\n", phase);
1673 if (phase == PH_MSGOUT)
1676 SET_5380_REG(NCR5380_TCOM, phase);
1681 if (((GET_5380_REG(NCR5380_IDSTAT) >> 2) & 7) != phase)
1683 if (PH_IN(phase)) {
1696 if ((phase = GET_5380_REG(NCR5380_IDSTAT)) & SC_S_REQ) {
1697 phase = (phase >> 2) & 7;
1698 if (phase == PH_MSGOUT) {
1699 ncr_aprint(sc, "Message-out phase reached after "
1703 ncr_aprint(sc, "Phase now: %d after %ld bytes.\n",
1704 phase, len - n);
1973 show_phase(SC_REQ *reqp, int phase)
1976 printf("INFTRANS: %d Phase = %s\n", reqp->targ_id, phase_names[phase]);
2060 printf("phase = %d, ", connected->phase);