diff options
author | Christoph Hellwig <hch@infradead.org> | 2012-05-20 11:59:11 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-07-16 17:25:55 -0700 |
commit | 64f1db38c65fa634f4aa21e0f70480a6b8b4d47c (patch) | |
tree | de8a6b08d9230ba7cb69a3c78174b351123747df /drivers/target/loopback | |
parent | cb4f4d3c7398a709b48d397e0520ee2509a953a4 (diff) | |
download | kernel_goldelico_gta04-64f1db38c65fa634f4aa21e0f70480a6b8b4d47c.zip kernel_goldelico_gta04-64f1db38c65fa634f4aa21e0f70480a6b8b4d47c.tar.gz kernel_goldelico_gta04-64f1db38c65fa634f4aa21e0f70480a6b8b4d47c.tar.bz2 |
target: remove control CDB flags
We don't need three flags to classifiy the CDB as we can check for a NULL S/G
list for a dataless command, and can infer from the absence of the data flag
that we deal with a control CDB. Also remove the _SG_IO from the data CDB
flag as all I/O is dont on S/G lists now.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/loopback')
-rw-r--r-- | drivers/target/loopback/tcm_loop.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c index 38dfac2..f65dc9d 100644 --- a/drivers/target/loopback/tcm_loop.c +++ b/drivers/target/loopback/tcm_loop.c @@ -211,12 +211,11 @@ static void tcm_loop_submission_work(struct work_struct *work) /* * Because some userspace code via scsi-generic do not memset their * associated read buffers, go ahead and do that here for type - * SCF_SCSI_CONTROL_SG_IO_CDB. Also note that this is currently - * guaranteed to be a single SGL for SCF_SCSI_CONTROL_SG_IO_CDB - * by target core in target_setup_cmd_from_cdb() -> - * transport_generic_cmd_sequencer(). + * non-data CDBs. Also note that this is currently guaranteed to be a + * single SGL for this case by target core in + * target_setup_cmd_from_cdb() -> transport_generic_cmd_sequencer(). */ - if (se_cmd->se_cmd_flags & SCF_SCSI_CONTROL_SG_IO_CDB && + if (!(se_cmd->se_cmd_flags & SCF_SCSI_DATA_CDB) && se_cmd->data_direction == DMA_FROM_DEVICE) { struct scatterlist *sg = scsi_sglist(sc); unsigned char *buf = kmap(sg_page(sg)) + sg->offset; |