Lines Matching refs:scsi_cmnd
87 lpfc_prot_group_type(struct lpfc_hba *phba, struct scsi_cmnd *sc);
90 lpfc_debug_save_data(struct lpfc_hba *phba, struct scsi_cmnd *cmnd) in lpfc_debug_save_data()
119 lpfc_debug_save_dif(struct lpfc_hba *phba, struct scsi_cmnd *cmnd) in lpfc_debug_save_dif()
147 lpfc_cmd_blksize(struct scsi_cmnd *sc) in lpfc_cmd_blksize()
155 lpfc_cmd_protect(struct scsi_cmnd *sc, int flag) in lpfc_cmd_protect()
161 lpfc_cmd_guard_csum(struct scsi_cmnd *sc) in lpfc_cmd_guard_csum()
204 struct scsi_cmnd *cmd = lpfc_cmd->pCmd; in lpfc_update_stats()
1149 struct scsi_cmnd *scsi_cmnd = lpfc_cmd->pCmd; in lpfc_scsi_prep_dma_buf_s3() local
1158 int nseg, datadir = scsi_cmnd->sc_data_direction; in lpfc_scsi_prep_dma_buf_s3()
1167 if (scsi_sg_count(scsi_cmnd)) { in lpfc_scsi_prep_dma_buf_s3()
1175 nseg = dma_map_sg(&phba->pcidev->dev, scsi_sglist(scsi_cmnd), in lpfc_scsi_prep_dma_buf_s3()
1176 scsi_sg_count(scsi_cmnd), datadir); in lpfc_scsi_prep_dma_buf_s3()
1188 scsi_dma_unmap(scsi_cmnd); in lpfc_scsi_prep_dma_buf_s3()
1201 scsi_for_each_sg(scsi_cmnd, sgel, nseg, num_bde) { in lpfc_scsi_prep_dma_buf_s3()
1260 fcp_cmnd->fcpDl = cpu_to_be32(scsi_bufflen(scsi_cmnd)); in lpfc_scsi_prep_dma_buf_s3()
1266 iocb_cmd->un.fcpi.fcpi_parm = scsi_bufflen(scsi_cmnd); in lpfc_scsi_prep_dma_buf_s3()
1292 lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc, in lpfc_bg_err_inject()
1699 lpfc_sc_to_bg_opcodes(struct lpfc_hba *phba, struct scsi_cmnd *sc, in lpfc_sc_to_bg_opcodes()
1779 lpfc_bg_err_opcodes(struct lpfc_hba *phba, struct scsi_cmnd *sc, in lpfc_bg_err_opcodes()
1871 lpfc_bg_setup_bpl(struct lpfc_hba *phba, struct scsi_cmnd *sc, in lpfc_bg_setup_bpl()
2013 lpfc_bg_setup_bpl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc, in lpfc_bg_setup_bpl_prot()
2258 lpfc_bg_setup_sgl(struct lpfc_hba *phba, struct scsi_cmnd *sc, in lpfc_bg_setup_sgl()
2395 lpfc_bg_setup_sgl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc, in lpfc_bg_setup_sgl_prot()
2628 lpfc_prot_group_type(struct lpfc_hba *phba, struct scsi_cmnd *sc) in lpfc_prot_group_type()
2668 struct scsi_cmnd *sc = lpfc_cmd->pCmd; in lpfc_bg_scsi_adjust_dl()
2708 struct scsi_cmnd *scsi_cmnd = lpfc_cmd->pCmd; in lpfc_bg_scsi_prep_dma_buf_s3() local
2713 int datasegcnt, protsegcnt, datadir = scsi_cmnd->sc_data_direction; in lpfc_bg_scsi_prep_dma_buf_s3()
2722 if (scsi_sg_count(scsi_cmnd)) { in lpfc_bg_scsi_prep_dma_buf_s3()
2730 scsi_sglist(scsi_cmnd), in lpfc_bg_scsi_prep_dma_buf_s3()
2731 scsi_sg_count(scsi_cmnd), datadir); in lpfc_bg_scsi_prep_dma_buf_s3()
2741 prot_group_type = lpfc_prot_group_type(phba, scsi_cmnd); in lpfc_bg_scsi_prep_dma_buf_s3()
2750 num_bde = lpfc_bg_setup_bpl(phba, scsi_cmnd, bpl, in lpfc_bg_scsi_prep_dma_buf_s3()
2764 scsi_prot_sglist(scsi_cmnd), in lpfc_bg_scsi_prep_dma_buf_s3()
2765 scsi_prot_sg_count(scsi_cmnd), datadir); in lpfc_bg_scsi_prep_dma_buf_s3()
2767 scsi_dma_unmap(scsi_cmnd); in lpfc_bg_scsi_prep_dma_buf_s3()
2781 num_bde = lpfc_bg_setup_bpl_prot(phba, scsi_cmnd, bpl, in lpfc_bg_scsi_prep_dma_buf_s3()
2791 scsi_dma_unmap(scsi_cmnd); in lpfc_bg_scsi_prep_dma_buf_s3()
2824 scsi_dma_unmap(scsi_cmnd); in lpfc_bg_scsi_prep_dma_buf_s3()
2826 dma_unmap_sg(&phba->pcidev->dev, scsi_prot_sglist(scsi_cmnd), in lpfc_bg_scsi_prep_dma_buf_s3()
2827 scsi_prot_sg_count(scsi_cmnd), in lpfc_bg_scsi_prep_dma_buf_s3()
2828 scsi_cmnd->sc_data_direction); in lpfc_bg_scsi_prep_dma_buf_s3()
2881 struct scsi_cmnd *cmd = lpfc_cmd->pCmd; in lpfc_calc_bg_err()
3066 struct scsi_cmnd *cmd = lpfc_cmd->pCmd; in lpfc_parse_bg_err()
3232 struct scsi_cmnd *scsi_cmnd = lpfc_cmd->pCmd; in lpfc_scsi_prep_dma_buf_s4() local
3251 if (scsi_sg_count(scsi_cmnd)) { in lpfc_scsi_prep_dma_buf_s4()
3259 nseg = scsi_dma_map(scsi_cmnd); in lpfc_scsi_prep_dma_buf_s4()
3277 scsi_dma_unmap(scsi_cmnd); in lpfc_scsi_prep_dma_buf_s4()
3290 scsi_for_each_sg(scsi_cmnd, sgel, nseg, num_bde) { in lpfc_scsi_prep_dma_buf_s4()
3332 fcp_cmnd->fcpDl = cpu_to_be32(scsi_bufflen(scsi_cmnd)); in lpfc_scsi_prep_dma_buf_s4()
3338 iocb_cmd->un.fcpi.fcpi_parm = scsi_bufflen(scsi_cmnd); in lpfc_scsi_prep_dma_buf_s4()
3345 scsi_cmnd->device->hostdata)->oas_enabled) in lpfc_scsi_prep_dma_buf_s4()
3363 struct scsi_cmnd *scsi_cmnd = lpfc_cmd->pCmd; in lpfc_bg_scsi_prep_dma_buf_s4() local
3368 int datasegcnt, protsegcnt, datadir = scsi_cmnd->sc_data_direction; in lpfc_bg_scsi_prep_dma_buf_s4()
3376 if (scsi_sg_count(scsi_cmnd)) { in lpfc_bg_scsi_prep_dma_buf_s4()
3384 scsi_sglist(scsi_cmnd), in lpfc_bg_scsi_prep_dma_buf_s4()
3385 scsi_sg_count(scsi_cmnd), datadir); in lpfc_bg_scsi_prep_dma_buf_s4()
3402 prot_group_type = lpfc_prot_group_type(phba, scsi_cmnd); in lpfc_bg_scsi_prep_dma_buf_s4()
3410 num_sge = lpfc_bg_setup_sgl(phba, scsi_cmnd, sgl, in lpfc_bg_scsi_prep_dma_buf_s4()
3425 scsi_prot_sglist(scsi_cmnd), in lpfc_bg_scsi_prep_dma_buf_s4()
3426 scsi_prot_sg_count(scsi_cmnd), datadir); in lpfc_bg_scsi_prep_dma_buf_s4()
3428 scsi_dma_unmap(scsi_cmnd); in lpfc_bg_scsi_prep_dma_buf_s4()
3441 num_sge = lpfc_bg_setup_sgl_prot(phba, scsi_cmnd, sgl, in lpfc_bg_scsi_prep_dma_buf_s4()
3452 scsi_dma_unmap(scsi_cmnd); in lpfc_bg_scsi_prep_dma_buf_s4()
3462 switch (scsi_get_prot_op(scsi_cmnd)) { in lpfc_bg_scsi_prep_dma_buf_s4()
3491 scsi_cmnd->device->hostdata)->oas_enabled) in lpfc_bg_scsi_prep_dma_buf_s4()
3497 scsi_dma_unmap(scsi_cmnd); in lpfc_bg_scsi_prep_dma_buf_s4()
3499 dma_unmap_sg(&phba->pcidev->dev, scsi_prot_sglist(scsi_cmnd), in lpfc_bg_scsi_prep_dma_buf_s4()
3500 scsi_prot_sg_count(scsi_cmnd), in lpfc_bg_scsi_prep_dma_buf_s4()
3501 scsi_cmnd->sc_data_direction); in lpfc_bg_scsi_prep_dma_buf_s4()
3565 struct scsi_cmnd *cmnd = lpfc_cmd->pCmd; in lpfc_send_scsi_error_event()
3686 struct scsi_cmnd *cmnd = lpfc_cmd->pCmd; in lpfc_handle_fcp_err()
3867 struct scsi_cmnd *cmd; in lpfc_scsi_cmd_iocb_cmpl()
4161 struct scsi_cmnd *scsi_cmnd = lpfc_cmd->pCmd; in lpfc_scsi_prep_cmnd() local
4165 int datadir = scsi_cmnd->sc_data_direction; in lpfc_scsi_prep_cmnd()
4181 memcpy(ptr, scsi_cmnd->cmnd, scsi_cmnd->cmd_len); in lpfc_scsi_prep_cmnd()
4182 if (scsi_cmnd->cmd_len < LPFC_FCP_CDB_LEN) { in lpfc_scsi_prep_cmnd()
4183 ptr += scsi_cmnd->cmd_len; in lpfc_scsi_prep_cmnd()
4184 memset(ptr, 0, (LPFC_FCP_CDB_LEN - scsi_cmnd->cmd_len)); in lpfc_scsi_prep_cmnd()
4198 if (scsi_sg_count(scsi_cmnd)) { in lpfc_scsi_prep_cmnd()
4204 fcpdl = scsi_bufflen(scsi_cmnd); in lpfc_scsi_prep_cmnd()
4497 lpfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd) in lpfc_queuecommand()
4649 lpfc_abort_handler(struct scsi_cmnd *cmnd) in lpfc_abort_handler()
5016 lpfc_chk_tgt_mapped(struct lpfc_vport *vport, struct scsi_cmnd *cmnd) in lpfc_chk_tgt_mapped()
5109 lpfc_device_reset_handler(struct scsi_cmnd *cmnd) in lpfc_device_reset_handler()
5180 lpfc_target_reset_handler(struct scsi_cmnd *cmnd) in lpfc_target_reset_handler()
5257 lpfc_bus_reset_handler(struct scsi_cmnd *cmnd) in lpfc_bus_reset_handler()
5348 lpfc_host_reset_handler(struct scsi_cmnd *cmnd) in lpfc_host_reset_handler()