Lines Matching refs:SCpnt
1364 static void sd_uninit_command(struct scsi_cmnd *SCpnt)
1366 struct request *rq = scsi_cmd_to_rq(SCpnt);
2159 * @SCpnt: mid-level's per command structure.
2163 static int sd_done(struct scsi_cmnd *SCpnt)
2165 int result = SCpnt->result;
2166 unsigned int good_bytes = result ? 0 : scsi_bufflen(SCpnt);
2167 unsigned int sector_size = SCpnt->device->sector_size;
2170 struct request *req = scsi_cmd_to_rq(SCpnt);
2185 scsi_set_resid(SCpnt, 0);
2188 scsi_set_resid(SCpnt, blk_rq_bytes(req));
2197 resid = scsi_get_resid(SCpnt);
2202 scsi_print_command(SCpnt);
2203 resid = min(scsi_bufflen(SCpnt),
2205 scsi_set_resid(SCpnt, resid);
2210 sense_valid = scsi_command_normalize_sense(SCpnt, &sshdr);
2223 good_bytes = sd_completed_bytes(SCpnt);
2226 good_bytes = scsi_bufflen(SCpnt);
2233 SCpnt->result = 0;
2234 memset(SCpnt->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
2238 good_bytes = sd_completed_bytes(SCpnt);
2243 good_bytes = sd_completed_bytes(SCpnt);
2247 switch (SCpnt->cmnd[0]) {
2253 if (SCpnt->cmnd[1] & 8) { /* UNMAP */
2270 good_bytes = sd_zbc_complete(SCpnt, good_bytes, &sshdr);
2272 SCSI_LOG_HLCOMPLETE(1, scmd_printk(KERN_INFO, SCpnt,
2274 good_bytes, scsi_bufflen(SCpnt)));