Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Mar 2006 15:03:21 +0100
From:      damien.bergamini@free.fr
To:        Luigi Rizzo <rizzo@icir.org>
Cc:        Anders Nordby <anders@freebsd.org>, flz@freebsd.org, freebsd-net@freebsd.org, core@freebsd.org, sam@freebsd.org, damien@freebsd.org, Max Laier <max@love2party.net>
Subject:   Re: iwi stability when doing large file transfers/backups
Message-ID:  <1141308201.4406fb29ec693@imp7-g19.free.fr>
In-Reply-To: <20060302052633.B63009@xorpc.icir.org>
References:  <20060301193342.GA11086@totem.fix.no> <20060301115655.A50285@xorpc.icir.org> <200603012150.44445.max@love2party.net> <20060301154342.A53213@xorpc.icir.org> <012501c63dcc$4671e590$0300a8c0@COMETE> <20060302024926.B61112@xorpc.icir.org> <009b01c63dec$9262ea10$0300a8c0@COMETE> <20060302052633.B63009@xorpc.icir.org>

next in thread | previous in thread | raw e-mail | index | archive | help
The one who wrote that diff, whoever he is, obviously don't
understand C code.

Otherwise, why would he write such nonsense:

static uint32_t
iwi_toggle_event(uint32_t r)
{
	r &= ~IWI_RST_STANDBY;
	if (r & IWI_RST_GATE_ODMA)
		r &= ~IWI_RST_GATE_ODMA;
	if (r & IWI_RST_GATE_IDMA)
		r &= ~IWI_RST_GATE_IDMA;
	if (r & IWI_RST_GATE_ADMA)
		r &= ~IWI_RST_GATE_ADMA;
	return r;
}

when you could just write:

r &= ~(IWI_RST_STANDBY | IWI_RST_GATE_ODMA |
       IWI_RST_GATE_IDMA | IWI_RST_GATE_ADMA);

but he sure knows how to steel code from others and
violate the GPL by the way:

>From Linux ipw2200-1.1.0 (GPL):

static u32 ipw_register_toggle(u32 reg)
{
	reg &= ~IPW_START_STANDBY;
	if (reg & IPW_GATE_ODMA)
		reg &= ~IPW_GATE_ODMA;
	if (reg & IPW_GATE_IDMA)
		reg &= ~IPW_GATE_IDMA;
	if (reg & IPW_GATE_ADMA)
		reg &= ~IPW_GATE_ADMA;
	return reg;
}

...mmm very similar right?

Damien



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1141308201.4406fb29ec693>