Blame usr/be2iscsi.c

Packit eace71
/*
Packit eace71
 * be2iscsi helpers
Packit eace71
 *
Packit eace71
 * Copyright (C) 2006 Mike Christie
Packit eace71
 * Copyright (C) 2006 Red Hat, Inc. All rights reserved.
Packit eace71
 *
Packit eace71
 * This program is free software; you can redistribute it and/or modify
Packit eace71
 * it under the terms of the GNU General Public License as published
Packit eace71
 * by the Free Software Foundation; either version 2 of the License, or
Packit eace71
 * (at your option) any later version.
Packit eace71
 *
Packit eace71
 * This program is distributed in the hope that it will be useful, but
Packit eace71
 * WITHOUT ANY WARRANTY; without even the implied warranty of
Packit eace71
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Packit eace71
 * General Public License for more details.
Packit eace71
 */
Packit eace71
#include "initiator.h"
Packit eace71
Packit eace71
void be2iscsi_create_conn(struct iscsi_conn *conn)
Packit eace71
{
Packit eace71
	struct iscsi_session *session = conn->session;
Packit eace71
Packit eace71
	if (conn->max_recv_dlength > 65536)
Packit eace71
		conn->max_recv_dlength = 65536;
Packit eace71
Packit eace71
	if (session->first_burst > 8192)
Packit eace71
		session->first_burst = 8192;
Packit eace71
Packit eace71
	if (session->max_burst > 262144)
Packit eace71
		session->max_burst = 262144;
Packit eace71
Packit eace71
	if (conn->max_xmit_dlength > 65536)
Packit eace71
		conn->max_xmit_dlength = 65536;
Packit eace71
Packit eace71
	session->erl = 0;
Packit eace71
	session->initial_r2t_en = 1;
Packit eace71
}