Lines Matching defs:acp

898 		struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC);
900 acp->phase |= 1 << 16;
902 if (acp->phase & selecting) {
907 SETPORT(SIMODE0, (acp->phase & spiordy) ? ENSPIORDY : 0);
931 struct aha152x_cmd_priv *acp = aha152x_priv(SCpnt);
935 acp->phase = not_issued | phase;
936 acp->status = 0x1; /* Illegal status by SCSI standard */
937 acp->message = 0;
938 acp->sent_command = 0;
940 if (acp->phase & (resetting | check_condition)) {
963 acp->ptr = NULL;
964 acp->this_residual = 0;
966 acp->buffer = NULL;
969 acp->buffer = scsi_sglist(SCpnt);
970 acp->ptr = SG_ADDRESS(acp->buffer);
971 acp->this_residual = acp->buffer->length;
1401 struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC);
1406 acp->phase &= ~syncneg;
1408 if (acp->phase & completed) {
1410 done(shpnt, acp->status, DID_OK);
1412 } else if (acp->phase & aborted) {
1413 done(shpnt, acp->status, DID_ABORT);
1415 } else if (acp->phase & resetted) {
1416 done(shpnt, acp->status, DID_RESET);
1418 } else if (acp->phase & disconnected) {
1424 acp->phase |= 1 << 16;
1507 struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC);
1512 acp->phase |= selecting;
1540 struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC);
1546 acp->phase &= ~(selecting | not_issued);
1561 if (acp->phase & aborting) {
1563 } else if (acp->phase & resetting) {
1566 acp->phase |= syncneg;
1581 struct aha152x_cmd_priv *acp;
1589 acp = aha152x_priv(CURRENT_SC);
1590 acp->phase &= ~selecting;
1592 if (acp->phase & aborted)
1620 struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC);
1622 if (!(acp->phase & not_issued))
1679 struct aha152x_cmd_priv *acp;
1717 acp = aha152x_priv(CURRENT_SC);
1718 acp->message = MSGI(0);
1719 acp->phase &= ~disconnected;
1727 acp = aha152x_priv(CURRENT_SC);
1728 acp->message = MSGI(0);
1736 acp->phase |= disconnected;
1740 acp->phase |= completed;
1889 struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC);
1902 acp->phase |= identified;
1905 acp->phase |= aborted;
1908 acp->phase |= resetted;
2004 struct aha152x_cmd_priv *acp;
2042 acp = aha152x_priv(CURRENT_SC);
2043 if (acp->this_residual > 0) {
2044 while (fifodata > 0 && acp->this_residual > 0) {
2045 data_count = fifodata > acp->this_residual ?
2046 acp->this_residual : fifodata;
2051 *acp->ptr++ = GETPORT(DATAPORT);
2052 acp->this_residual--;
2059 insw(DATAPORT, acp->ptr, data_count);
2060 acp->ptr += 2 * data_count;
2061 acp->this_residual -= 2 * data_count;
2065 if (acp->this_residual == 0 &&
2066 !sg_is_last(acp->buffer)) {
2068 acp->buffer = sg_next(acp->buffer);
2069 acp->ptr = SG_ADDRESS(acp->buffer);
2070 acp->this_residual = acp->buffer->length;
2138 struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC);
2143 while (TESTLO(DMASTAT, INTSTAT) && acp->this_residual > 0) {
2145 if (data_count > acp->this_residual)
2146 data_count = acp->this_residual;
2157 SETPORT(DATAPORT, *acp->ptr++);
2158 acp->this_residual--;
2165 outsw(DATAPORT, acp->ptr, data_count);
2166 acp->ptr += 2 * data_count;
2167 acp->this_residual -= 2 * data_count;
2171 if (acp->this_residual == 0 && !sg_is_last(acp->buffer)) {
2173 acp->buffer = sg_next(acp->buffer);
2174 acp->ptr = SG_ADDRESS(acp->buffer);
2175 acp->this_residual = acp->buffer->length;
2191 struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC);
2210 acp->buffer = sg;
2211 acp->ptr = SG_ADDRESS(acp->buffer) + done;
2212 acp->this_residual = acp->buffer->length - done;
2533 struct aha152x_cmd_priv *acp = aha152x_priv(ptr);
2534 const int phase = acp->phase;
2544 scsi_get_resid(ptr), acp->this_residual,
2545 sg_nents(acp->buffer) - 1);