On Fri, 2011-10-14 at 07:30 -0400, Christoph Hellwig wrote: > Now that all commands that transfer data use SG lists there is no reasons for > drivers to check these flags from the read/write path as we'll never get > anyting else. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> > > Index: lio-core/drivers/target/tcm_qla2xxx/tcm_qla2xxx_fabric.c > =================================================================== > --- lio-core.orig/drivers/target/tcm_qla2xxx/tcm_qla2xxx_fabric.c 2011-10-14 11:50:45.824395240 +0200 > +++ lio-core/drivers/target/tcm_qla2xxx/tcm_qla2xxx_fabric.c 2011-10-14 11:53:22.315895457 +0200 > @@ -623,20 +623,12 @@ int tcm_qla2xxx_write_pending(struct se_ > > cmd->bufflen = se_cmd->data_length; > cmd->dma_data_direction = tcm_qla2xxx_mapping_dir(se_cmd); > + > /* > * Setup the struct se_task->task_sg[] chained SG list > */ > - if ((se_cmd->se_cmd_flags & SCF_SCSI_DATA_SG_IO_CDB) || > - (se_cmd->se_cmd_flags & SCF_SCSI_CONTROL_SG_IO_CDB)) { > - transport_do_task_sg_chain(se_cmd); > + transport_do_task_sg_chain(se_cmd); > > - cmd->sg_cnt = se_cmd->t_tasks_sg_chained_no; > - cmd->sg = se_cmd->t_tasks_sg_chained; > - } else { > - pr_err("Unknown se_cmd_flags: 0x%08x in" > - " tcm_qla2xxx_write_pending()\n", se_cmd->se_cmd_flags); > - BUG(); > - } > /* Actually, just ran into a BUG() here due to the missing cmd->sg_cnt and cmd->sg assignments.. Fixing this up in tcm_qla2xxx_write_pending() now. --nab -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html