summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sr.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2014-06-28 16:41:43 +0200
committerChristoph Hellwig <hch@lst.de>2014-07-17 22:11:41 +0200
commit5158a899d8f24f74cad29b6aaad2b0f86499e5d5 (patch)
treef5faad5530e2e0e38dcd0bc75777da075976fe29 /drivers/scsi/sr.c
parent3868cf8ea70a57fc3f927872d8296f287ce4b96a (diff)
downloadop-kernel-dev-5158a899d8f24f74cad29b6aaad2b0f86499e5d5.zip
op-kernel-dev-5158a899d8f24f74cad29b6aaad2b0f86499e5d5.tar.gz
scsi: set sc_data_direction in common code
The data direction fiel in the SCSI command is derived only from the block request structure. Move setting it up into common code instead of duplicating it in the ULDs. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Hannes Reinecke <hare@suse.de>
Diffstat (limited to 'drivers/scsi/sr.c')
-rw-r--r--drivers/scsi/sr.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c
index 9feeb37..cce47712 100644
--- a/drivers/scsi/sr.c
+++ b/drivers/scsi/sr.c
@@ -438,11 +438,9 @@ static int sr_init_command(struct scsi_cmnd *SCpnt)
if (!cd->device->writeable)
goto out;
SCpnt->cmnd[0] = WRITE_10;
- SCpnt->sc_data_direction = DMA_TO_DEVICE;
cd->cdi.media_written = 1;
} else if (rq_data_dir(rq) == READ) {
SCpnt->cmnd[0] = READ_10;
- SCpnt->sc_data_direction = DMA_FROM_DEVICE;
} else {
blk_dump_rq_flags(rq, "Unknown sr command");
goto out;
OpenPOWER on IntegriCloud