Lines Matching refs:scp
1262 megasas_make_sgl32(struct megasas_instance *instance, struct scsi_cmnd *scp, in megasas_make_sgl32() argument
1269 sge_count = scsi_dma_map(scp); in megasas_make_sgl32()
1273 scsi_for_each_sg(scp, os_sgl, sge_count, i) { in megasas_make_sgl32()
1291 megasas_make_sgl64(struct megasas_instance *instance, struct scsi_cmnd *scp, in megasas_make_sgl64() argument
1298 sge_count = scsi_dma_map(scp); in megasas_make_sgl64()
1302 scsi_for_each_sg(scp, os_sgl, sge_count, i) { in megasas_make_sgl64()
1321 struct scsi_cmnd *scp, union megasas_sgl *mfi_sgl) in megasas_make_sgl_skinny() argument
1327 sge_count = scsi_dma_map(scp); in megasas_make_sgl_skinny()
1330 scsi_for_each_sg(scp, os_sgl, sge_count, i) { in megasas_make_sgl_skinny()
1410 megasas_build_dcdb(struct megasas_instance *instance, struct scsi_cmnd *scp, in megasas_build_dcdb() argument
1418 is_logical = MEGASAS_IS_LOGICAL(scp->device); in megasas_build_dcdb()
1419 device_id = MEGASAS_DEV_INDEX(scp); in megasas_build_dcdb()
1422 if (scp->sc_data_direction == DMA_TO_DEVICE) in megasas_build_dcdb()
1424 else if (scp->sc_data_direction == DMA_FROM_DEVICE) in megasas_build_dcdb()
1426 else if (scp->sc_data_direction == DMA_NONE) in megasas_build_dcdb()
1440 pthru->lun = scp->device->lun; in megasas_build_dcdb()
1441 pthru->cdb_len = scp->cmd_len; in megasas_build_dcdb()
1445 pthru->data_xfer_len = cpu_to_le32(scsi_bufflen(scp)); in megasas_build_dcdb()
1447 memcpy(pthru->cdb, scp->cmnd, scp->cmd_len); in megasas_build_dcdb()
1453 if (scp->device->type == TYPE_TAPE) { in megasas_build_dcdb()
1454 if (scsi_cmd_to_rq(scp)->timeout / HZ > 0xFFFF) in megasas_build_dcdb()
1457 pthru->timeout = cpu_to_le16(scsi_cmd_to_rq(scp)->timeout / HZ); in megasas_build_dcdb()
1465 pthru->sge_count = megasas_make_sgl_skinny(instance, scp, in megasas_build_dcdb()
1469 pthru->sge_count = megasas_make_sgl64(instance, scp, in megasas_build_dcdb()
1472 pthru->sge_count = megasas_make_sgl32(instance, scp, in megasas_build_dcdb()
1509 megasas_build_ldio(struct megasas_instance *instance, struct scsi_cmnd *scp, in megasas_build_ldio() argument
1513 u8 sc = scp->cmnd[0]; in megasas_build_ldio()
1517 device_id = MEGASAS_DEV_INDEX(scp); in megasas_build_ldio()
1520 if (scp->sc_data_direction == DMA_TO_DEVICE) in megasas_build_ldio()
1522 else if (scp->sc_data_direction == DMA_FROM_DEVICE) in megasas_build_ldio()
1541 ldio->access_byte = (scp->cmd_len != 6) ? scp->cmnd[1] : 0; in megasas_build_ldio()
1546 if (scp->cmd_len == 6) { in megasas_build_ldio()
1547 ldio->lba_count = cpu_to_le32((u32) scp->cmnd[4]); in megasas_build_ldio()
1548 ldio->start_lba_lo = cpu_to_le32(((u32) scp->cmnd[1] << 16) | in megasas_build_ldio()
1549 ((u32) scp->cmnd[2] << 8) | in megasas_build_ldio()
1550 (u32) scp->cmnd[3]); in megasas_build_ldio()
1558 else if (scp->cmd_len == 10) { in megasas_build_ldio()
1559 ldio->lba_count = cpu_to_le32((u32) scp->cmnd[8] | in megasas_build_ldio()
1560 ((u32) scp->cmnd[7] << 8)); in megasas_build_ldio()
1561 ldio->start_lba_lo = cpu_to_le32(((u32) scp->cmnd[2] << 24) | in megasas_build_ldio()
1562 ((u32) scp->cmnd[3] << 16) | in megasas_build_ldio()
1563 ((u32) scp->cmnd[4] << 8) | in megasas_build_ldio()
1564 (u32) scp->cmnd[5]); in megasas_build_ldio()
1570 else if (scp->cmd_len == 12) { in megasas_build_ldio()
1571 ldio->lba_count = cpu_to_le32(((u32) scp->cmnd[6] << 24) | in megasas_build_ldio()
1572 ((u32) scp->cmnd[7] << 16) | in megasas_build_ldio()
1573 ((u32) scp->cmnd[8] << 8) | in megasas_build_ldio()
1574 (u32) scp->cmnd[9]); in megasas_build_ldio()
1576 ldio->start_lba_lo = cpu_to_le32(((u32) scp->cmnd[2] << 24) | in megasas_build_ldio()
1577 ((u32) scp->cmnd[3] << 16) | in megasas_build_ldio()
1578 ((u32) scp->cmnd[4] << 8) | in megasas_build_ldio()
1579 (u32) scp->cmnd[5]); in megasas_build_ldio()
1585 else if (scp->cmd_len == 16) { in megasas_build_ldio()
1586 ldio->lba_count = cpu_to_le32(((u32) scp->cmnd[10] << 24) | in megasas_build_ldio()
1587 ((u32) scp->cmnd[11] << 16) | in megasas_build_ldio()
1588 ((u32) scp->cmnd[12] << 8) | in megasas_build_ldio()
1589 (u32) scp->cmnd[13]); in megasas_build_ldio()
1591 ldio->start_lba_lo = cpu_to_le32(((u32) scp->cmnd[6] << 24) | in megasas_build_ldio()
1592 ((u32) scp->cmnd[7] << 16) | in megasas_build_ldio()
1593 ((u32) scp->cmnd[8] << 8) | in megasas_build_ldio()
1594 (u32) scp->cmnd[9]); in megasas_build_ldio()
1596 ldio->start_lba_hi = cpu_to_le32(((u32) scp->cmnd[2] << 24) | in megasas_build_ldio()
1597 ((u32) scp->cmnd[3] << 16) | in megasas_build_ldio()
1598 ((u32) scp->cmnd[4] << 8) | in megasas_build_ldio()
1599 (u32) scp->cmnd[5]); in megasas_build_ldio()
1608 ldio->sge_count = megasas_make_sgl_skinny(instance, scp, in megasas_build_ldio()
1612 ldio->sge_count = megasas_make_sgl64(instance, scp, &ldio->sgl); in megasas_build_ldio()
1614 ldio->sge_count = megasas_make_sgl32(instance, scp, &ldio->sgl); in megasas_build_ldio()