On Thu, 10 Feb 2011 11:03:11 -0800 "Nicholas A. Bellinger" <nab@xxxxxxxxxxxxxxx> wrote: > > +static int ibmvscsis_queue_data_in(struct se_cmd *se_cmd) > > +{ > > + struct ibmvscsis_cmnd *cmd = container_of(se_cmd, > > + struct ibmvscsis_cmnd, se_cmd); > > + struct scsi_cmnd *sc = &cmd->sc; > > + /* > > + * Check for overflow residual count > > + */ > > + if (se_cmd->se_cmd_flags & SCF_OVERFLOW_BIT) > > + 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 > > + */ > > + 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); > > + > > + sc->sdb.table.nents = T_TASK(se_cmd)->t_tasks_sg_chained_no; > > + sc->sdb.table.sgl = T_TASK(se_cmd)->t_tasks_sg_chained; > > + } else if (se_cmd->se_cmd_flags & SCF_SCSI_CONTROL_NONSG_IO_CDB) { > > + /* > > + * Use T_TASK(se_cmd)->t_tasks_sg_bounce for control CDBs > > + * using a contigious buffer > > + */ > > + sg_init_table(&T_TASK(se_cmd)->t_tasks_sg_bounce, 1); > > + sg_set_buf(&T_TASK(se_cmd)->t_tasks_sg_bounce, > > + T_TASK(se_cmd)->t_task_buf, se_cmd->data_length); > > + > > + sc->sdb.table.nents = 1; > > + sc->sdb.table.sgl = &T_TASK(se_cmd)->t_tasks_sg_bounce; > > + } > > + /* > > + * Perform the SCSI READ data transfer from sc->sdb.table into > > + * VIO LPAR memory. This will occur via libsrp in the > > + * ibmvscsis_rdma() callback btw, can we kill the non scatter/gather data path? I think that we should always use the scatter/gather data transfer. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html