Lines Matching refs:SCpnt
92 static int mptscsih_AddSGE(MPT_ADAPTER *ioc, struct scsi_cmnd *SCpnt,
179 mptscsih_AddSGE(MPT_ADAPTER *ioc, struct scsi_cmnd *SCpnt, in mptscsih_AddSGE() argument
210 sges_left = scsi_dma_map(SCpnt); in mptscsih_AddSGE()
216 sg = scsi_sglist(SCpnt); in mptscsih_AddSGE()
350 ioc->name, pReq->CDB[0], SCpnt)); in mptscsih_AddSGE()
1313 mptscsih_qcmd(struct scsi_cmnd *SCpnt) in mptscsih_qcmd() argument
1318 VirtDevice *vdevice = SCpnt->device->hostdata; in mptscsih_qcmd()
1327 hd = shost_priv(SCpnt->device->host); in mptscsih_qcmd()
1331 ioc->name, SCpnt)); in mptscsih_qcmd()
1355 if (SCpnt->sc_data_direction == DMA_FROM_DEVICE) { in mptscsih_qcmd()
1356 datalen = scsi_bufflen(SCpnt); in mptscsih_qcmd()
1358 } else if (SCpnt->sc_data_direction == DMA_TO_DEVICE) { in mptscsih_qcmd()
1359 datalen = scsi_bufflen(SCpnt); in mptscsih_qcmd()
1370 && (SCpnt->device->tagged_supported)) { in mptscsih_qcmd()
1372 if (SCpnt->request && SCpnt->request->ioprio) { in mptscsih_qcmd()
1373 if (((SCpnt->request->ioprio & 0x7) == 1) || in mptscsih_qcmd()
1374 !(SCpnt->request->ioprio & 0x7)) in mptscsih_qcmd()
1390 pScsiReq->CDBLength = SCpnt->cmd_len; in mptscsih_qcmd()
1394 int_to_scsilun(SCpnt->device->lun, (struct scsi_lun *)pScsiReq->LUN); in mptscsih_qcmd()
1400 cmd_len = SCpnt->cmd_len; in mptscsih_qcmd()
1402 pScsiReq->CDB[ii] = SCpnt->cmnd[ii]; in mptscsih_qcmd()
1424 if (mptscsih_AddSGE(ioc, SCpnt, pScsiReq, my_idx) != SUCCESS) in mptscsih_qcmd()
1428 SCpnt->host_scribble = (unsigned char *)mf; in mptscsih_qcmd()
1429 mptscsih_set_scsi_lookup(ioc, my_idx, SCpnt); in mptscsih_qcmd()
1433 ioc->name, SCpnt, mf, my_idx)); in mptscsih_qcmd()
1687 mptscsih_abort(struct scsi_cmnd * SCpnt) in mptscsih_abort() argument
1699 if ((hd = shost_priv(SCpnt->device->host)) == NULL) { in mptscsih_abort()
1700 SCpnt->result = DID_RESET << 16; in mptscsih_abort()
1701 SCpnt->scsi_done(SCpnt); in mptscsih_abort()
1703 "can't locate host! (sc=%p)\n", SCpnt); in mptscsih_abort()
1709 ioc->name, SCpnt); in mptscsih_abort()
1710 scsi_print_command(SCpnt); in mptscsih_abort()
1712 vdevice = SCpnt->device->hostdata; in mptscsih_abort()
1716 ioc->name, SCpnt)); in mptscsih_abort()
1717 SCpnt->result = DID_NO_CONNECT << 16; in mptscsih_abort()
1718 SCpnt->scsi_done(SCpnt); in mptscsih_abort()
1728 ioc->name, SCpnt)); in mptscsih_abort()
1729 SCpnt->result = DID_RESET << 16; in mptscsih_abort()
1739 ioc->name, SCpnt)); in mptscsih_abort()
1740 SCpnt->result = DID_RESET << 16; in mptscsih_abort()
1747 if ((scpnt_idx = SCPNT_TO_LOOKUP_IDX(ioc, SCpnt)) < 0) { in mptscsih_abort()
1751 SCpnt->result = DID_RESET << 16; in mptscsih_abort()
1754 SCpnt)); in mptscsih_abort()
1780 if (SCPNT_TO_LOOKUP_IDX(ioc, SCpnt) == scpnt_idx) { in mptscsih_abort()
1783 ioc->name, SCpnt)); in mptscsih_abort()
1788 ioc->name, SCpnt)); in mptscsih_abort()
1795 SCpnt); in mptscsih_abort()
1810 mptscsih_dev_reset(struct scsi_cmnd * SCpnt) in mptscsih_dev_reset() argument
1819 if ((hd = shost_priv(SCpnt->device->host)) == NULL){ in mptscsih_dev_reset()
1821 "Can't locate host! (sc=%p)\n", SCpnt); in mptscsih_dev_reset()
1827 ioc->name, SCpnt); in mptscsih_dev_reset()
1828 scsi_print_command(SCpnt); in mptscsih_dev_reset()
1830 vdevice = SCpnt->device->hostdata; in mptscsih_dev_reset()
1851 ioc->name, ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt); in mptscsih_dev_reset()
1870 mptscsih_bus_reset(struct scsi_cmnd * SCpnt) in mptscsih_bus_reset() argument
1879 if ((hd = shost_priv(SCpnt->device->host)) == NULL){ in mptscsih_bus_reset()
1881 "Can't locate host! (sc=%p)\n", SCpnt); in mptscsih_bus_reset()
1887 ioc->name, SCpnt); in mptscsih_bus_reset()
1888 scsi_print_command(SCpnt); in mptscsih_bus_reset()
1893 vdevice = SCpnt->device->hostdata; in mptscsih_bus_reset()
1902 ioc->name, ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt); in mptscsih_bus_reset()
1920 mptscsih_host_reset(struct scsi_cmnd *SCpnt) in mptscsih_host_reset() argument
1928 if ((hd = shost_priv(SCpnt->device->host)) == NULL){ in mptscsih_host_reset()
1930 "Can't locate host! (sc=%p)\n", SCpnt); in mptscsih_host_reset()
1939 ioc->name, SCpnt); in mptscsih_host_reset()
1951 ioc->name, ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt); in mptscsih_host_reset()