Source
387
387
static blk_status_t sr_init_command(struct scsi_cmnd *SCpnt)
388
388
{
389
389
int block = 0, this_count, s_size;
390
390
struct scsi_cd *cd;
391
391
struct request *rq = SCpnt->request;
392
392
blk_status_t ret;
393
393
394
394
ret = scsi_init_io(SCpnt);
395
395
if (ret != BLK_STS_OK)
396
396
goto out;
397
-
WARN_ON_ONCE(SCpnt != rq->special);
398
397
cd = scsi_cd(rq->rq_disk);
399
398
400
399
/* from here on until we're complete, any goto out
401
400
* is used for a killable error condition */
402
401
ret = BLK_STS_IOERR;
403
402
404
403
SCSI_LOG_HLQUEUE(1, scmd_printk(KERN_INFO, SCpnt,
405
404
"Doing sr request, block = %d\n", block));
406
405
407
406
if (!cd->device || !scsi_device_online(cd->device)) {