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>
This commit is contained in:

committed by
Nicholas Bellinger

parent
cb4f4d3c73
commit
64f1db38c6
@@ -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;
|
||||
|
Reference in New Issue
Block a user