From owner-freebsd-net@FreeBSD.ORG Thu Mar 2 16:57:04 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CD56116A420; Thu, 2 Mar 2006 16:57:04 +0000 (GMT) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id B994743D58; Thu, 2 Mar 2006 16:57:03 +0000 (GMT) (envelope-from sam@errno.com) Received: from [10.0.0.248] (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id k22Guxo7014098 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 2 Mar 2006 08:56:59 -0800 (PST) (envelope-from sam@errno.com) Message-ID: <4407249C.6070201@errno.com> Date: Thu, 02 Mar 2006 09:00:12 -0800 From: Sam Leffler User-Agent: Thunderbird 1.5 (X11/20060210) MIME-Version: 1.0 To: damien.bergamini@free.fr 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> <1141308201.4406fb29ec693@imp7-g19.free.fr> In-Reply-To: <1141308201.4406fb29ec693@imp7-g19.free.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Anders Nordby , flz@freebsd.org, Luigi Rizzo , core@freebsd.org, sam@freebsd.org, damien@freebsd.org, freebsd-net@freebsd.org, Max Laier Subject: Re: iwi stability when doing large file transfers/backups X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Mar 2006 16:57:05 -0000 damien.bergamini@free.fr wrote: > 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? I'm glad you see ways to improve the code. As to concerns about GPL contamination you are way off base. Oh and of course I wrote this code--as you knew all along. Sam