• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/drivers/scsi/

Lines Matching defs:pcmd

106  *				pcmd->result handling cleaned up.	*
444 struct scsi_cmnd *pcmd = pSRB->pcmd;
446 dc390_cmd_scp_t* cmdp = ((dc390_cmd_scp_t*)(&pcmd->SCp));
450 pSRB->pSegmentList = dc390_sg_build_single(&pSRB->Segmentx, pcmd->sense_buffer, sizeof(pcmd->sense_buffer));
458 DEBUG1(printk("%s(): Mapped sense buffer %p at %x\n", __FUNCTION__, pcmd->sense_buffer, cmdp->saved_dma_handle));
460 } else if (pcmd->use_sg) {
461 pSRB->pSegmentList = (struct scatterlist *) pcmd->request_buffer;
462 pSRB->SGcount = pci_map_sg(pdev, pSRB->pSegmentList, pcmd->use_sg,
463 pcmd->sc_data_direction);
468 __FUNCTION__, pcmd->request_buffer, pSRB->SGcount, pcmd->use_sg));
470 } else if (pcmd->request_buffer && pcmd->request_bufflen) {
471 pSRB->pSegmentList = dc390_sg_build_single(&pSRB->Segmentx, pcmd->request_buffer, pcmd->request_bufflen);
473 pcmd->sc_data_direction);
479 DEBUG1(printk("%s(): Mapped request buffer %p at %x\n", __FUNCTION__, pcmd->request_buffer, cmdp->saved_dma_handle));
490 struct scsi_cmnd *pcmd = pSRB->pcmd;
492 DEBUG1(dc390_cmd_scp_t* cmdp = ((dc390_cmd_scp_t*)(&pcmd->SCp)));
497 } else if (pcmd->use_sg) {
498 pci_unmap_sg(pdev, pcmd->request_buffer, pcmd->use_sg, pcmd->sc_data_direction);
499 DEBUG1(printk("%s(): Unmapped SG at %p with %d elements\n", __FUNCTION__, pcmd->request_buffer, pcmd->use_sg));
500 } else if (pcmd->request_buffer && pcmd->request_bufflen) {
501 pci_unmap_sg(pdev, &pSRB->Segmentx, 1, pcmd->sc_data_direction);
519 struct scsi_cmnd *scmd = pSRB->pcmd;
1027 struct scsi_cmnd *scmd = scsi_find_tag(pSRB->pcmd->device, tag);
1152 struct scsi_cmnd *pcmd = pSRB->pcmd;
1156 if (pcmd->use_sg) {
1158 pSRB->pSegmentList = (struct scatterlist *)pcmd->request_buffer;
1182 } else if(pcmd->request_buffer) {
1185 sg_dma_len(&pSRB->Segmentx) = pcmd->request_bufflen - pSRB->Saved_Ptr;
1398 cnt = (u8) pSRB->pcmd->cmd_len;
1399 ptr = (u8 *) pSRB->pcmd->cmnd;
1410 DC390_write8 (ScsiFifo, sizeof(pSRB->pcmd->sense_buffer));
1452 if( (pSRB->pcmd->cmnd[0] == INQUIRY ) ||
1453 (pSRB->pcmd->cmnd[0] == REQUEST_SENSE) ||
1614 struct scsi_cmnd *pcmd = pSRB->pcmd;
1615 pcmd->resid = pcmd->request_bufflen;
1616 SET_RES_DID(pcmd->result, DID_SOFT_ERROR);
1619 pcmd->scsi_done (pcmd);
1690 struct scsi_cmnd *pcmd;
1692 pcmd = pSRB->pcmd;
1695 pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN));
1698 pSRB->SavedSGCount = pcmd->use_sg;
1717 struct scsi_cmnd *pcmd;
1719 pcmd = pSRB->pcmd;
1725 DEBUG0(printk (" SRBdone (%02x,%08x), SRB %p, pid %li\n", status, pcmd->result,\
1726 pSRB, pcmd->pid));
1733 //pcmd->result = MK_RES(DRIVER_SENSE,DID_OK,0,status);
1735 pcmd->result = MK_RES_LNX(0, DID_BAD_TARGET, 0, /*CHECK_CONDITION*/0);
1738 if( pSRB->pcmd->cmnd[0] == TEST_UNIT_READY /* || pSRB->pcmd->cmnd[0] == START_STOP */)
1741 pcmd->result = MK_RES_LNX(DRIVER_SENSE,DID_OK,0,CHECK_CONDITION);
1742 REMOVABLEDEBUG(printk(KERN_INFO "Cmd=%02x, Result=%08x, XferL=%08x\n",pSRB->pcmd->cmnd[0],\
1743 (u32) pcmd->result, (u32) pSRB->TotalXferredLen));
1745 SET_RES_DRV(pcmd->result, DRIVER_SENSE);
1746 pcmd->use_sg = pSRB->SavedSGCount;
1748 DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->pid, pcmd->cmnd[0], pcmd->device->id, pcmd->device->lun));
1750 SET_RES_DID(pcmd->result, DID_SOFT_ERROR);
1760 SET_RES_DID(pcmd->result, DID_ERROR);
1767 scsi_track_queue_full(pcmd->device, pDCB->GoingSRBCnt - 1);
1768 pcmd->use_sg = pSRB->SavedSGCount;
1769 DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->pid, pcmd->cmnd[0], pcmd->device->id, pcmd->device->lun));
1771 SET_RES_DID(pcmd->result, DID_SOFT_ERROR);
1777 pcmd->result = MK_RES(0,DID_NO_CONNECT,0,0);
1781 (pcmd->cmnd[0] == TEST_UNIT_READY || pcmd->cmnd[0] == INQUIRY) &&
1786 pcmd->result = MK_RES(0,0,pSRB->EndMessage,/*status*/0);
1791 SET_RES_DID(pcmd->result, DID_SOFT_ERROR);
1801 SET_RES_DID(pcmd->result,DID_OK);
1802 SET_RES_MSG(pcmd->result,pSRB->EndMessage);
1806 //pcmd->result = MK_RES(0,DID_PARITY,pSRB->EndMessage,0);
1807 SET_RES_DID(pcmd->result,DID_PARITY);
1808 SET_RES_MSG(pcmd->result,pSRB->EndMessage);
1814 SET_RES_DID(pcmd->result,DID_OK);
1819 pcmd->resid = pcmd->request_bufflen - pSRB->TotalXferredLen;
1825 DEBUG0(printk (KERN_DEBUG "DC390: SRBdone: done pid %li\n", pcmd->pid));
1826 pcmd->scsi_done (pcmd);
1839 struct scsi_cmnd *pcmd;
1850 pcmd = psrb->pcmd;
1934 srb->pcmd = cmd;