assert(cmnd->tc);
BUG_ON(!cmnd->tc);
static void do_send_data_rsp(struct iscsi_cmnd *cmnd){	struct iscsi_conn *conn = cmnd->conn;	struct iscsi_cmnd *data_cmnd;	struct scatterlist *sg = cmnd->tc->sg;	struct iscsi_cmd *req = cmnd_hdr(cmnd);	struct iscsi_data_rsp *rsp;	u32 pdusize, expsize, scsisize, size, offset, sn;	LIST_HEAD(send);	dprintk(D_GENERIC, "%p\n", cmnd);	pdusize = conn->session->param.max_xmit_data_length;	expsize = cmnd_read_size(cmnd);	assert(cmnd->tc);	size = min(expsize, cmnd->tc->bufflen);	eprintk("%u %u\n", expsize, cmnd->tc->bufflen);	offset = 0;	sn = 0;	assert(sg);	while (1) {		data_cmnd = iscsi_cmnd_create_rsp_cmnd(cmnd, size <= pdusize);		data_cmnd->sg = sg;		rsp = (struct iscsi_data_rsp *)&data_cmnd->pdu.bhs;		rsp->opcode = ISCSI_OP_SCSI_DATA_IN;		rsp->itt = req->itt;		rsp->ttt = cpu_to_be32(ISCSI_RESERVED_TAG);		rsp->offset = offset;		rsp->datasn = cpu_to_be32(sn);		if (size <= pdusize) {			data_cmnd->pdu.datasize = size;			rsp->flags = ISCSI_FLAG_CMD_FINAL |				     ISCSI_FLAG_DATA_STATUS;			scsisize = cmnd->tc->bufflen;			if (scsisize < expsize) {				rsp->flags |= ISCSI_FLAG_CMD_UNDERFLOW;				size = expsize - scsisize;			} else if (scsisize > expsize) {				rsp->flags |= ISCSI_FLAG_CMD_OVERFLOW;				size = scsisize - expsize;			} else				size = 0;			rsp->residual_count = cpu_to_be32(size);			list_add_tail(&data_cmnd->list, &send);			break;		}		data_cmnd->pdu.datasize = pdusize;		size -= pdusize;		offset += pdusize;		sn++;		list_add_tail(&data_cmnd->list, &send);	}	iscsi_cmnds_init_write(&send);}