Lines Matching refs:SCpnt
806 struct scsi_cmnd *SCpnt; member
1604 struct scsi_cmnd *SCpnt; in map_dma() local
1607 SCpnt = cpp->SCpnt; in map_dma()
1608 pci_dir = SCpnt->sc_data_direction; in map_dma()
1610 if (SCpnt->sense_buffer) in map_dma()
1612 H2DEV(pci_map_single(ha->pdev, SCpnt->sense_buffer, in map_dma()
1617 if (!scsi_sg_count(SCpnt)) { in map_dma()
1622 count = pci_map_sg(ha->pdev, scsi_sglist(SCpnt), scsi_sg_count(SCpnt), in map_dma()
1626 scsi_for_each_sg(SCpnt, sg, count, k) { in map_dma()
1633 scsi_sg_count(SCpnt) * in map_dma()
1636 cpp->data_len = H2DEV((scsi_sg_count(SCpnt) * sizeof(struct sg_list))); in map_dma()
1643 struct scsi_cmnd *SCpnt; in unmap_dma() local
1646 SCpnt = cpp->SCpnt; in unmap_dma()
1647 pci_dir = SCpnt->sc_data_direction; in unmap_dma()
1653 if (scsi_sg_count(SCpnt)) in unmap_dma()
1654 pci_unmap_sg(ha->pdev, scsi_sglist(SCpnt), scsi_sg_count(SCpnt), in unmap_dma()
1669 struct scsi_cmnd *SCpnt; in sync_dma() local
1672 SCpnt = cpp->SCpnt; in sync_dma()
1673 pci_dir = SCpnt->sc_data_direction; in sync_dma()
1680 if (scsi_sg_count(SCpnt)) in sync_dma()
1681 pci_dma_sync_sg_for_cpu(ha->pdev, scsi_sglist(SCpnt), in sync_dma()
1682 scsi_sg_count(SCpnt), pci_dir); in sync_dma()
1710 struct scsi_cmnd *SCpnt; in scsi_to_dev_dir() local
1713 SCpnt = cpp->SCpnt; in scsi_to_dev_dir()
1715 if (SCpnt->sc_data_direction == DMA_FROM_DEVICE) { in scsi_to_dev_dir()
1719 } else if (SCpnt->sc_data_direction == DMA_TO_DEVICE) { in scsi_to_dev_dir()
1723 } else if (SCpnt->sc_data_direction == DMA_NONE) { in scsi_to_dev_dir()
1729 if (SCpnt->sc_data_direction != DMA_BIDIRECTIONAL) in scsi_to_dev_dir()
1734 if (SCpnt->cmnd[0] == data_out_cmds[k]) { in scsi_to_dev_dir()
1741 if (SCpnt->cmnd[0] == data_none_cmds[k]) { in scsi_to_dev_dir()
1748 static int eata2x_queuecommand_lck(struct scsi_cmnd *SCpnt, in eata2x_queuecommand_lck() argument
1751 struct Scsi_Host *shost = SCpnt->device->host; in eata2x_queuecommand_lck()
1756 if (SCpnt->host_scribble) in eata2x_queuecommand_lck()
1758 ha->board_name, SCpnt); in eata2x_queuecommand_lck()
1786 SCpnt->scsi_done = done; in eata2x_queuecommand_lck()
1788 SCpnt->host_scribble = (unsigned char *)&cpp->cpp_index; in eata2x_queuecommand_lck()
1791 scmd_printk(KERN_INFO, SCpnt, in eata2x_queuecommand_lck()
1797 if (SCpnt->device->type == TYPE_TAPE) in eata2x_queuecommand_lck()
1801 cpp->channel = SCpnt->device->channel; in eata2x_queuecommand_lck()
1802 cpp->target = SCpnt->device->id; in eata2x_queuecommand_lck()
1803 cpp->lun = SCpnt->device->lun; in eata2x_queuecommand_lck()
1804 cpp->SCpnt = SCpnt; in eata2x_queuecommand_lck()
1805 memcpy(cpp->cdb, SCpnt->cmnd, SCpnt->cmd_len); in eata2x_queuecommand_lck()
1813 if (linked_comm && SCpnt->device->queue_depth > 2 in eata2x_queuecommand_lck()
1814 && TLDEV(SCpnt->device->type)) { in eata2x_queuecommand_lck()
1816 flush_dev(SCpnt->device, blk_rq_pos(SCpnt->request), ha, 0); in eata2x_queuecommand_lck()
1823 SCpnt->host_scribble = NULL; in eata2x_queuecommand_lck()
1824 scmd_printk(KERN_INFO, SCpnt, "qcomm, adapter busy.\n"); in eata2x_queuecommand_lck()
1864 if (SCarg != ha->cp[i].SCpnt) in DEF_SCSI_QCMD()
1866 ha->board_name, i, SCarg, ha->cp[i].SCpnt); in DEF_SCSI_QCMD()
1903 struct scsi_cmnd *SCpnt; in eata2x_eh_host_reset() local
1946 if (!(SCpnt = ha->cp[i].SCpnt)) in eata2x_eh_host_reset()
1961 if (SCpnt->host_scribble == NULL) in eata2x_eh_host_reset()
1964 if (*(unsigned int *)SCpnt->host_scribble != i) in eata2x_eh_host_reset()
1967 if (SCpnt->scsi_done == NULL) in eata2x_eh_host_reset()
1971 if (SCpnt == SCarg) in eata2x_eh_host_reset()
2003 SCpnt = ha->cp[i].SCpnt; in eata2x_eh_host_reset()
2005 SCpnt->result = DID_RESET << 16; in eata2x_eh_host_reset()
2006 SCpnt->host_scribble = NULL; in eata2x_eh_host_reset()
2017 SCpnt = ha->cp[i].SCpnt; in eata2x_eh_host_reset()
2019 SCpnt->result = DID_RESET << 16; in eata2x_eh_host_reset()
2020 SCpnt->host_scribble = NULL; in eata2x_eh_host_reset()
2034 SCpnt->scsi_done(SCpnt); in eata2x_eh_host_reset()
2101 struct scsi_cmnd *SCpnt; in reorder() local
2128 SCpnt = cpp->SCpnt; in reorder()
2133 if (blk_rq_pos(SCpnt->request) < minsec) in reorder()
2134 minsec = blk_rq_pos(SCpnt->request); in reorder()
2135 if (blk_rq_pos(SCpnt->request) > maxsec) in reorder()
2136 maxsec = blk_rq_pos(SCpnt->request); in reorder()
2138 sl[n] = blk_rq_pos(SCpnt->request); in reorder()
2139 ioseek += blk_rq_sectors(SCpnt->request); in reorder()
2178 SCpnt = cpp->SCpnt; in reorder()
2179 ll[n] = blk_rq_sectors(SCpnt->request); in reorder()
2180 pl[n] = SCpnt->serial_number; in reorder()
2223 SCpnt = cpp->SCpnt; in reorder()
2224 scmd_printk(KERN_INFO, SCpnt, in reorder()
2229 n_ready, blk_rq_pos(SCpnt->request), in reorder()
2230 blk_rq_sectors(SCpnt->request), cursec, YESNO(s), in reorder()
2241 struct scsi_cmnd *SCpnt; in flush_dev() local
2251 SCpnt = cpp->SCpnt; in flush_dev()
2253 if (SCpnt->device != dev) in flush_dev()
2268 SCpnt = cpp->SCpnt; in flush_dev()
2271 scmd_printk(KERN_INFO, SCpnt, in flush_dev()
2286 struct scsi_cmnd *SCpnt; in ihdlr() local
2379 SCpnt = cpp->SCpnt; in ihdlr()
2381 if (SCpnt == NULL) in ihdlr()
2384 if (SCpnt->host_scribble == NULL) in ihdlr()
2386 i, SCpnt); in ihdlr()
2388 if (*(unsigned int *)SCpnt->host_scribble != i) in ihdlr()
2391 *(unsigned int *)SCpnt->host_scribble); in ihdlr()
2395 if (linked_comm && SCpnt->device->queue_depth > 2 in ihdlr()
2396 && TLDEV(SCpnt->device->type)) in ihdlr()
2397 flush_dev(SCpnt->device, blk_rq_pos(SCpnt->request), ha, 1); in ihdlr()
2410 if (tstatus == BUSY && SCpnt->device->type != TYPE_TAPE) in ihdlr()
2414 else if (tstatus != GOOD && SCpnt->device->type == TYPE_DISK in ihdlr()
2415 && ha->target_redo[SCpnt->device->id][SCpnt-> in ihdlr()
2422 && SCpnt->device->type == TYPE_DISK in ihdlr()
2423 && (SCpnt->sense_buffer[2] & 0xf) == RECOVERED_ERROR) in ihdlr()
2430 ha->target_redo[SCpnt->device->id][SCpnt->device-> in ihdlr()
2433 if (spp->target_status && SCpnt->device->type == TYPE_DISK && in ihdlr()
2435 (SCpnt->sense_buffer[2] & 0xf) == NOT_READY))) in ihdlr()
2439 SCpnt->device->channel, SCpnt->device->id, in ihdlr()
2440 (u8)SCpnt->device->lun, in ihdlr()
2441 spp->target_status, SCpnt->sense_buffer[2]); in ihdlr()
2443 ha->target_to[SCpnt->device->id][SCpnt->device->channel] = 0; in ihdlr()
2445 if (ha->last_retried_pid == SCpnt->serial_number) in ihdlr()
2452 if (ha->target_to[SCpnt->device->id][SCpnt->device->channel] > 1) in ihdlr()
2456 ha->target_to[SCpnt->device->id][SCpnt->device-> in ihdlr()
2470 if (SCpnt->device->type != TYPE_TAPE in ihdlr()
2480 ha->last_retried_pid = SCpnt->serial_number; in ihdlr()
2498 SCpnt->result = status | spp->target_status; in ihdlr()
2501 if (SCpnt->result || do_trace) in ihdlr()
2508 scmd_printk(KERN_INFO, SCpnt, "ihdlr, mbox %2d, err 0x%x:%x," in ihdlr()
2516 SCpnt->host_scribble = NULL; in ihdlr()
2518 SCpnt->scsi_done(SCpnt); in ihdlr()