Lines Matching defs:phase
74 * phase goes through the various phases as instructed by the target.
337 * NCR5380_print_phase - show SCSI phase
340 * Print the current SCSI phase for debugging purposes
351 shost_printk(KERN_DEBUG, instance, "REQ not asserted, phase unknown.\n");
356 shost_printk(KERN_DEBUG, instance, "phase %s\n", phases[i].name);
461 * the SCSI bus busy. Check for BUS FREE phase. If not, try to abort the
750 * Called by the interrupt handler when DMA finishes or a phase
765 p = ncmd->phase;
789 pr_err("scsi%d: bus stuck in data phase -- probably a single byte overrun!\n",
846 * - Bus phase mismatch (non-maskable in DMA Mode, cleared by ending DMA Mode)
969 unsigned char tmp[3], phase;
992 * Set the phase bits to 0, otherwise the NCR5380 won't drive the
1005 /* The chip now waits for BUS FREE phase. Then after the 800 ns
1085 * phase immediately after selection.
1176 * transfer phase should be a MESSAGE OUT phase so that we can send the
1194 dsprintk(NDEBUG_SELECTION, instance, "target %d selected, going into MESSAGE OUT phase.\n",
1200 phase = PHASE_MSGOUT;
1201 NCR5380_transfer_pio(instance, &phase, &len, &data, 0);
1233 * unsigned char *phase, int *count, unsigned char **data)
1235 * Purpose : transfers data in given phase using polled I/O
1237 * Inputs : instance - instance of driver, *phase - pointer to
1238 * what phase is expected, *count - pointer to number of
1242 * Returns : -1 when different phase is entered without transferring
1244 * is in same phase.
1246 * Also, *phase, *count, *data are modified in place.
1258 unsigned char *phase, int *count,
1262 unsigned char p = *phase, tmp;
1268 * phase specified in the appropriate bits of the TARGET COMMAND
1276 * Wait for assertion of REQ, after which the phase bits will be
1286 /* Check for phase mismatch */
1288 dsprintk(NDEBUG_PIO, instance, "phase mismatch\n");
1302 * The SCSI standard suggests that in MSGOUT phase, the initiator
1303 * should drop ATN on the last byte of the message phase
1334 * 1. We were in MSGOUT phase, and we are on the last byte of the
1337 * 2. We are in a MSGIN phase, and we are on the last byte of the
1356 /* The phase read from the bus is valid if either REQ is (already)
1361 *phase = tmp & PHASE_MASK;
1363 *phase = PHASE_UNKNOWN;
1365 if (!c || (*phase == p))
1400 * MESSAGE OUT phase and sending an ABORT message.
1410 unsigned char *msgptr, phase, tmp;
1414 /* Request message out phase */
1418 * Wait for the target to indicate a valid phase by asserting
1419 * REQ. Once this happens, we'll have either a MSGOUT phase
1421 * other phase and will have to source/sink data.
1449 phase = PHASE_MSGOUT;
1450 NCR5380_transfer_pio(instance, &phase, &len, &msgptr, can_sleep);
1466 * unsigned char *phase, int *count, unsigned char **data)
1468 * Purpose : transfers data in given phase using either real
1471 * Inputs : instance - instance of driver, *phase - pointer to
1472 * what phase is expected, *count - pointer to number of
1475 * Returns : -1 when different phase is entered without transferring
1477 * is in same phase.
1479 * Also, *phase, *count, *data are modified in place.
1484 unsigned char *phase, int *count,
1489 unsigned char p = *phase;
1495 *phase = tmp;
1499 NCR5380_to_ncmd(hostdata->connected)->phase = p;
1584 * and ACK both go false, or until a phase mismatch occurs. Gather-sends
1602 * properly, or the target switches to MESSAGE IN phase to signal a
1648 shost_printk(KERN_ERR, instance, "PDMA write: DRQ and phase timeout\n");
1683 unsigned char phase, tmp, extended_msg[10], old_phase = 0xff;
1694 /* We only have a valid SCSI phase when REQ is asserted */
1696 phase = (tmp & PHASE_MASK);
1697 if (phase != old_phase) {
1698 old_phase = phase;
1702 if (phase == PHASE_CMDOUT &&
1725 if (sink && (phase != PHASE_MSGOUT)) {
1738 switch (phase) {
1778 if (NCR5380_transfer_dma(instance, &phase,
1798 NCR5380_transfer_pio(instance, &phase, &len,
1811 NCR5380_transfer_pio(instance, &phase, &len, &data, 0);
1847 * Restore phase bits to 0 so an interrupted selection,
1877 * Restore phase bits to 0 so an interrupted selection,
1916 phase = PHASE_MSGIN;
1917 NCR5380_transfer_pio(instance, &phase, &len, &data, 1);
1928 phase = PHASE_MSGIN;
1930 NCR5380_transfer_pio(instance, &phase, &len, &data, 1);
1977 NCR5380_transfer_pio(instance, &phase, &len, &data, 0);
1995 NCR5380_transfer_pio(instance, &phase, &len, &data, 0);
2000 NCR5380_transfer_pio(instance, &phase, &len, &data, 0);
2004 shost_printk(KERN_ERR, instance, "unknown phase\n");
2006 } /* switch(phase) */
2073 /* BUS FREE phase */
2090 unsigned char phase = PHASE_MSGIN;
2092 NCR5380_transfer_pio(instance, &phase, &len, &data, 0);