Lines Matching full:scp
2263 * @scp: SCSI command from the mid-layer
2271 struct scsi_cmnd *scp, in megasas_make_sgl_fusion() argument
2287 scsi_for_each_sg(scp, os_sgl, sge_count, i) { in megasas_make_sgl_fusion()
2335 * @scp: SCSI command pointer
2347 int megasas_make_sgl(struct megasas_instance *instance, struct scsi_cmnd *scp, in megasas_make_sgl() argument
2354 sge_count = scsi_dma_map(scp); in megasas_make_sgl()
2363 build_prp = megasas_make_prp_nvme(instance, scp, sgl_chain64, in megasas_make_sgl()
2367 megasas_make_sgl_fusion(instance, scp, sgl_chain64, in megasas_make_sgl()
2378 * @scp: SCSI command
2386 struct IO_REQUEST_INFO *io_info, struct scsi_cmnd *scp, in megasas_set_pd_lba() argument
2404 if (scp->sc_data_direction == DMA_FROM_DEVICE) in megasas_set_pd_lba()
2433 if (scp->sc_data_direction == DMA_FROM_DEVICE) { in megasas_set_pd_lba()
2447 io_request->EEDPBlockSize = cpu_to_le32(scp->device->sector_size); in megasas_set_pd_lba()
2719 * @scp: SCSI command
2727 struct scsi_cmnd *scp, in megasas_build_ldio_fusion() argument
2745 device_id = MEGASAS_DEV_INDEX(scp); in megasas_build_ldio_fusion()
2764 if (scp->cmd_len == 6) { in megasas_build_ldio_fusion()
2765 datalength = (u32) scp->cmnd[4]; in megasas_build_ldio_fusion()
2766 start_lba_lo = ((u32) scp->cmnd[1] << 16) | in megasas_build_ldio_fusion()
2767 ((u32) scp->cmnd[2] << 8) | (u32) scp->cmnd[3]; in megasas_build_ldio_fusion()
2775 else if (scp->cmd_len == 10) { in megasas_build_ldio_fusion()
2776 datalength = (u32) scp->cmnd[8] | in megasas_build_ldio_fusion()
2777 ((u32) scp->cmnd[7] << 8); in megasas_build_ldio_fusion()
2778 start_lba_lo = ((u32) scp->cmnd[2] << 24) | in megasas_build_ldio_fusion()
2779 ((u32) scp->cmnd[3] << 16) | in megasas_build_ldio_fusion()
2780 ((u32) scp->cmnd[4] << 8) | (u32) scp->cmnd[5]; in megasas_build_ldio_fusion()
2786 else if (scp->cmd_len == 12) { in megasas_build_ldio_fusion()
2787 datalength = ((u32) scp->cmnd[6] << 24) | in megasas_build_ldio_fusion()
2788 ((u32) scp->cmnd[7] << 16) | in megasas_build_ldio_fusion()
2789 ((u32) scp->cmnd[8] << 8) | (u32) scp->cmnd[9]; in megasas_build_ldio_fusion()
2790 start_lba_lo = ((u32) scp->cmnd[2] << 24) | in megasas_build_ldio_fusion()
2791 ((u32) scp->cmnd[3] << 16) | in megasas_build_ldio_fusion()
2792 ((u32) scp->cmnd[4] << 8) | (u32) scp->cmnd[5]; in megasas_build_ldio_fusion()
2798 else if (scp->cmd_len == 16) { in megasas_build_ldio_fusion()
2799 datalength = ((u32) scp->cmnd[10] << 24) | in megasas_build_ldio_fusion()
2800 ((u32) scp->cmnd[11] << 16) | in megasas_build_ldio_fusion()
2801 ((u32) scp->cmnd[12] << 8) | (u32) scp->cmnd[13]; in megasas_build_ldio_fusion()
2802 start_lba_lo = ((u32) scp->cmnd[6] << 24) | in megasas_build_ldio_fusion()
2803 ((u32) scp->cmnd[7] << 16) | in megasas_build_ldio_fusion()
2804 ((u32) scp->cmnd[8] << 8) | (u32) scp->cmnd[9]; in megasas_build_ldio_fusion()
2806 start_lba_hi = ((u32) scp->cmnd[2] << 24) | in megasas_build_ldio_fusion()
2807 ((u32) scp->cmnd[3] << 16) | in megasas_build_ldio_fusion()
2808 ((u32) scp->cmnd[4] << 8) | (u32) scp->cmnd[5]; in megasas_build_ldio_fusion()
2816 scsi_buff_len = scsi_bufflen(scp); in megasas_build_ldio_fusion()
2820 if (scp->sc_data_direction == DMA_FROM_DEVICE) in megasas_build_ldio_fusion()
2838 megasas_get_msix_index(instance, scp, cmd, io_info.data_arms); in megasas_build_ldio_fusion()
2850 mrdev_priv = scp->device->hostdata; in megasas_build_ldio_fusion()
2892 megasas_set_pd_lba(io_request, scp->cmd_len, &io_info, scp, in megasas_build_ldio_fusion()
2919 megasas_priv(scp)->status |= MEGASAS_LOAD_BALANCE_FLAG; in megasas_build_ldio_fusion()
2927 megasas_priv(scp)->status &= ~MEGASAS_LOAD_BALANCE_FLAG; in megasas_build_ldio_fusion()
3193 * @scp: SCSI command
3201 struct scsi_cmnd *scp, in megasas_build_io_fusion() argument
3209 mr_device_priv_data = scp->device->hostdata; in megasas_build_io_fusion()
3223 memcpy(io_request->CDB.CDB32, scp->cmnd, scp->cmd_len); in megasas_build_io_fusion()
3228 io_request->IoFlags = cpu_to_le16(scp->cmd_len); in megasas_build_io_fusion()
3230 switch (megasas_cmd_type(scp)) { in megasas_build_io_fusion()
3232 megasas_build_ldio_fusion(instance, scp, cmd); in megasas_build_io_fusion()
3235 megasas_build_ld_nonrw_fusion(instance, scp, cmd); in megasas_build_io_fusion()
3238 megasas_build_syspd_fusion(instance, scp, cmd, true); in megasas_build_io_fusion()
3241 pd_index = MEGASAS_PD_INDEX(scp); in megasas_build_io_fusion()
3247 megasas_build_syspd_fusion(instance, scp, cmd, false); in megasas_build_io_fusion()
3249 megasas_build_syspd_fusion(instance, scp, cmd, true); in megasas_build_io_fusion()
3259 sge_count = megasas_make_sgl(instance, scp, cmd); in megasas_build_io_fusion()
3283 if (scp->sc_data_direction == DMA_TO_DEVICE) in megasas_build_io_fusion()
3285 else if (scp->sc_data_direction == DMA_FROM_DEVICE) in megasas_build_io_fusion()
3295 cmd->scmd = scp; in megasas_build_io_fusion()
3296 megasas_priv(scp)->cmd_priv = cmd; in megasas_build_io_fusion()