Lines Matching refs:SCp
795 static inline Scsi_Cmnd *remove_SC(Scsi_Cmnd **SC, Scsi_Cmnd *SCp) in remove_SC() argument
800 ptr && SCp!=ptr; in remove_SC()
1452 CURRENT_SC->SCp.phase |= 1 << 16;
1454 if(CURRENT_SC->SCp.phase & selecting) {
1460 …xpecting: (phase change) (busfree) %s\n", CMDINFO(CURRENT_SC), CURRENT_SC->SCp.phase & spiordy ? "…
1461 SETPORT(SIMODE0, (CURRENT_SC->SCp.phase & spiordy) ? ENSPIORDY : 0);
1502 SCpnt->SCp.phase = not_issued | phase;
1503 SCpnt->SCp.Status = CHECK_CONDITION;
1504 SCpnt->SCp.Message = 0;
1505 SCpnt->SCp.have_data_in = 0;
1506 SCpnt->SCp.sent_command = 0;
1524 SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer;
1525 SCpnt->SCp.ptr = SG_ADDRESS(SCpnt->SCp.buffer);
1526 SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length;
1527 SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1;
1529 SCpnt->SCp.ptr = (char *) SCpnt->request_buffer;
1530 SCpnt->SCp.this_residual = SCpnt->request_bufflen;
1531 SCpnt->SCp.buffer = NULL;
1532 SCpnt->SCp.buffers_residual = 0;
1652 Scsi_Cmnd *SCp = (Scsi_Cmnd *)p; local
1653 struct semaphore *sem = SCSEM(SCp);
1654 struct Scsi_Host *shpnt = SCp->host;
1657 if(remove_SC(&ISSUE_SC, SCp)) {
1659 kfree(SCp->host_scribble);
1660 SCp->host_scribble=0;
1713 if(cmnd.SCp.phase & resetted) {
1998 CURRENT_SC->SCp.phase &= ~syncneg;
2000 if(CURRENT_SC->SCp.phase & completed) {
2002 …done(shpnt, (CURRENT_SC->SCp.Status & 0xff) | ((CURRENT_SC->SCp.Message & 0xff) << 8) | (DID_OK <<…
2004 } else if(CURRENT_SC->SCp.phase & aborted) {
2006 …done(shpnt, (CURRENT_SC->SCp.Status & 0xff) | ((CURRENT_SC->SCp.Message & 0xff) << 8) | (DID_ABORT…
2008 } else if(CURRENT_SC->SCp.phase & resetted) {
2010 …done(shpnt, (CURRENT_SC->SCp.Status & 0xff) | ((CURRENT_SC->SCp.Message & 0xff) << 8) | (DID_RESET…
2012 } else if(CURRENT_SC->SCp.phase & disconnected) {
2022 CURRENT_SC->SCp.phase |= 1 << 16;
2057 } else if(DONE_SC->SCp.Status==0x02) {
2065 if(!(DONE_SC->SCp.Status & not_issued)) {
2137 CURRENT_SC->SCp.phase |= selecting;
2171 CURRENT_SC->SCp.phase &= ~(selecting|not_issued);
2185 if (CURRENT_SC->SCp.phase & aborting) {
2187 } else if (CURRENT_SC->SCp.phase & resetting) {
2190 CURRENT_SC->SCp.phase |= syncneg;
2220 CURRENT_SC->SCp.phase &= ~selecting;
2222 if (CURRENT_SC->SCp.phase & aborted) {
2254 if(!(CURRENT_SC->SCp.phase & not_issued))
2357 CURRENT_SC->SCp.Message = MSGI(0);
2358 CURRENT_SC->SCp.phase &= ~disconnected;
2366 CURRENT_SC->SCp.Message = MSGI(0);
2373 CURRENT_SC->SCp.phase |= disconnected;
2377 if(CURRENT_SC->SCp.phase & completed)
2380 CURRENT_SC->SCp.phase |= completed;
2502 if((CURRENT_SC->SCp.phase & syncneg) && SYNCNEG==2 && SYNCRATE==0) {
2546 CURRENT_SC->SCp.phase |= identified;
2549 CURRENT_SC->SCp.phase |= aborted;
2552 CURRENT_SC->SCp.phase |= resetted;
2578 if (CURRENT_SC->SCp.sent_command) {
2622 CURRENT_SC->SCp.sent_command++;
2636 CURRENT_SC->SCp.Status = GETPORT(SCSIDAT);
2640 printk(DEBUG_LEAD "inbound status %02x ", CMDINFO(CURRENT_SC), CURRENT_SC->SCp.Status);
2641 print_status(CURRENT_SC->SCp.Status);
2708 if(CURRENT_SC->SCp.this_residual>0) {
2709 while(fifodata>0 && CURRENT_SC->SCp.this_residual>0) {
2710 data_count = fifodata>CURRENT_SC->SCp.this_residual ?
2711 CURRENT_SC->SCp.this_residual :
2718 *CURRENT_SC->SCp.ptr++ = GETPORT(DATAPORT);
2719 CURRENT_SC->SCp.this_residual--;
2727 insw(DATAPORT, CURRENT_SC->SCp.ptr, data_count);
2728 CURRENT_SC->SCp.ptr += 2 * data_count;
2729 CURRENT_SC->SCp.this_residual -= 2 * data_count;
2733 … if(CURRENT_SC->SCp.this_residual==0 && CURRENT_SC->SCp.buffers_residual>0) {
2735 CURRENT_SC->SCp.buffers_residual--;
2736 CURRENT_SC->SCp.buffer++;
2737 CURRENT_SC->SCp.ptr = SG_ADDRESS(CURRENT_SC->SCp.buffer);
2738 CURRENT_SC->SCp.this_residual = CURRENT_SC->SCp.buffer->length;
2816 while(TESTLO(DMASTAT, INTSTAT) && CURRENT_SC->SCp.this_residual>0) {
2818 if(data_count > CURRENT_SC->SCp.this_residual)
2819 data_count=CURRENT_SC->SCp.this_residual;
2829 SETPORT(DATAPORT, *CURRENT_SC->SCp.ptr++);
2830 CURRENT_SC->SCp.this_residual--;
2837 outsw(DATAPORT, CURRENT_SC->SCp.ptr, data_count);
2838 CURRENT_SC->SCp.ptr += 2 * data_count;
2839 CURRENT_SC->SCp.this_residual -= 2 * data_count;
2843 if(CURRENT_SC->SCp.this_residual==0 && CURRENT_SC->SCp.buffers_residual>0) {
2845 CURRENT_SC->SCp.buffers_residual--;
2846 CURRENT_SC->SCp.buffer++;
2847 CURRENT_SC->SCp.ptr = SG_ADDRESS(CURRENT_SC->SCp.buffer);
2848 CURRENT_SC->SCp.this_residual = CURRENT_SC->SCp.buffer->length;
2877 data_count -= CURRENT_SC->SCp.ptr - SG_ADDRESS(CURRENT_SC->SCp.buffer);
2879 CURRENT_SC->SCp.buffer--;
2880 CURRENT_SC->SCp.buffers_residual++;
2881 data_count -= CURRENT_SC->SCp.buffer->length;
2883 CURRENT_SC->SCp.ptr = SG_ADDRESS(CURRENT_SC->SCp.buffer) - data_count;
2884 CURRENT_SC->SCp.this_residual = CURRENT_SC->SCp.buffer->length + data_count;
2886 CURRENT_SC->SCp.ptr -= data_count;
2887 CURRENT_SC->SCp.this_residual += data_count;
2922 } else if(stat0 & SELDO && CURRENT_SC && (CURRENT_SC->SCp.phase & selecting)) {
3045 CURRENT_SC->SCp.phase &= ~spiordy;
3067 CURRENT_SC->SCp.phase |= spiordy;
3414 if (ptr->SCp.phase & not_issued)
3416 if (ptr->SCp.phase & selecting)
3418 if (ptr->SCp.phase & identified)
3420 if (ptr->SCp.phase & disconnected)
3422 if (ptr->SCp.phase & completed)
3424 if (ptr->SCp.phase & spiordy)
3426 if (ptr->SCp.phase & syncneg)
3428 if (ptr->SCp.phase & aborted)
3430 if (ptr->SCp.phase & resetted)
3478 ptr->resid, ptr->SCp.this_residual, ptr->SCp.buffers_residual);
3480 if (ptr->SCp.phase & not_issued)
3482 if (ptr->SCp.phase & selecting)
3484 if (ptr->SCp.phase & disconnected)
3486 if (ptr->SCp.phase & aborted)
3488 if (ptr->SCp.phase & identified)
3490 if (ptr->SCp.phase & completed)
3492 if (ptr->SCp.phase & spiordy)
3494 if (ptr->SCp.phase & syncneg)