Lines Matching defs:scmd
781 static unsigned char sd_setup_protect_cmnd(struct scsi_cmnd *scmd,
784 struct bio *bio = scmd->request->bio;
785 unsigned int prot_op = sd_prot_op(rq_data_dir(scmd->request), dix, dif);
790 scmd->prot_flags |= SCSI_PROT_IP_CHECKSUM;
793 scmd->prot_flags |= SCSI_PROT_GUARD_CHECK;
797 scmd->prot_flags |= SCSI_PROT_REF_INCREMENT;
800 scmd->prot_flags |= SCSI_PROT_REF_CHECK;
804 scmd->prot_flags |= SCSI_PROT_TRANSFER_PI;
812 scsi_set_prot_op(scmd, prot_op);
813 scsi_set_prot_type(scmd, dif);
814 scmd->prot_flags &= sd_prot_flag_mask(prot_op);
1915 * @scmd: sd-issued command that has failed
1925 static void sd_eh_reset(struct scsi_cmnd *scmd)
1927 struct scsi_disk *sdkp = scsi_disk(scmd->request->rq_disk);
1935 * @scmd: sd-issued command that has failed
1945 static int sd_eh_action(struct scsi_cmnd *scmd, int eh_disp)
1947 struct scsi_disk *sdkp = scsi_disk(scmd->request->rq_disk);
1948 struct scsi_device *sdev = scmd->device;
1951 !scsi_medium_access_command(scmd) ||
1952 host_byte(scmd->result) != DID_TIME_OUT ||
1974 scmd_printk(KERN_ERR, scmd,
1986 static unsigned int sd_completed_bytes(struct scsi_cmnd *scmd)
1988 struct request *req = scmd->request;
1989 struct scsi_device *sdev = scmd->device;
1997 if (scsi_bufflen(scmd) <= sdev->sector_size)
2001 if (!scsi_get_sense_info_fld(scmd->sense_buffer,
2011 end_lba = start_lba + bytes_to_logical(sdev, scsi_bufflen(scmd));
2019 transferred = scsi_bufflen(scmd) - scsi_get_resid(scmd);