On Fri, 2012-03-30 at 11:29 -0700, Roland Dreier wrote: > From: Roland Dreier <roland@xxxxxxxxxxxxxxx> > > With the modern target core, se_cmd->t_data_sg already points to a > sglist that covers the whole command. So task_sg chaining is needless > overhead and obfuscation -- instead of splicing the split up task > sglists back into one list, we can just use the original list directly. > > Signed-off-by: Roland Dreier <roland@xxxxxxxxxxxxxxx> > --- I've not hand a chance to fire up the p505 recently, so this driver is likely have some other issues. This patch looks fine to me. Applied to lio-core.git, and Cc'ing Tomo-san here. Thanks Roland! --nab > drivers/scsi/ibmvscsi/ibmvscsis.c | 18 ++++-------------- > 1 files changed, 4 insertions(+), 14 deletions(-) > > diff --git a/drivers/scsi/ibmvscsi/ibmvscsis.c b/drivers/scsi/ibmvscsi/ibmvscsis.c > index 9ae8b83..20a0412 100644 > --- a/drivers/scsi/ibmvscsi/ibmvscsis.c > +++ b/drivers/scsi/ibmvscsi/ibmvscsis.c > @@ -417,7 +417,6 @@ static int ibmvscsis_queue_status(struct se_cmd *se_cmd); > static int ibmvscsis_check_stop_free(struct se_cmd *se_cmd); > > static struct target_core_fabric_ops ibmvscsis_ops = { > - .task_sg_chaining = 1, > .get_fabric_name = ibmvscsis_get_fabric_name, > .get_fabric_proto_ident = ibmvscsis_get_fabric_proto_ident, > .tpg_get_wwn = ibmvscsis_get_fabric_wwn, > @@ -1223,11 +1222,8 @@ static int ibmvscsis_write_pending(struct se_cmd *se_cmd) > int ret; > > sc->sdb.length = se_cmd->data_length; > - > - transport_do_task_sg_chain(se_cmd); > - > - sc->sdb.table.nents = se_cmd->t_tasks_sg_chained_no; > - sc->sdb.table.sgl = se_cmd->t_tasks_sg_chained; > + sc->sdb.table.nents = se_cmd->t_data_nents; > + sc->sdb.table.sgl = se_cmd->t_data_sg; > > ret = srp_transfer_data(sc, &vio_iu(iue)->srp.cmd, > ibmvscsis_rdma, 1, 1); > @@ -1255,14 +1251,8 @@ static int ibmvscsis_queue_data_in(struct se_cmd *se_cmd) > scsi_set_resid(sc, se_cmd->residual_count); > > sc->sdb.length = se_cmd->data_length; > - > - /* > - * Setup the struct se_task->task_sg[] chained SG list > - */ > - transport_do_task_sg_chain(se_cmd); > - > - sc->sdb.table.nents = se_cmd->t_tasks_sg_chained_no; > - sc->sdb.table.sgl = se_cmd->t_tasks_sg_chained; > + sc->sdb.table.nents = se_cmd->t_data_nents; > + sc->sdb.table.sgl = se_cmd->t_data_sg; > > /* > * This will call srp_transfer_data() and post the response -- 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