sf(4) device polling

Ruslan Ermilov ru at FreeBSD.ORG
Wed Nov 10 00:14:08 PST 2004


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.
> 
> I'd appreciate it, when someone could review/commit this.
> 
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,
-- 
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20041110/ae3a564e/attachment.bin


More information about the freebsd-net mailing list