Lines Matching refs:scmd

778 static unsigned char sd_setup_protect_cmnd(struct scsi_cmnd *scmd,  in sd_setup_protect_cmnd()  argument
781 struct request *rq = scsi_cmd_to_rq(scmd); in sd_setup_protect_cmnd()
788 scmd->prot_flags |= SCSI_PROT_IP_CHECKSUM; in sd_setup_protect_cmnd()
791 scmd->prot_flags |= SCSI_PROT_GUARD_CHECK; in sd_setup_protect_cmnd()
795 scmd->prot_flags |= SCSI_PROT_REF_INCREMENT; in sd_setup_protect_cmnd()
798 scmd->prot_flags |= SCSI_PROT_REF_CHECK; in sd_setup_protect_cmnd()
802 scmd->prot_flags |= SCSI_PROT_TRANSFER_PI; in sd_setup_protect_cmnd()
810 scsi_set_prot_op(scmd, prot_op); in sd_setup_protect_cmnd()
811 scsi_set_prot_type(scmd, dif); in sd_setup_protect_cmnd()
812 scmd->prot_flags &= sd_prot_flag_mask(prot_op); in sd_setup_protect_cmnd()
1918 static void sd_eh_reset(struct scsi_cmnd *scmd) in sd_eh_reset() argument
1920 struct scsi_disk *sdkp = scsi_disk(scsi_cmd_to_rq(scmd)->rq_disk); in sd_eh_reset()
1938 static int sd_eh_action(struct scsi_cmnd *scmd, int eh_disp) in sd_eh_action() argument
1940 struct scsi_disk *sdkp = scsi_disk(scsi_cmd_to_rq(scmd)->rq_disk); in sd_eh_action()
1941 struct scsi_device *sdev = scmd->device; in sd_eh_action()
1944 !scsi_medium_access_command(scmd) || in sd_eh_action()
1945 host_byte(scmd->result) != DID_TIME_OUT || in sd_eh_action()
1967 scmd_printk(KERN_ERR, scmd, in sd_eh_action()
1979 static unsigned int sd_completed_bytes(struct scsi_cmnd *scmd) in sd_completed_bytes() argument
1981 struct request *req = scsi_cmd_to_rq(scmd); in sd_completed_bytes()
1982 struct scsi_device *sdev = scmd->device; in sd_completed_bytes()
1990 if (scsi_bufflen(scmd) <= sdev->sector_size) in sd_completed_bytes()
1994 if (!scsi_get_sense_info_fld(scmd->sense_buffer, in sd_completed_bytes()
2004 end_lba = start_lba + bytes_to_logical(sdev, scsi_bufflen(scmd)); in sd_completed_bytes()
2012 transferred = scsi_bufflen(scmd) - scsi_get_resid(scmd); in sd_completed_bytes()