Lines Matching refs:scp
1252 megasas_make_sgl32(struct megasas_instance *instance, struct scsi_cmnd *scp, in megasas_make_sgl32() argument
1259 sge_count = scsi_dma_map(scp); in megasas_make_sgl32()
1263 scsi_for_each_sg(scp, os_sgl, sge_count, i) { in megasas_make_sgl32()
1281 megasas_make_sgl64(struct megasas_instance *instance, struct scsi_cmnd *scp, in megasas_make_sgl64() argument
1288 sge_count = scsi_dma_map(scp); in megasas_make_sgl64()
1292 scsi_for_each_sg(scp, os_sgl, sge_count, i) { in megasas_make_sgl64()
1311 struct scsi_cmnd *scp, union megasas_sgl *mfi_sgl) in megasas_make_sgl_skinny() argument
1317 sge_count = scsi_dma_map(scp); in megasas_make_sgl_skinny()
1320 scsi_for_each_sg(scp, os_sgl, sge_count, i) { in megasas_make_sgl_skinny()
1400 megasas_build_dcdb(struct megasas_instance *instance, struct scsi_cmnd *scp, in megasas_build_dcdb() argument
1408 is_logical = MEGASAS_IS_LOGICAL(scp->device); in megasas_build_dcdb()
1409 device_id = MEGASAS_DEV_INDEX(scp); in megasas_build_dcdb()
1412 if (scp->sc_data_direction == DMA_TO_DEVICE) in megasas_build_dcdb()
1414 else if (scp->sc_data_direction == DMA_FROM_DEVICE) in megasas_build_dcdb()
1416 else if (scp->sc_data_direction == DMA_NONE) in megasas_build_dcdb()
1430 pthru->lun = scp->device->lun; in megasas_build_dcdb()
1431 pthru->cdb_len = scp->cmd_len; in megasas_build_dcdb()
1435 pthru->data_xfer_len = cpu_to_le32(scsi_bufflen(scp)); in megasas_build_dcdb()
1437 memcpy(pthru->cdb, scp->cmnd, scp->cmd_len); in megasas_build_dcdb()
1443 if (scp->device->type == TYPE_TAPE) { in megasas_build_dcdb()
1444 if ((scp->request->timeout / HZ) > 0xFFFF) in megasas_build_dcdb()
1447 pthru->timeout = cpu_to_le16(scp->request->timeout / HZ); in megasas_build_dcdb()
1455 pthru->sge_count = megasas_make_sgl_skinny(instance, scp, in megasas_build_dcdb()
1459 pthru->sge_count = megasas_make_sgl64(instance, scp, in megasas_build_dcdb()
1462 pthru->sge_count = megasas_make_sgl32(instance, scp, in megasas_build_dcdb()
1499 megasas_build_ldio(struct megasas_instance *instance, struct scsi_cmnd *scp, in megasas_build_ldio() argument
1503 u8 sc = scp->cmnd[0]; in megasas_build_ldio()
1507 device_id = MEGASAS_DEV_INDEX(scp); in megasas_build_ldio()
1510 if (scp->sc_data_direction == DMA_TO_DEVICE) in megasas_build_ldio()
1512 else if (scp->sc_data_direction == DMA_FROM_DEVICE) in megasas_build_ldio()
1531 ldio->access_byte = (scp->cmd_len != 6) ? scp->cmnd[1] : 0; in megasas_build_ldio()
1536 if (scp->cmd_len == 6) { in megasas_build_ldio()
1537 ldio->lba_count = cpu_to_le32((u32) scp->cmnd[4]); in megasas_build_ldio()
1538 ldio->start_lba_lo = cpu_to_le32(((u32) scp->cmnd[1] << 16) | in megasas_build_ldio()
1539 ((u32) scp->cmnd[2] << 8) | in megasas_build_ldio()
1540 (u32) scp->cmnd[3]); in megasas_build_ldio()
1548 else if (scp->cmd_len == 10) { in megasas_build_ldio()
1549 ldio->lba_count = cpu_to_le32((u32) scp->cmnd[8] | in megasas_build_ldio()
1550 ((u32) scp->cmnd[7] << 8)); in megasas_build_ldio()
1551 ldio->start_lba_lo = cpu_to_le32(((u32) scp->cmnd[2] << 24) | in megasas_build_ldio()
1552 ((u32) scp->cmnd[3] << 16) | in megasas_build_ldio()
1553 ((u32) scp->cmnd[4] << 8) | in megasas_build_ldio()
1554 (u32) scp->cmnd[5]); in megasas_build_ldio()
1560 else if (scp->cmd_len == 12) { in megasas_build_ldio()
1561 ldio->lba_count = cpu_to_le32(((u32) scp->cmnd[6] << 24) | in megasas_build_ldio()
1562 ((u32) scp->cmnd[7] << 16) | in megasas_build_ldio()
1563 ((u32) scp->cmnd[8] << 8) | in megasas_build_ldio()
1564 (u32) scp->cmnd[9]); in megasas_build_ldio()
1566 ldio->start_lba_lo = cpu_to_le32(((u32) scp->cmnd[2] << 24) | in megasas_build_ldio()
1567 ((u32) scp->cmnd[3] << 16) | in megasas_build_ldio()
1568 ((u32) scp->cmnd[4] << 8) | in megasas_build_ldio()
1569 (u32) scp->cmnd[5]); in megasas_build_ldio()
1575 else if (scp->cmd_len == 16) { in megasas_build_ldio()
1576 ldio->lba_count = cpu_to_le32(((u32) scp->cmnd[10] << 24) | in megasas_build_ldio()
1577 ((u32) scp->cmnd[11] << 16) | in megasas_build_ldio()
1578 ((u32) scp->cmnd[12] << 8) | in megasas_build_ldio()
1579 (u32) scp->cmnd[13]); in megasas_build_ldio()
1581 ldio->start_lba_lo = cpu_to_le32(((u32) scp->cmnd[6] << 24) | in megasas_build_ldio()
1582 ((u32) scp->cmnd[7] << 16) | in megasas_build_ldio()
1583 ((u32) scp->cmnd[8] << 8) | in megasas_build_ldio()
1584 (u32) scp->cmnd[9]); in megasas_build_ldio()
1586 ldio->start_lba_hi = cpu_to_le32(((u32) scp->cmnd[2] << 24) | in megasas_build_ldio()
1587 ((u32) scp->cmnd[3] << 16) | in megasas_build_ldio()
1588 ((u32) scp->cmnd[4] << 8) | in megasas_build_ldio()
1589 (u32) scp->cmnd[5]); in megasas_build_ldio()
1598 ldio->sge_count = megasas_make_sgl_skinny(instance, scp, in megasas_build_ldio()
1602 ldio->sge_count = megasas_make_sgl64(instance, scp, &ldio->sgl); in megasas_build_ldio()
1604 ldio->sge_count = megasas_make_sgl32(instance, scp, &ldio->sgl); in megasas_build_ldio()