assert(cmnd);
BUG_ON(!cmnd);
void cmnd_tx_start(struct iscsi_cmnd *cmnd){	struct iscsi_conn *conn = cmnd->conn;	struct iovec *iop;	dprintk(D_GENERIC, "%p:%x\n", cmnd, cmnd_opcode(cmnd));	assert(cmnd);	iscsi_cmnd_set_length(&cmnd->pdu);	set_cork(conn->sock, 1);	conn->write_iop = iop = conn->write_iov;	iop->iov_base = &cmnd->pdu.bhs;	iop->iov_len = sizeof(cmnd->pdu.bhs);	iop++;	conn->write_size = sizeof(cmnd->pdu.bhs);	switch (cmnd_opcode(cmnd)) {	case ISCSI_OP_NOOP_IN:		cmnd_set_sn(cmnd, 1);		cmnd_send_pdu(conn, cmnd);		break;	case ISCSI_OP_SCSI_CMD_RSP:		cmnd_set_sn(cmnd, 1);		cmnd_send_pdu(conn, cmnd);		break;	case ISCSI_OP_SCSI_TMFUNC_RSP:		cmnd_set_sn(cmnd, 1);		break;	case ISCSI_OP_TEXT_RSP:		cmnd_set_sn(cmnd, 1);		break;	case ISCSI_OP_SCSI_DATA_IN:	{		struct iscsi_data_rsp *rsp = (struct iscsi_data_rsp *)&cmnd->pdu.bhs;		u32 offset;		cmnd_set_sn(cmnd, (rsp->flags & ISCSI_FLAG_CMD_FINAL) ? 1 : 0);		offset = rsp->offset;		rsp->offset = cpu_to_be32(offset);		assert(cmnd->sg);		__cmnd_send_pdu(conn, cmnd->sg, offset, cmnd->pdu.datasize);		break;	}	case ISCSI_OP_LOGOUT_RSP:		cmnd_set_sn(cmnd, 1);		break;	case ISCSI_OP_R2T:		cmnd_set_sn(cmnd, 0);		cmnd->pdu.bhs.statsn = cpu_to_be32(conn->stat_sn);		break;	case ISCSI_OP_ASYNC_EVENT:		cmnd_set_sn(cmnd, 1);		break;	case ISCSI_OP_REJECT:		cmnd_set_sn(cmnd, 1);		cmnd_send_pdu(conn, cmnd);		break;	default:		eprintk("unexpected cmnd op %x\n", cmnd_opcode(cmnd));		break;	}	iop->iov_len = 0;	// move this?	conn->write_size = (conn->write_size + 3) & -4;	iscsi_dump_pdu(&cmnd->pdu);}