From owner-freebsd-net@FreeBSD.ORG Wed Nov 10 08:14:08 2004 Return-Path: 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 B2FC816A4CE for ; Wed, 10 Nov 2004 08:14:08 +0000 (GMT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id E25E743D39 for ; Wed, 10 Nov 2004 08:14:07 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id iAA8E6XC072790; Wed, 10 Nov 2004 10:14:06 +0200 (EET) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ipnet [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 90649-09; Wed, 10 Nov 2004 10:14:05 +0200 (EET) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id iAA8E51C072784 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 10 Nov 2004 10:14:05 +0200 (EET) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.1/8.13.1) id iAA8DeZC093154; Wed, 10 Nov 2004 10:13:40 +0200 (EET) (envelope-from ru) Date: Wed, 10 Nov 2004 10:13:40 +0200 From: Ruslan Ermilov To: Christian Brueffer Message-ID: <20041110081340.GD65475@ip.net.ua> References: <20041109164942.GC555@unixpages.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="i7F3eY7HS/tUJxUd" Content-Disposition: inline In-Reply-To: <20041109164942.GC555@unixpages.org> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at ip.net.ua cc: net@FreeBSD.ORG Subject: Re: sf(4) device polling X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Nov 2004 08:14:08 -0000 --i7F3eY7HS/tUJxUd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Christian, On Tue, Nov 09, 2004 at 05:49:42PM +0100, Christian Brueffer wrote: > the attached patch implements device polling for the sf(4) driver. It > has been running on my home gateway for almost two weeks now, without any > ill effects. >=20 > I'd appreciate it, when someone could review/commit this. >=20 Unfortunately, I cannot give this patch a real testing as I don't have the hardware in question, but I did the code inspection and found only three bugs. ;) 1. The done_locked: label should be put in #ifdef DEVICE_POLLING, or it will cause compile-time warning if compiling without the DEVICE_POLLING option. 2. The condition to call if_start() in sf_poll_locked() was broken twice: there's an extra semicolon at the end of the "if" line, and while this conditional is valid for ALTQ, it's not for this driver, as it doesn't yet support it (perhaps your local version of the driver does). 3. The POLL_AND_CHECK_STATUS command handler is wrong: you use 16-bit status variable where 32-bit is necessary, and you don't do any error-recovering that sf_intr() does. I blindly fixed this, but I cannot test it on a real hardware. I also "fixed" the #endif's. ;) An updated patch can be found here: http://people.freebsd.org/~ru/patches/if_sf.patch Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --i7F3eY7HS/tUJxUd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBkc20qRfpzJluFF4RAmqFAJ0bFz8DMUsbNBdQUkZnebr6wepRewCfRCY/ A42N1F0oCEfZygGBKKskGz0= =+7aa -----END PGP SIGNATURE----- --i7F3eY7HS/tUJxUd--