Lines Matching full:phase
74 * phase goes through the various phases as instructed by the target.
245 {BASR_PHASE_MATCH, "PHASE MATCH"},
324 * NCR5380_print_phase - show SCSI phase
327 * Print the current SCSI phase for debugging purposes
338 shost_printk(KERN_DEBUG, instance, "REQ not asserted, phase unknown.\n"); in NCR5380_print_phase()
343 shost_printk(KERN_DEBUG, instance, "phase %s\n", phases[i].name); in NCR5380_print_phase()
448 * the SCSI bus busy. Check for BUS FREE phase. If not, try to abort the
733 * Called by the interrupt handler when DMA finishes or a phase
747 p = hostdata->connected->SCp.phase; in NCR5380_dma_complete()
771 pr_err("scsi%d: bus stuck in data phase -- probably a single byte overrun!\n", in NCR5380_dma_complete()
828 * - Bus phase mismatch (non-maskable in DMA Mode, cleared by ending DMA Mode)
865 /* Probably End of DMA, Phase Mismatch or Loss of BSY. in NCR5380_intr()
951 unsigned char tmp[3], phase; in NCR5380_select() local
973 * Set the phase bits to 0, otherwise the NCR5380 won't drive the in NCR5380_select()
986 /* The chip now waits for BUS FREE phase. Then after the 800 ns in NCR5380_select()
1066 * phase immediately after selection. in NCR5380_select()
1157 * transfer phase should be a MESSAGE OUT phase so that we can send the in NCR5380_select()
1175 dsprintk(NDEBUG_SELECTION, instance, "target %d selected, going into MESSAGE OUT phase.\n", in NCR5380_select()
1181 phase = PHASE_MSGOUT; in NCR5380_select()
1182 NCR5380_transfer_pio(instance, &phase, &len, &data); in NCR5380_select()
1214 * unsigned char *phase, int *count, unsigned char **data)
1216 * Purpose : transfers data in given phase using polled I/O
1218 * Inputs : instance - instance of driver, *phase - pointer to
1219 * what phase is expected, *count - pointer to number of
1222 * Returns : -1 when different phase is entered without transferring
1224 * is in same phase.
1226 * Also, *phase, *count, *data are modified in place.
1238 unsigned char *phase, int *count, in NCR5380_transfer_pio() argument
1242 unsigned char p = *phase, tmp; in NCR5380_transfer_pio()
1248 * phase specified in the appropriate bits of the TARGET COMMAND in NCR5380_transfer_pio()
1256 * Wait for assertion of REQ, after which the phase bits will be in NCR5380_transfer_pio()
1265 /* Check for phase mismatch */ in NCR5380_transfer_pio()
1267 dsprintk(NDEBUG_PIO, instance, "phase mismatch\n"); in NCR5380_transfer_pio()
1281 * The SCSI standard suggests that in MSGOUT phase, the initiator in NCR5380_transfer_pio()
1282 * should drop ATN on the last byte of the message phase in NCR5380_transfer_pio()
1313 * 1. We were in MSGOUT phase, and we are on the last byte of the in NCR5380_transfer_pio()
1316 * 2. We are in a MSGIN phase, and we are on the last byte of the in NCR5380_transfer_pio()
1335 /* The phase read from the bus is valid if either REQ is (already) in NCR5380_transfer_pio()
1340 *phase = tmp & PHASE_MASK; in NCR5380_transfer_pio()
1342 *phase = PHASE_UNKNOWN; in NCR5380_transfer_pio()
1344 if (!c || (*phase == p)) in NCR5380_transfer_pio()
1379 * MESSAGE OUT phase and sending an ABORT message.
1388 unsigned char *msgptr, phase, tmp; in do_abort() local
1392 /* Request message out phase */ in do_abort()
1396 * Wait for the target to indicate a valid phase by asserting in do_abort()
1397 * REQ. Once this happens, we'll have either a MSGOUT phase in do_abort()
1399 * other phase and will have to source/sink data. in do_abort()
1425 phase = PHASE_MSGOUT; in do_abort()
1426 NCR5380_transfer_pio(instance, &phase, &len, &msgptr); in do_abort()
1442 * unsigned char *phase, int *count, unsigned char **data)
1444 * Purpose : transfers data in given phase using either real
1447 * Inputs : instance - instance of driver, *phase - pointer to
1448 * what phase is expected, *count - pointer to number of
1451 * Returns : -1 when different phase is entered without transferring
1453 * is in same phase.
1455 * Also, *phase, *count, *data are modified in place.
1460 unsigned char *phase, int *count, in NCR5380_transfer_dma() argument
1465 unsigned char p = *phase; in NCR5380_transfer_dma()
1471 *phase = tmp; in NCR5380_transfer_dma()
1475 hostdata->connected->SCp.phase = p; in NCR5380_transfer_dma()
1560 * and ACK both go false, or until a phase mismatch occurs. Gather-sends in NCR5380_transfer_dma()
1578 * properly, or the target switches to MESSAGE IN phase to signal a in NCR5380_transfer_dma()
1624 shost_printk(KERN_ERR, instance, "PDMA write: DRQ and phase timeout\n"); in NCR5380_transfer_dma()
1659 unsigned char phase, tmp, extended_msg[10], old_phase = 0xff; in NCR5380_information_transfer() local
1670 /* We only have a valid SCSI phase when REQ is asserted */ in NCR5380_information_transfer()
1672 phase = (tmp & PHASE_MASK); in NCR5380_information_transfer()
1673 if (phase != old_phase) { in NCR5380_information_transfer()
1674 old_phase = phase; in NCR5380_information_transfer()
1678 if (phase == PHASE_CMDOUT && in NCR5380_information_transfer()
1701 if (sink && (phase != PHASE_MSGOUT)) { in NCR5380_information_transfer()
1714 switch (phase) { in NCR5380_information_transfer()
1754 if (NCR5380_transfer_dma(instance, &phase, in NCR5380_information_transfer()
1774 NCR5380_transfer_pio(instance, &phase, &len, in NCR5380_information_transfer()
1786 NCR5380_transfer_pio(instance, &phase, &len, &data); in NCR5380_information_transfer()
1820 * Restore phase bits to 0 so an interrupted selection, in NCR5380_information_transfer()
1851 * Restore phase bits to 0 so an interrupted selection, in NCR5380_information_transfer()
1890 phase = PHASE_MSGIN; in NCR5380_information_transfer()
1891 NCR5380_transfer_pio(instance, &phase, &len, &data); in NCR5380_information_transfer()
1902 phase = PHASE_MSGIN; in NCR5380_information_transfer()
1904 NCR5380_transfer_pio(instance, &phase, &len, &data); in NCR5380_information_transfer()
1951 NCR5380_transfer_pio(instance, &phase, &len, &data); in NCR5380_information_transfer()
1970 NCR5380_transfer_pio(instance, &phase, &len, &data); in NCR5380_information_transfer()
1975 NCR5380_transfer_pio(instance, &phase, &len, &data); in NCR5380_information_transfer()
1979 shost_printk(KERN_ERR, instance, "unknown phase\n"); in NCR5380_information_transfer()
1981 } /* switch(phase) */ in NCR5380_information_transfer()
2048 /* BUS FREE phase */ in NCR5380_reselect()
2065 unsigned char phase = PHASE_MSGIN; in NCR5380_reselect() local
2067 NCR5380_transfer_pio(instance, &phase, &len, &data); in NCR5380_reselect()