void iscsi_conn_stop(struct iscsi_cls_conn *cls_conn, int flag)
{
	struct iscsi_conn *conn = cls_conn->dd_data;
	struct iscsi_session *session = conn->session;

	switch (flag) {
	case STOP_CONN_RECOVER:
		cls_conn->state = ISCSI_CONN_FAILED;
		break;
	case STOP_CONN_TERM:
		cls_conn->state = ISCSI_CONN_DOWN;
		break;
	default:
		iscsi_conn_printk(KERN_ERR, conn,
				  "invalid stop flag %d\n", flag);
		return;
	}

	iscsi_start_session_recovery(session, conn, flag);
}
void iscsi_conn_stop(struct iscsi_cls_conn *cls_conn, int flag)
{
	struct iscsi_conn *conn = cls_conn->dd_data;
	struct iscsi_session *session = conn->session;

	switch (flag) {
	case STOP_CONN_RECOVER:
		cls_conn->state = ISCSI_CONN_FAILED;
		break;
	case STOP_CONN_TERM:
		cls_conn->state = ISCSI_CONN_DOWN;
		break;
	default:
		iscsi_conn_printk(KERN_ERR, conn,
				  "invalid stop flag %d\n", flag);
		return;
	}

	iscsi_start_session_recovery(session, conn, flag);
}