Lines Matching defs:phase

74  * phase goes through the various phases as instructed by the target.
340 * NCR5380_print_phase - show SCSI phase
343 * Print the current SCSI phase for debugging purposes
354 shost_printk(KERN_DEBUG, instance, "REQ not asserted, phase unknown.\n");
359 shost_printk(KERN_DEBUG, instance, "phase %s\n", phases[i].name);
464 * the SCSI bus busy. Check for BUS FREE phase. If not, try to abort the
749 * Called by the interrupt handler when DMA finishes or a phase
763 p = hostdata->connected->SCp.phase;
787 pr_err("scsi%d: bus stuck in data phase -- probably a single byte overrun!\n",
844 * - Bus phase mismatch (non-maskable in DMA Mode, cleared by ending DMA Mode)
967 unsigned char tmp[3], phase;
990 * Set the phase bits to 0, otherwise the NCR5380 won't drive the
1003 /* The chip now waits for BUS FREE phase. Then after the 800 ns
1083 * phase immediately after selection.
1174 * transfer phase should be a MESSAGE OUT phase so that we can send the
1192 dsprintk(NDEBUG_SELECTION, instance, "target %d selected, going into MESSAGE OUT phase.\n",
1198 phase = PHASE_MSGOUT;
1199 NCR5380_transfer_pio(instance, &phase, &len, &data);
1231 * unsigned char *phase, int *count, unsigned char **data)
1233 * Purpose : transfers data in given phase using polled I/O
1235 * Inputs : instance - instance of driver, *phase - pointer to
1236 * what phase is expected, *count - pointer to number of
1239 * Returns : -1 when different phase is entered without transferring
1241 * is in same phase.
1243 * Also, *phase, *count, *data are modified in place.
1255 unsigned char *phase, int *count,
1259 unsigned char p = *phase, tmp;
1265 * phase specified in the appropriate bits of the TARGET COMMAND
1273 * Wait for assertion of REQ, after which the phase bits will be
1282 /* Check for phase mismatch */
1284 dsprintk(NDEBUG_PIO, instance, "phase mismatch\n");
1298 * The SCSI standard suggests that in MSGOUT phase, the initiator
1299 * should drop ATN on the last byte of the message phase
1330 * 1. We were in MSGOUT phase, and we are on the last byte of the
1333 * 2. We are in a MSGIN phase, and we are on the last byte of the
1352 /* The phase read from the bus is valid if either REQ is (already)
1357 *phase = tmp & PHASE_MASK;
1359 *phase = PHASE_UNKNOWN;
1361 if (!c || (*phase == p))
1396 * MESSAGE OUT phase and sending an ABORT message.
1405 unsigned char *msgptr, phase, tmp;
1409 /* Request message out phase */
1413 * Wait for the target to indicate a valid phase by asserting
1414 * REQ. Once this happens, we'll have either a MSGOUT phase
1416 * other phase and will have to source/sink data.
1442 phase = PHASE_MSGOUT;
1443 NCR5380_transfer_pio(instance, &phase, &len, &msgptr);
1459 * unsigned char *phase, int *count, unsigned char **data)
1461 * Purpose : transfers data in given phase using either real
1464 * Inputs : instance - instance of driver, *phase - pointer to
1465 * what phase is expected, *count - pointer to number of
1468 * Returns : -1 when different phase is entered without transferring
1470 * is in same phase.
1472 * Also, *phase, *count, *data are modified in place.
1477 unsigned char *phase, int *count,
1482 unsigned char p = *phase;
1488 *phase = tmp;
1492 hostdata->connected->SCp.phase = p;
1577 * and ACK both go false, or until a phase mismatch occurs. Gather-sends
1595 * properly, or the target switches to MESSAGE IN phase to signal a
1641 shost_printk(KERN_ERR, instance, "PDMA write: DRQ and phase timeout\n");
1676 unsigned char phase, tmp, extended_msg[10], old_phase = 0xff;
1687 /* We only have a valid SCSI phase when REQ is asserted */
1689 phase = (tmp & PHASE_MASK);
1690 if (phase != old_phase) {
1691 old_phase = phase;
1695 if (phase == PHASE_CMDOUT &&
1718 if (sink && (phase != PHASE_MSGOUT)) {
1731 switch (phase) {
1771 if (NCR5380_transfer_dma(instance, &phase,
1791 NCR5380_transfer_pio(instance, &phase, &len,
1803 NCR5380_transfer_pio(instance, &phase, &len, &data);
1839 * Restore phase bits to 0 so an interrupted selection,
1870 * Restore phase bits to 0 so an interrupted selection,
1909 phase = PHASE_MSGIN;
1910 NCR5380_transfer_pio(instance, &phase, &len, &data);
1921 phase = PHASE_MSGIN;
1923 NCR5380_transfer_pio(instance, &phase, &len, &data);
1970 NCR5380_transfer_pio(instance, &phase, &len, &data);
1989 NCR5380_transfer_pio(instance, &phase, &len, &data);
1994 NCR5380_transfer_pio(instance, &phase, &len, &data);
1998 shost_printk(KERN_ERR, instance, "unknown phase\n");
2000 } /* switch(phase) */
2067 /* BUS FREE phase */
2084 unsigned char phase = PHASE_MSGIN;
2086 NCR5380_transfer_pio(instance, &phase, &len, &data);