diff options
author | Christoph Hellwig <hch@lst.de> | 2014-06-28 16:41:43 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-07-17 22:11:41 +0200 |
commit | 5158a899d8f24f74cad29b6aaad2b0f86499e5d5 (patch) | |
tree | f5faad5530e2e0e38dcd0bc75777da075976fe29 /drivers/scsi/sd.c | |
parent | scsi: restructure command initialization for TYPE_FS requests (diff) | |
download | linux-5158a899d8f24f74cad29b6aaad2b0f86499e5d5.tar.xz linux-5158a899d8f24f74cad29b6aaad2b0f86499e5d5.zip |
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/sd.c')
-rw-r--r-- | drivers/scsi/sd.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 1b166c7ea891..e2932ea429e2 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -994,14 +994,12 @@ static int sd_init_command(struct scsi_cmnd *SCpnt) goto out; } SCpnt->cmnd[0] = WRITE_6; - SCpnt->sc_data_direction = DMA_TO_DEVICE; if (blk_integrity_rq(rq)) sd_dif_prepare(rq, block, sdp->sector_size); } else if (rq_data_dir(rq) == READ) { SCpnt->cmnd[0] = READ_6; - SCpnt->sc_data_direction = DMA_FROM_DEVICE; } else { scmd_printk(KERN_ERR, SCpnt, "Unknown command %llx\n", (unsigned long long) rq->cmd_flags); goto out; |