Re: [patch] Re: 2.3.49 - rrunner does not build too...

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Fri Mar 03 2000 - 18:13:17 EST


Val Henson wrote:
>
> On Fri, 3 Mar 2000, Sergey Kubushin wrote:
>
> > gcc -D__KERNEL__ -I/tmp/build-kernel/usr/src/linux-2.3.49/include -D__SMP__ -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -DCPU=686 -march=pentiumpro -mcpu=pentiumpro -bi686-ksi-linux -fno-strict-aliasing -DMODULE -DMODVERSIONS -include /tmp/build-kernel/usr/src/linux-2.3.49/include/linux/modversions.h -c -o rrunner.o rrunner.c
> > rrunner.c: In function `rr_interrupt':
> > rrunner.c:1060: `LINK_STATE_XOFF' undeclared (first use in this function)
> > rrunner.c:1060: (Each undeclared identifier is reported only once
> > rrunner.c:1060: for each function it appears in.)
>
> Ah, more exciting netdevice.h changes between 2.3.46 and 2.3.48. Please
> try this:
>
> diff -ur linux-2.3.49/drivers/net/rrunner.c linux/drivers/net/rrunner.c
> --- linux-2.3.49/drivers/net/rrunner.c Fri Mar 3 13:27:35 2000
> +++ linux/drivers/net/rrunner.c Fri Mar 3 13:27:44 2000
> @@ -76,8 +76,8 @@
> #else
> #define NET_BH 0
> #define rr_mark_net_bh(foo) {do{} while(0);}
> -#define rr_if_busy(dev) test_bit(LINK_STATE_XOFF, &dev->state)
> -#define rr_if_running(dev) test_bit(LINK_STATE_START, &dev->state)
> +#define rr_if_busy(dev) netif_queue_stopped(dev)
> +#define rr_if_running(dev) netif_running(dev)
> #define rr_if_down(dev) {do{} while(0);}
> #endif

Urg.... This is precisely what we are trying to move __away__ from in
2.3.x.

The code at the top should look like

        #if old_kernel_version
        #define netif_running(dev) ...
        #endif

You should not be wrapping standard kernel functions as it only serves
to obscure the code.

        Jeff

-- 
Jeff Garzik              | Rule 1:
Building 1024            | There is no cabal.
MandrakeSoft, Inc.       |

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Mar 07 2000 - 21:00:16 EST