Lines Matching refs:phase
231 scsi_pointer->phase = PH_UNDETERMINED;
239 SCp.phase : current state of the command */
361 * Start selection phase
371 unsigned char phase, arbit;
375 phase = nsp_index_read(base, SCSIBUSMON);
376 if(phase != BUSMON_BUS_FREE) {
383 scsi_pointer->phase = PH_ARBSTART;
403 scsi_pointer->phase = PH_SELSTART;
512 * wait for bus phase change
548 unsigned char phase, i_src;
554 phase = nsp_index_read(base, SCSIBUSMON);
555 if (phase == 0xff) {
564 if ((phase & mask) != 0 && (phase & BUSMON_PHASE_MASK) == current_phase) {
565 //nsp_dbg(NSP_DEBUG_INTR, "ret 1 phase=0x%x", phase);
577 static int nsp_xfer(struct scsi_cmnd *const SCpnt, int phase)
590 ret = nsp_expect_signal(SCpnt, phase, BUSMON_REQ);
597 if (len == 1 && scsi_pointer->phase == PH_MSG_OUT) {
602 if (phase & BUSMON_IO) {
638 * data phase skip only occures in case of SCSI_LOW_READ
641 scsi_pointer->phase = PH_DATA;
713 * read data in DATA IN phase
745 if (stat == BUSPHASE_DATA_IN) { /* phase changed? */
749 nsp_dbg(NSP_DEBUG_DATA_IO, "phase changed stat=0x%x", stat);
816 * write data in DATA OUT phase
846 nsp_dbg(NSP_DEBUG_DATA_IO, "phase changed stat=0x%x, res=%d\n", stat, res);
964 unsigned char irq_status, irq_phase, phase;
1004 * Do not read an irq_phase register if no scsi phase interrupt.
1005 * Unless, you should lose a scsi phase interrupt.
1007 phase = nsp_index_read(base, SCSIBUSMON);
1055 nsp_msg(KERN_ERR, "CurrentSC==NULL irq_status=0x%x phase=0x%x irq_phase=0x%x this can't be happen. reset everything", irq_status, phase, irq_phase);
1085 switch (scsi_pointer->phase) {
1088 if ((phase & BUSMON_BSY) == 0) {
1108 scsi_pointer->phase = PH_SELECTED;
1115 //nsp_dbg(NSP_DEBUG_INTR, "phase reselect");
1117 if ((phase & BUSMON_PHASE_MASK) != BUSPHASE_MESSAGE_IN) {
1137 if ((scsi_pointer->phase == PH_MSG_IN ||
1138 scsi_pointer->phase == PH_MSG_OUT) &&
1140 nsp_dbg(NSP_DEBUG_INTR, "normal disconnect irq_status=0x%x, phase=0x%x, irq_phase=0x%x", irq_status, phase, irq_phase);
1160 if (phase == 0) {
1161 nsp_msg(KERN_DEBUG, "unexpected bus free. irq_status=0x%x, phase=0x%x, irq_phase=0x%x", irq_status, phase, irq_phase);
1169 switch (phase & BUSMON_PHASE_MASK) {
1172 if ((phase & BUSMON_REQ) == 0) {
1177 scsi_pointer->phase = PH_COMMAND;
1193 scsi_pointer->phase = PH_DATA;
1203 scsi_pointer->phase = PH_DATA;
1214 scsi_pointer->phase = PH_STATUS;
1224 if ((phase & BUSMON_REQ) == 0) {
1228 scsi_pointer->phase = PH_MSG_OUT;
1257 if ((phase & BUSMON_REQ) == 0) {
1261 scsi_pointer->phase = PH_MSG_IN;