assert(!cmnd->conn->write_size);
BUG_ON(cmnd->conn->write_size);
static int send(struct iscsi_conn *conn){	struct iscsi_cmnd *cmnd = conn->write_cmnd;	int ddigest, res = 0;	ddigest = conn->ddigest_type != DIGEST_NONE ? 1 : 0;	switch (conn->write_state) {	case TX_INIT:		assert(!cmnd);		cmnd = conn->write_cmnd = iscsi_get_send_cmnd(conn);		if (!cmnd)			return 0;		cmnd_tx_start(cmnd);		init_tx_hdigest(cmnd);		conn->write_state = TX_BHS_DATA;	case TX_BHS_DATA:		res = do_send(conn, ddigest && cmnd->pdu.datasize ? TX_INIT_DDIGEST : TX_END);		if (res <= 0 || conn->write_state != TX_INIT_DDIGEST)			break;	case TX_INIT_DDIGEST:		digest_tx_data(cmnd);		assert(!cmnd->conn->write_size);		cmnd->conn->write_size += sizeof(u32);		conn->write_state = TX_DDIGEST;	case TX_DDIGEST:		res = tx_ddigest(cmnd, TX_END);		break;	default:		eprintk("%d %d %x\n", res, conn->write_state, cmnd_opcode(cmnd));		assert(0);	}	if (res <= 0)		return res;	if (conn->write_state != TX_END)		return res;	if (conn->write_size) {		eprintk("%d %x %u\n", res, cmnd_opcode(cmnd), conn->write_size);		assert(!conn->write_size);	}	cmnd_tx_end(cmnd);	cmnd_release(cmnd, 0);	conn->write_cmnd = NULL;	conn->write_state = TX_INIT;	return 0;}