Lines Matching refs:pcmd

48 	    pSRB->pcmd->cmnd[0], pDCB->SyncMode);)  in dc390_StartSCSI()
60 ( ( ( (pSRB->pcmd->cmnd[0] == REQUEST_SENSE) || (pSRB->SRBFlag & AUTO_REQSENSE) ) in dc390_StartSCSI()
61 && !(pDCB->SyncMode & SYNC_NEGO_DONE) ) || (pSRB->pcmd->cmnd[0] == INQUIRY) ) ) in dc390_StartSCSI()
79 …BUG "DC390: Select w/DisCn for Cmd %li (SRB %p), Using Tag %02x\n", pSRB->pcmd->pid, pSRB, tag_no)… in dc390_StartSCSI()
85 …Select w%s/DisCn for Cmd %li (SRB %p), No TagQ\n", (disc_allowed?"":"o"), pSRB->pcmd->pid, pSRB);) in dc390_StartSCSI()
115 DC390_write8 (ScsiFifo, sizeof(pSRB->pcmd->sense_buffer)); in dc390_StartSCSI()
122 ptr = (PUCHAR) pSRB->pcmd->cmnd; in dc390_StartSCSI()
123 for (i=0; i<pSRB->pcmd->cmd_len; i++) in dc390_StartSCSI()
136 pSRB->pcmd->pid, pSRB->pcmd->target, pSRB->pcmd->lun);) in dc390_StartSCSI()
738 if( pSRB->pcmd->use_sg ) in dc390_restore_ptr()
740 pSRB->SGcount = (UCHAR) pSRB->pcmd->use_sg; in dc390_restore_ptr()
741 pSRB->pSegmentList = (PSGL) pSRB->pcmd->request_buffer; in dc390_restore_ptr()
762 else if( pSRB->pcmd->request_buffer ) in dc390_restore_ptr()
766 pSRB->Segmentx.address = (PUCHAR) pSRB->pcmd->request_buffer + pSRB->Saved_Ptr; in dc390_restore_ptr()
767 pSRB->Segmentx.length = pSRB->pcmd->request_bufflen - pSRB->Saved_Ptr; in dc390_restore_ptr()
974 cnt = (UCHAR) pSRB->pcmd->cmd_len; in dc390_CommandPhase()
975 ptr = (PUCHAR) pSRB->pcmd->cmnd; in dc390_CommandPhase()
987 DC390_write8 (ScsiFifo, sizeof(pSRB->pcmd->sense_buffer)); in dc390_CommandPhase()
1029 if( (pSRB->pcmd->cmnd[0] == INQUIRY ) || in dc390_MsgOutPhase()
1030 (pSRB->pcmd->cmnd[0] == REQUEST_SENSE) || in dc390_MsgOutPhase()
1368 PSCSICMD pcmd; in dc390_RequestSense() local
1371 pSRB->pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN);) in dc390_RequestSense()
1383 pcmd = pSRB->pcmd; in dc390_RequestSense()
1385 pSRB->Segmentx.address = (PUCHAR) &(pcmd->sense_buffer); in dc390_RequestSense()
1386 pSRB->Segmentx.length = sizeof(pcmd->sense_buffer); in dc390_RequestSense()
1410 PSCSICMD pcmd; in dc390_SRBdone() local
1415 pcmd = pSRB->pcmd; DCB_removed = 0; in dc390_SRBdone()
1417 ptr = (PSCSI_INQDATA) (pcmd->request_buffer); in dc390_SRBdone()
1418 if( pcmd->use_sg ) in dc390_SRBdone()
1421 DEBUG0(printk (" SRBdone (%02x,%08x), SRB %p, pid %li\n", status, pcmd->result,\ in dc390_SRBdone()
1422 pSRB, pcmd->pid);) in dc390_SRBdone()
1429 switch (pcmd->sense_buffer[2] & 0x0f) in dc390_SRBdone()
1432 pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN, in dc390_SRBdone()
1435 pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN, in dc390_SRBdone()
1438 pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN, in dc390_SRBdone()
1441 pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN, in dc390_SRBdone()
1444 pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN, in dc390_SRBdone()
1451 pcmd->result = MK_RES_LNX(0,DID_BAD_TARGET,0,/*CHECK_CONDITION*/0); in dc390_SRBdone()
1459 (pSRB->TotalXferredLen >= pcmd->underflow) ) in dc390_SRBdone()
1460 SET_RES_DID(pcmd->result,DID_OK) in dc390_SRBdone()
1462 pcmd->result = MK_RES_LNX(DRIVER_SENSE,DID_OK,0,CHECK_CONDITION); in dc390_SRBdone()
1463 REMOVABLEDEBUG(printk(KERN_INFO "Cmd=%02x,Result=%08x,XferL=%08x\n",pSRB->pcmd->cmnd[0],\ in dc390_SRBdone()
1464 (UINT) pcmd->result, (UINT) pSRB->TotalXferredLen);) in dc390_SRBdone()
1475 if( pSRB->pcmd->cmnd[0] == TEST_UNIT_READY /* || pSRB->pcmd->cmnd[0] == START_STOP */) in dc390_SRBdone()
1477 pcmd->result = MK_RES_LNX(DRIVER_SENSE,DID_OK,0,CHECK_CONDITION); in dc390_SRBdone()
1478 REMOVABLEDEBUG(printk(KERN_INFO "Cmd=%02x, Result=%08x, XferL=%08x\n",pSRB->pcmd->cmnd[0],\ in dc390_SRBdone()
1479 (UINT) pcmd->result, (UINT) pSRB->TotalXferredLen);) in dc390_SRBdone()
1482 SET_RES_DRV(pcmd->result,DRIVER_SENSE); in dc390_SRBdone()
1485 …k ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->pid, pcmd->cmnd[0], pcmd->target, pcmd in dc390_SRBdone()
1489 if( pcmd->use_sg ) in dc390_SRBdone()
1490 pSRB->pSegmentList = (PSGL) pcmd->request_buffer; in dc390_SRBdone()
1491 else if( pcmd->request_buffer ) in dc390_SRBdone()
1494 pSRB->Segmentx.address = (PUCHAR) pcmd->request_buffer; in dc390_SRBdone()
1495 pSRB->Segmentx.length = pcmd->request_bufflen; in dc390_SRBdone()
1509 pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN);) in dc390_SRBdone()
1542 pcmd->result = MK_RES(0,DID_NO_CONNECT,0,0); in dc390_SRBdone()
1546 (pcmd->cmnd[0] == TEST_UNIT_READY || pcmd->cmnd[0] == INQUIRY) && in dc390_SRBdone()
1551 pcmd->result = MK_RES(0,0,pSRB->EndMessage,/*status*/0); in dc390_SRBdone()
1564 if( pcmd->use_sg ) in dc390_SRBdone()
1565 pSRB->pSegmentList = (PSGL) pcmd->request_buffer; in dc390_SRBdone()
1566 else if( pcmd->request_buffer ) in dc390_SRBdone()
1569 pSRB->Segmentx.address = (PUCHAR) pcmd->request_buffer; in dc390_SRBdone()
1570 pSRB->Segmentx.length = pcmd->request_bufflen; in dc390_SRBdone()
1581 SET_RES_DID(pcmd->result,DID_ERROR); in dc390_SRBdone()
1582 SET_RES_MSG(pcmd->result,pSRB->EndMessage); in dc390_SRBdone()
1583 SET_RES_TARGET(pcmd->result,status); in dc390_SRBdone()
1593 SET_RES_DID(pcmd->result,DID_OK); in dc390_SRBdone()
1594 SET_RES_MSG(pcmd->result,pSRB->EndMessage); in dc390_SRBdone()
1599 SET_RES_DID(pcmd->result,DID_PARITY); in dc390_SRBdone()
1600 SET_RES_MSG(pcmd->result,pSRB->EndMessage); in dc390_SRBdone()
1606 SET_RES_DID(pcmd->result,DID_OK); in dc390_SRBdone()
1609 if ((pcmd->result & RES_DID) == 0 && in dc390_SRBdone()
1610 pcmd->cmnd[0] == INQUIRY && in dc390_SRBdone()
1611 pcmd->cmnd[2] == 0 && in dc390_SRBdone()
1612 pcmd->request_bufflen >= 8 && in dc390_SRBdone()
1620 if( pcmd->cmnd[0] == TEST_UNIT_READY || in dc390_SRBdone()
1621 pcmd->cmnd[0] == INQUIRY) in dc390_SRBdone()
1625 (pcmd->cmnd[0] == INQUIRY? "INQUIRY": "TEST_UNIT_READY"), in dc390_SRBdone()
1626 pcmd->result); in dc390_SRBdone()
1627 if (pcmd->result & (DRIVER_SENSE << 24)) printk (" (sense: %02x %02x %02x %02x)\n", in dc390_SRBdone()
1628 pcmd->sense_buffer[0], pcmd->sense_buffer[1], in dc390_SRBdone()
1629 pcmd->sense_buffer[2], pcmd->sense_buffer[3]); in dc390_SRBdone()
1632 …if( (host_byte(pcmd->result) != DID_OK && !(status_byte(pcmd->result) & CHECK_CONDITION) && !(stat… in dc390_SRBdone()
1633 ((driver_byte(pcmd->result) & DRIVER_SENSE) && (pcmd->sense_buffer[0] & 0x70) == 0x70 && in dc390_SRBdone()
1634 (pcmd->sense_buffer[2] & 0xf) == ILLEGAL_REQUEST) || host_byte(pcmd->result) & DID_ERROR ) in dc390_SRBdone()
1640 if( (pcmd->target == pACB->pScsiHost->max_id - 1) && in dc390_SRBdone()
1641 ((pcmd->lun == 0) || (pcmd->lun == pACB->pScsiHost->max_lun - 1)) ) in dc390_SRBdone()
1647 if( (pcmd->target == pACB->pScsiHost->max_id - 1) && in dc390_SRBdone()
1648 (pcmd->lun == pACB->pScsiHost->max_lun - 1) ) in dc390_SRBdone()
1657 if( pcmd->cmnd[0] == INQUIRY && in dc390_SRBdone()
1658 (pcmd->result == (DID_OK << 16) || status_byte(pcmd->result) & CHECK_CONDITION) ) in dc390_SRBdone()
1673 if( (pcmd->target == pACB->pScsiHost->max_id - 1) && in dc390_SRBdone()
1674 (pcmd->lun == pACB->pScsiHost->max_lun - 1) ) in dc390_SRBdone()
1679 pcmd->resid = pcmd->request_bufflen - pSRB->TotalXferredLen; in dc390_SRBdone()
1686 DEBUG0(printk (KERN_DEBUG "DC390: SRBdone: done pid %li\n", pcmd->pid);) in dc390_SRBdone()
1688 pcmd->scsi_done (pcmd); in dc390_SRBdone()
1704 PSCSICMD pcmd; in dc390_DoingSRB_Done() local
1715 pcmd = psrb->pcmd; in dc390_DoingSRB_Done()
1719 if (pcmd == cmd) in dc390_DoingSRB_Done()
1720 pcmd->result = MK_RES(0,DID_ABORT,0,0); in dc390_DoingSRB_Done()
1722 pcmd->result = MK_RES(0,DID_RESET,0,0); in dc390_DoingSRB_Done()
1726 DEBUG0(printk (KERN_DEBUG "DC390: DoingSRB_Done: done pid %li\n", pcmd->pid);) in dc390_DoingSRB_Done()
1728 pcmd->scsi_done( pcmd ); in dc390_DoingSRB_Done()