Lines Matching refs:acp
897 struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC);
899 acp->phase |= 1 << 16;
901 if (acp->phase & selecting) {
906 SETPORT(SIMODE0, (acp->phase & spiordy) ? ENSPIORDY : 0);
930 struct aha152x_cmd_priv *acp = aha152x_priv(SCpnt);
934 acp->phase = not_issued | phase;
935 acp->status = 0x1; /* Illegal status by SCSI standard */
936 acp->message = 0;
937 acp->sent_command = 0;
939 if (acp->phase & (resetting | check_condition)) {
962 acp->ptr = NULL;
963 acp->this_residual = 0;
965 acp->buffer = NULL;
968 acp->buffer = scsi_sglist(SCpnt);
969 acp->ptr = SG_ADDRESS(acp->buffer);
970 acp->this_residual = acp->buffer->length;
1400 struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC);
1405 acp->phase &= ~syncneg;
1407 if (acp->phase & completed) {
1409 done(shpnt, acp->status, DID_OK);
1411 } else if (acp->phase & aborted) {
1412 done(shpnt, acp->status, DID_ABORT);
1414 } else if (acp->phase & resetted) {
1415 done(shpnt, acp->status, DID_RESET);
1417 } else if (acp->phase & disconnected) {
1423 acp->phase |= 1 << 16;
1506 struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC);
1511 acp->phase |= selecting;
1539 struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC);
1545 acp->phase &= ~(selecting | not_issued);
1560 if (acp->phase & aborting) {
1562 } else if (acp->phase & resetting) {
1565 acp->phase |= syncneg;
1580 struct aha152x_cmd_priv *acp;
1588 acp = aha152x_priv(CURRENT_SC);
1589 acp->phase &= ~selecting;
1591 if (acp->phase & aborted)
1619 struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC);
1621 if (!(acp->phase & not_issued))
1678 struct aha152x_cmd_priv *acp;
1716 acp = aha152x_priv(CURRENT_SC);
1717 acp->message = MSGI(0);
1718 acp->phase &= ~disconnected;
1726 acp = aha152x_priv(CURRENT_SC);
1727 acp->message = MSGI(0);
1735 acp->phase |= disconnected;
1739 acp->phase |= completed;
1888 struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC);
1901 acp->phase |= identified;
1904 acp->phase |= aborted;
1907 acp->phase |= resetted;
2003 struct aha152x_cmd_priv *acp;
2041 acp = aha152x_priv(CURRENT_SC);
2042 if (acp->this_residual > 0) {
2043 while (fifodata > 0 && acp->this_residual > 0) {
2044 data_count = fifodata > acp->this_residual ?
2045 acp->this_residual : fifodata;
2050 *acp->ptr++ = GETPORT(DATAPORT);
2051 acp->this_residual--;
2058 insw(DATAPORT, acp->ptr, data_count);
2059 acp->ptr += 2 * data_count;
2060 acp->this_residual -= 2 * data_count;
2064 if (acp->this_residual == 0 &&
2065 !sg_is_last(acp->buffer)) {
2067 acp->buffer = sg_next(acp->buffer);
2068 acp->ptr = SG_ADDRESS(acp->buffer);
2069 acp->this_residual = acp->buffer->length;
2137 struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC);
2142 while (TESTLO(DMASTAT, INTSTAT) && acp->this_residual > 0) {
2144 if (data_count > acp->this_residual)
2145 data_count = acp->this_residual;
2156 SETPORT(DATAPORT, *acp->ptr++);
2157 acp->this_residual--;
2164 outsw(DATAPORT, acp->ptr, data_count);
2165 acp->ptr += 2 * data_count;
2166 acp->this_residual -= 2 * data_count;
2170 if (acp->this_residual == 0 && !sg_is_last(acp->buffer)) {
2172 acp->buffer = sg_next(acp->buffer);
2173 acp->ptr = SG_ADDRESS(acp->buffer);
2174 acp->this_residual = acp->buffer->length;
2190 struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC);
2209 acp->buffer = sg;
2210 acp->ptr = SG_ADDRESS(acp->buffer) + done;
2211 acp->this_residual = acp->buffer->length - done;
2532 struct aha152x_cmd_priv *acp = aha152x_priv(ptr);
2533 const int phase = acp->phase;
2543 scsi_get_resid(ptr), acp->this_residual,
2544 sg_nents(acp->buffer) - 1);