Lines Matching full:phase
74 * phase goes through the various phases as instructed by the target.
261 {BASR_PHASE_MATCH, "PHASE MATCH"},
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"); in NCR5380_print_phase()
359 shost_printk(KERN_DEBUG, instance, "phase %s\n", phases[i].name); in NCR5380_print_phase()
464 * the SCSI bus busy. Check for BUS FREE phase. If not, try to abort the
753 * Called by the interrupt handler when DMA finishes or a phase
767 p = hostdata->connected->SCp.phase; in NCR5380_dma_complete()
791 pr_err("scsi%d: bus stuck in data phase -- probably a single byte overrun!\n", in NCR5380_dma_complete()
848 * - Bus phase mismatch (non-maskable in DMA Mode, cleared by ending DMA Mode)
885 /* Probably End of DMA, Phase Mismatch or Loss of BSY. in NCR5380_intr()
971 unsigned char tmp[3], phase; in NCR5380_select() local
994 * Set the phase bits to 0, otherwise the NCR5380 won't drive the in NCR5380_select()
1007 /* The chip now waits for BUS FREE phase. Then after the 800 ns in NCR5380_select()
1087 * phase immediately after selection. in NCR5380_select()
1178 * transfer phase should be a MESSAGE OUT phase so that we can send the in NCR5380_select()
1196 dsprintk(NDEBUG_SELECTION, instance, "target %d selected, going into MESSAGE OUT phase.\n", in NCR5380_select()
1202 phase = PHASE_MSGOUT; in NCR5380_select()
1203 NCR5380_transfer_pio(instance, &phase, &len, &data, 0); in NCR5380_select()
1235 * unsigned char *phase, int *count, unsigned char **data)
1237 * Purpose : transfers data in given phase using polled I/O
1239 * Inputs : instance - instance of driver, *phase - pointer to
1240 * what phase is expected, *count - pointer to number of
1244 * Returns : -1 when different phase is entered without transferring
1246 * is in same phase.
1248 * Also, *phase, *count, *data are modified in place.
1260 unsigned char *phase, int *count, in NCR5380_transfer_pio() argument
1264 unsigned char p = *phase, tmp; in NCR5380_transfer_pio()
1270 * phase specified in the appropriate bits of the TARGET COMMAND in NCR5380_transfer_pio()
1278 * Wait for assertion of REQ, after which the phase bits will be in NCR5380_transfer_pio()
1288 /* Check for phase mismatch */ in NCR5380_transfer_pio()
1290 dsprintk(NDEBUG_PIO, instance, "phase mismatch\n"); in NCR5380_transfer_pio()
1304 * The SCSI standard suggests that in MSGOUT phase, the initiator in NCR5380_transfer_pio()
1305 * should drop ATN on the last byte of the message phase in NCR5380_transfer_pio()
1336 * 1. We were in MSGOUT phase, and we are on the last byte of the in NCR5380_transfer_pio()
1339 * 2. We are in a MSGIN phase, and we are on the last byte of the in NCR5380_transfer_pio()
1358 /* The phase read from the bus is valid if either REQ is (already) in NCR5380_transfer_pio()
1363 *phase = tmp & PHASE_MASK; in NCR5380_transfer_pio()
1365 *phase = PHASE_UNKNOWN; in NCR5380_transfer_pio()
1367 if (!c || (*phase == p)) in NCR5380_transfer_pio()
1402 * MESSAGE OUT phase and sending an ABORT message.
1412 unsigned char *msgptr, phase, tmp; in do_abort() local
1416 /* Request message out phase */ in do_abort()
1420 * Wait for the target to indicate a valid phase by asserting in do_abort()
1421 * REQ. Once this happens, we'll have either a MSGOUT phase in do_abort()
1423 * other phase and will have to source/sink data. in do_abort()
1451 phase = PHASE_MSGOUT; in do_abort()
1452 NCR5380_transfer_pio(instance, &phase, &len, &msgptr, can_sleep); in do_abort()
1468 * unsigned char *phase, int *count, unsigned char **data)
1470 * Purpose : transfers data in given phase using either real
1473 * Inputs : instance - instance of driver, *phase - pointer to
1474 * what phase is expected, *count - pointer to number of
1477 * Returns : -1 when different phase is entered without transferring
1479 * is in same phase.
1481 * Also, *phase, *count, *data are modified in place.
1486 unsigned char *phase, int *count, in NCR5380_transfer_dma() argument
1491 unsigned char p = *phase; in NCR5380_transfer_dma()
1497 *phase = tmp; in NCR5380_transfer_dma()
1501 hostdata->connected->SCp.phase = p; in NCR5380_transfer_dma()
1586 * and ACK both go false, or until a phase mismatch occurs. Gather-sends in NCR5380_transfer_dma()
1604 * properly, or the target switches to MESSAGE IN phase to signal a in NCR5380_transfer_dma()
1650 shost_printk(KERN_ERR, instance, "PDMA write: DRQ and phase timeout\n"); in NCR5380_transfer_dma()
1685 unsigned char phase, tmp, extended_msg[10], old_phase = 0xff; in NCR5380_information_transfer() local
1696 /* We only have a valid SCSI phase when REQ is asserted */ in NCR5380_information_transfer()
1698 phase = (tmp & PHASE_MASK); in NCR5380_information_transfer()
1699 if (phase != old_phase) { in NCR5380_information_transfer()
1700 old_phase = phase; in NCR5380_information_transfer()
1704 if (phase == PHASE_CMDOUT && in NCR5380_information_transfer()
1727 if (sink && (phase != PHASE_MSGOUT)) { in NCR5380_information_transfer()
1740 switch (phase) { in NCR5380_information_transfer()
1780 if (NCR5380_transfer_dma(instance, &phase, in NCR5380_information_transfer()
1800 NCR5380_transfer_pio(instance, &phase, &len, in NCR5380_information_transfer()
1813 NCR5380_transfer_pio(instance, &phase, &len, &data, 0); in NCR5380_information_transfer()
1849 * Restore phase bits to 0 so an interrupted selection, in NCR5380_information_transfer()
1879 * Restore phase bits to 0 so an interrupted selection, in NCR5380_information_transfer()
1918 phase = PHASE_MSGIN; in NCR5380_information_transfer()
1919 NCR5380_transfer_pio(instance, &phase, &len, &data, 1); in NCR5380_information_transfer()
1930 phase = PHASE_MSGIN; in NCR5380_information_transfer()
1932 NCR5380_transfer_pio(instance, &phase, &len, &data, 1); in NCR5380_information_transfer()
1979 NCR5380_transfer_pio(instance, &phase, &len, &data, 0); in NCR5380_information_transfer()
1997 NCR5380_transfer_pio(instance, &phase, &len, &data, 0); in NCR5380_information_transfer()
2002 NCR5380_transfer_pio(instance, &phase, &len, &data, 0); in NCR5380_information_transfer()
2006 shost_printk(KERN_ERR, instance, "unknown phase\n"); in NCR5380_information_transfer()
2008 } /* switch(phase) */ in NCR5380_information_transfer()
2075 /* BUS FREE phase */ in NCR5380_reselect()
2092 unsigned char phase = PHASE_MSGIN; in NCR5380_reselect() local
2094 NCR5380_transfer_pio(instance, &phase, &len, &data, 0); in NCR5380_reselect()