Lines Matching refs:SCp
694 struct scsi_cmnd *SCp) in remove_SC() argument
699 ptr && SCp!=ptr; in remove_SC()
889 CURRENT_SC->SCp.phase |= 1 << 16; in setup_expected_interrupts()
891 if(CURRENT_SC->SCp.phase & selecting) { in setup_expected_interrupts()
896 SETPORT(SIMODE0, (CURRENT_SC->SCp.phase & spiordy) ? ENSPIORDY : 0); in setup_expected_interrupts()
925 SCpnt->SCp.phase = not_issued | phase; in aha152x_internal_queue()
926 SCpnt->SCp.Status = 0x1; /* Ilegal status by SCSI standard */ in aha152x_internal_queue()
927 SCpnt->SCp.Message = 0; in aha152x_internal_queue()
928 SCpnt->SCp.have_data_in = 0; in aha152x_internal_queue()
929 SCpnt->SCp.sent_command = 0; in aha152x_internal_queue()
931 if(SCpnt->SCp.phase & (resetting|check_condition)) { in aha152x_internal_queue()
955 SCpnt->SCp.ptr = NULL; in aha152x_internal_queue()
956 SCpnt->SCp.this_residual = 0; in aha152x_internal_queue()
958 SCpnt->SCp.buffer = NULL; in aha152x_internal_queue()
959 SCpnt->SCp.buffers_residual = 0; in aha152x_internal_queue()
962 SCpnt->SCp.buffer = scsi_sglist(SCpnt); in aha152x_internal_queue()
963 SCpnt->SCp.ptr = SG_ADDRESS(SCpnt->SCp.buffer); in aha152x_internal_queue()
964 SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length; in aha152x_internal_queue()
965 SCpnt->SCp.buffers_residual = scsi_sg_count(SCpnt) - 1; in aha152x_internal_queue()
1094 if(SCpnt->SCp.phase & resetted) { in aha152x_device_reset()
1389 CURRENT_SC->SCp.phase &= ~syncneg; in busfree_run()
1391 if(CURRENT_SC->SCp.phase & completed) { in busfree_run()
1393 …done(shpnt, (CURRENT_SC->SCp.Status & 0xff) | ((CURRENT_SC->SCp.Message & 0xff) << 8) | (DID_OK <<… in busfree_run()
1395 } else if(CURRENT_SC->SCp.phase & aborted) { in busfree_run()
1396 …done(shpnt, (CURRENT_SC->SCp.Status & 0xff) | ((CURRENT_SC->SCp.Message & 0xff) << 8) | (DID_ABORT… in busfree_run()
1398 } else if(CURRENT_SC->SCp.phase & resetted) { in busfree_run()
1399 …done(shpnt, (CURRENT_SC->SCp.Status & 0xff) | ((CURRENT_SC->SCp.Message & 0xff) << 8) | (DID_RESET… in busfree_run()
1401 } else if(CURRENT_SC->SCp.phase & disconnected) { in busfree_run()
1407 CURRENT_SC->SCp.phase |= 1 << 16; in busfree_run()
1426 if(DONE_SC->SCp.phase & check_condition) { in busfree_run()
1432 cmd->SCp.Status = SAM_STAT_CHECK_CONDITION; in busfree_run()
1437 } else if(DONE_SC->SCp.Status==SAM_STAT_CHECK_CONDITION) { in busfree_run()
1442 if(!(DONE_SC->SCp.phase & not_issued)) { in busfree_run()
1493 CURRENT_SC->SCp.phase |= selecting; in busfree_run()
1525 CURRENT_SC->SCp.phase &= ~(selecting|not_issued); in seldo_run()
1540 if (CURRENT_SC->SCp.phase & aborting) { in seldo_run()
1542 } else if (CURRENT_SC->SCp.phase & resetting) { in seldo_run()
1545 CURRENT_SC->SCp.phase |= syncneg; in seldo_run()
1566 CURRENT_SC->SCp.phase &= ~selecting; in selto_run()
1568 if (CURRENT_SC->SCp.phase & aborted) in selto_run()
1596 if(!(CURRENT_SC->SCp.phase & not_issued)) in seldi_run()
1690 CURRENT_SC->SCp.Message = MSGI(0); in msgi_run()
1691 CURRENT_SC->SCp.phase &= ~disconnected; in msgi_run()
1699 CURRENT_SC->SCp.Message = MSGI(0); in msgi_run()
1707 CURRENT_SC->SCp.phase |= disconnected; in msgi_run()
1711 CURRENT_SC->SCp.phase |= completed; in msgi_run()
1842 if((CURRENT_SC->SCp.phase & syncneg) && SYNCNEG==2 && SYNCRATE==0) { in msgo_init()
1870 CURRENT_SC->SCp.phase |= identified; in msgo_run()
1873 CURRENT_SC->SCp.phase |= aborted; in msgo_run()
1876 CURRENT_SC->SCp.phase |= resetted; in msgo_run()
1905 if (CURRENT_SC->SCp.sent_command) { in cmd_init()
1936 CURRENT_SC->SCp.sent_command++; in cmd_end()
1948 CURRENT_SC->SCp.Status = GETPORT(SCSIDAT); in status_run()
2009 if(CURRENT_SC->SCp.this_residual>0) { in datai_run()
2010 while(fifodata>0 && CURRENT_SC->SCp.this_residual>0) { in datai_run()
2011 data_count = fifodata > CURRENT_SC->SCp.this_residual ? in datai_run()
2012 CURRENT_SC->SCp.this_residual : in datai_run()
2018 *CURRENT_SC->SCp.ptr++ = GETPORT(DATAPORT); in datai_run()
2019 CURRENT_SC->SCp.this_residual--; in datai_run()
2026 insw(DATAPORT, CURRENT_SC->SCp.ptr, data_count); in datai_run()
2027 CURRENT_SC->SCp.ptr += 2 * data_count; in datai_run()
2028 CURRENT_SC->SCp.this_residual -= 2 * data_count; in datai_run()
2032 if (CURRENT_SC->SCp.this_residual == 0 && in datai_run()
2033 CURRENT_SC->SCp.buffers_residual > 0) { in datai_run()
2035 CURRENT_SC->SCp.buffers_residual--; in datai_run()
2036 CURRENT_SC->SCp.buffer++; in datai_run()
2037 CURRENT_SC->SCp.ptr = SG_ADDRESS(CURRENT_SC->SCp.buffer); in datai_run()
2038 CURRENT_SC->SCp.this_residual = CURRENT_SC->SCp.buffer->length; in datai_run()
2111 while(TESTLO(DMASTAT, INTSTAT) && CURRENT_SC->SCp.this_residual>0) { in datao_run()
2113 if(data_count > CURRENT_SC->SCp.this_residual) in datao_run()
2114 data_count=CURRENT_SC->SCp.this_residual; in datao_run()
2125 SETPORT(DATAPORT, *CURRENT_SC->SCp.ptr++); in datao_run()
2126 CURRENT_SC->SCp.this_residual--; in datao_run()
2133 outsw(DATAPORT, CURRENT_SC->SCp.ptr, data_count); in datao_run()
2134 CURRENT_SC->SCp.ptr += 2 * data_count; in datao_run()
2135 CURRENT_SC->SCp.this_residual -= 2 * data_count; in datao_run()
2139 if(CURRENT_SC->SCp.this_residual==0 && CURRENT_SC->SCp.buffers_residual>0) { in datao_run()
2141 CURRENT_SC->SCp.buffers_residual--; in datao_run()
2142 CURRENT_SC->SCp.buffer++; in datao_run()
2143 CURRENT_SC->SCp.ptr = SG_ADDRESS(CURRENT_SC->SCp.buffer); in datao_run()
2144 CURRENT_SC->SCp.this_residual = CURRENT_SC->SCp.buffer->length; in datao_run()
2166 data_count -= CURRENT_SC->SCp.ptr - in datao_end()
2167 SG_ADDRESS(CURRENT_SC->SCp.buffer); in datao_end()
2169 CURRENT_SC->SCp.buffer--; in datao_end()
2170 CURRENT_SC->SCp.buffers_residual++; in datao_end()
2171 data_count -= CURRENT_SC->SCp.buffer->length; in datao_end()
2173 CURRENT_SC->SCp.ptr = SG_ADDRESS(CURRENT_SC->SCp.buffer) - in datao_end()
2175 CURRENT_SC->SCp.this_residual = CURRENT_SC->SCp.buffer->length + in datao_end()
2204 } else if(stat0 & SELDO && CURRENT_SC && (CURRENT_SC->SCp.phase & selecting)) { in update_state()
2336 CURRENT_SC->SCp.phase &= ~spiordy; in is_complete()
2358 CURRENT_SC->SCp.phase |= spiordy; in is_complete()
2453 (ptr->SCp.phase & not_issued) ? "not issued|" : "", in show_command()
2454 (ptr->SCp.phase & selecting) ? "selecting|" : "", in show_command()
2455 (ptr->SCp.phase & identified) ? "identified|" : "", in show_command()
2456 (ptr->SCp.phase & disconnected) ? "disconnected|" : "", in show_command()
2457 (ptr->SCp.phase & completed) ? "completed|" : "", in show_command()
2458 (ptr->SCp.phase & spiordy) ? "spiordy|" : "", in show_command()
2459 (ptr->SCp.phase & syncneg) ? "syncneg|" : "", in show_command()
2460 (ptr->SCp.phase & aborted) ? "aborted|" : "", in show_command()
2461 (ptr->SCp.phase & resetted) ? "resetted|" : "", in show_command()
2503 scsi_get_resid(ptr), ptr->SCp.this_residual, in get_command()
2504 ptr->SCp.buffers_residual); in get_command()
2506 if (ptr->SCp.phase & not_issued) in get_command()
2508 if (ptr->SCp.phase & selecting) in get_command()
2510 if (ptr->SCp.phase & disconnected) in get_command()
2512 if (ptr->SCp.phase & aborted) in get_command()
2514 if (ptr->SCp.phase & identified) in get_command()
2516 if (ptr->SCp.phase & completed) in get_command()
2518 if (ptr->SCp.phase & spiordy) in get_command()
2520 if (ptr->SCp.phase & syncneg) in get_command()