From: Dominique L. <Dom...@TM...> - 2009-02-19 09:06:59
|
Hi, Just downloaded the latest tarball and trying to build the new rpms for openSUSE. So far no luck. the vmxnet module seems not to be building anymore: Build error: + make -C /usr/src/linux-obj/i586/debug modules M=/usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet VM_CCVER=4.3 HEADER_DIR=/usr/src/linux-obj/i386/default/include SRCROOT=/usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet make: Entering directory `/usr/src/linux-2.6.29-rc5-1-obj/i386/debug' make -C ../../../linux-2.6.29-rc5-1 O=/usr/src/linux-2.6.29-rc5-1-obj/i386/debug/. modules Using 2.6.x kernel build system. CC [M] /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.o /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c: In function 'vmxnet_change_mtu': /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c:201: error: 'struct net_device' has no member named 'priv' /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c: In function 'vmxnet_get_drvinfo': /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c:275: error: 'struct net_device' has no member named 'priv' /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c: In function 'vmxnet_set_tso': /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c:313: error: 'struct net_device' has no member named 'priv' /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c: In function 'vmxnet_link_check': /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c:667: error: 'struct net_device' has no member named 'priv' /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c: In function 'vmxnet_probe_device': /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c:848: error: 'struct net_device' has no member named 'priv' /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c: In function 'vmxnet_remove_device': /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c:1136: error: 'struct net_device' has no member named 'priv' /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c: In function 'vmxnet_init_ring': /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c:1210: error: 'struct net_device' has no member named 'priv' /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c: In function 'vmxnet_open': /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c:1338: error: 'struct net_device' has no member named 'priv' /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c: In function 'check_tx_queue': /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c:1592: error: 'struct net_device' has no member named 'priv' /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c: In function 'vmxnet_tx': /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c:1660: error: 'struct net_device' has no member named 'priv' /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c: In function 'vmxnet_rx': /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c:2060: error: 'struct net_device' has no member named 'priv' /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c: In function 'vmxnet_interrupt': /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c:2190: error: 'struct net_device' has no member named 'priv' /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c: In function 'vmxnet_close': /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c:2272: error: 'struct net_device' has no member named 'priv' /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c: In function 'vmxnet_load_multicast': /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c:2365: error: 'struct net_device' has no member named 'priv' /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c: In function 'vmxnet_set_multicast_list': /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c:2426: error: 'struct net_device' has no member named 'priv' /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c: In function 'vmxnet_get_stats': /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.c:2506: error: 'struct net_device' has no member named 'priv' make[3]: *** [/usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.o] Error 1 make[2]: *** [_module_/usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet] Error 2 make[1]: *** [sub-make] Error 2 make: *** [all] Error 2 make: Leaving directory `/usr/src/linux-2.6.29-rc5-1-obj/i386/debug' error: Bad exit status from /var/tmp/rpm-tmp.91495 (%build) Anything you can do out of this? Dominique |
From: Dominique L. <Dom...@TM...> - 2009-02-19 09:36:05
|
>>> On 2/19/2009 at 10:06 AM, "Dominique Leuenberger" <Dom...@TM...> wrote: > Hi, > > Just downloaded the latest tarball and trying to build the new rpms for > openSUSE. So far no luck. the vmxnet module seems not to be building > anymore: > > Build error: > + make -C /usr/src/linux-obj/i586/debug modules > M=/usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet VM_CCVER=4.3 > HEADER_DIR=/usr/src/linux-obj/i386/default/include > SRCROOT=/usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet > make: Entering directory `/usr/src/linux-2.6.29-rc5-1-obj/i386/debug' > make -C ../../../linux-2.6.29-rc5-1 O=/usr/src/linux-2.6.29-rc5-1-obj/i386/debug/. > modules > Using 2.6.x kernel build system. > CC [M] /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.o Skipping vmxnet and testing what else happens, I also run into issues compiling vmxnet3: make: Entering directory `/usr/src/linux-2.6.29-rc5-1-obj/i386/debug' make -C ../../../linux-2.6.29-rc5-1 O=/usr/src/linux-2.6.29-rc5-1-obj/i386/debug/. modules Using 2.6.x kernel build system. CC [M] /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet3/vmxnet3.o /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet3/vmxnet3.c: In function 'vmxnet3_poll': /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet3/vmxnet3.c:389: warning: passing argument 1 of 'netif_rx_complete' from incompatible pointer type /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet3/vmxnet3.c:389: error: too many arguments to function 'netif_rx_complete' /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet3/vmxnet3.c: In function 'vmxnet3_intr': /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet3/vmxnet3.c:455: error: 'struct net_device' has no member named 'priv' /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet3/vmxnet3.c:471: warning: passing argument 1 of 'netif_rx_schedule' from incompatible pointer type /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet3/vmxnet3.c:471: error: too many arguments to function 'netif_rx_schedule' make[3]: *** [/usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet3/vmxnet3.o] Error 1 make[2]: *** [_module_/usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet3] Error 2 make[1]: *** [sub-make] Error 2 make: *** [all] Error 2 make: Leaving directory `/usr/src/linux-2.6.29-rc5-1-obj/i386/debug' error: Bad exit status from /var/tmp/rpm-tmp.49505 (%build) |
From: Dmitry T. <dt...@vm...> - 2009-02-23 20:20:15
|
On Thursday 19 February 2009 01:35:43 Dominique Leuenberger wrote: > >>> On 2/19/2009 at 10:06 AM, "Dominique Leuenberger" > > <Dom...@TM...> wrote: > > Hi, > > > > Just downloaded the latest tarball and trying to build the new rpms for > > openSUSE. So far no luck. the vmxnet module seems not to be building > > anymore: > > > > Build error: > > + make -C /usr/src/linux-obj/i586/debug modules > > M=/usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet VM_CCVER=4.3 > > HEADER_DIR=/usr/src/linux-obj/i386/default/include > > SRCROOT=/usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet > > make: Entering directory `/usr/src/linux-2.6.29-rc5-1-obj/i386/debug' > > make -C ../../../linux-2.6.29-rc5-1 > > O=/usr/src/linux-2.6.29-rc5-1-obj/i386/debug/. modules > > Using 2.6.x kernel build system. > > CC [M] /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet/vmxnet.o > > Skipping vmxnet and testing what else happens, I also run into issues > compiling vmxnet3: > > make: Entering directory `/usr/src/linux-2.6.29-rc5-1-obj/i386/debug' > make -C ../../../linux-2.6.29-rc5-1 > O=/usr/src/linux-2.6.29-rc5-1-obj/i386/debug/. modules Using 2.6.x kernel > build system. > CC [M] /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet3/vmxnet3.o > /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet3/vmxnet3.c: In > function 'vmxnet3_poll': > /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet3/vmxnet3.c:389: > warning: passing argument 1 of 'netif_rx_complete' from incompatible > pointer type > /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet3/vmxnet3.c:389: > error: too many arguments to function 'netif_rx_complete' > /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet3/vmxnet3.c: In > function 'vmxnet3_intr': > /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet3/vmxnet3.c:455: > error: 'struct net_device' has no member named 'priv' > /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet3/vmxnet3.c:471: > warning: passing argument 1 of 'netif_rx_schedule' from incompatible > pointer type > /usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet3/vmxnet3.c:471: > error: too many arguments to function 'netif_rx_schedule' make[3]: *** > [/usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet3/vmxnet3.o] Error 1 > make[2]: *** > [_module_/usr/src/packages/BUILD/obj/debug/modules/linux/vmxnet3] Error 2 > make[1]: *** [sub-make] Error 2 > make: *** [all] Error 2 > make: Leaving directory `/usr/src/linux-2.6.29-rc5-1-obj/i386/debug' > error: Bad exit status from /var/tmp/rpm-tmp.49505 (%build) > Dominique, The following patch should help with vmxnet3 compilation. I rediffed it against the 2009.02.18 release so it should apply better than the vmxnet patch. -- Dmitry diff -urN a/modules/linux/vmxnet3/autoconf/netif_num_params.c b/modules/linux/vmxnet3/autoconf/netif_num_params.c --- a/modules/linux/vmxnet3/autoconf/netif_num_params.c 1969-12-31 16:00:00.000000000 -0800 +++ b/modules/linux/vmxnet3/autoconf/netif_num_params.c 2009-02-23 11:24:00.000000000 -0800 @@ -0,0 +1,37 @@ +/********************************************************* + * Copyright (C) 2009 VMware, Inc. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation version 2 and no later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + *********************************************************/ + +/* + * Detect whether netif_rx_complete (and netif_rx_schedule) take a single + * napi_struct argument. The foundation was laid whith introducing Generic + * Receive Offload infrastructure but sropping unneeded net_device argument + * did not happen till few commits later so we can't simply test for presence + * of NETIF_F_GRO. + */ + +#include <linux/autoconf.h> +#include <linux/netdevice.h> + +#ifndef NETIF_F_GRO +# error This compile test intentionally fails. +#endif + +void test_netif_rx_complete(struct napi_struct *napi) +{ + netif_rx_complete(napi); +} diff -urN a/modules/linux/vmxnet3/compat_netdevice.h b/modules/linux/vmxnet3/compat_netdevice.h --- a/modules/linux/vmxnet3/compat_netdevice.h 2009-02-18 00:02:40.000000000 -0800 +++ b/modules/linux/vmxnet3/compat_netdevice.h 2009-02-23 11:24:00.000000000 -0800 @@ -178,6 +178,23 @@ # define compat_netdev_priv(netdev) netdev_priv(netdev) #endif +/* + * All compat_* business is good but when we can we should just provide + * missing implementation to ease upstreaming task. + */ +#ifndef HAVE_ALLOC_NETDEV +#define alloc_netdev(sz, name, setup) compat_alloc_netdev(sz, name, setup) +#define alloc_etherdev(sz) compat_alloc_etherdev(sz) +#endif + +#ifndef HAVE_FREE_NETDEV +#define free_netdev(dev) kfree(dev) +#endif + +#ifndef HAVE_NETDEV_PRIV +#define netdev_priv(dev) ((dev)->priv) +#endif + #if defined(NETDEV_TX_OK) # define COMPAT_NETDEV_TX_OK NETDEV_TX_OK # define COMPAT_NETDEV_TX_BUSY NETDEV_TX_BUSY @@ -186,55 +203,56 @@ # define COMPAT_NETDEV_TX_BUSY 1 #endif -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,43)) +#ifndef HAVE_NETIF_QUEUE static inline void -compat_netif_start_queue(struct device *dev) +netif_start_queue(struct device *dev) { clear_bit(0, &dev->tbusy); } static inline void -compat_netif_stop_queue(struct device *dev) +netif_stop_queue(struct device *dev) { set_bit(0, &dev->tbusy); } static inline int -compat_netif_queue_stopped(struct device *dev) +netif_queue_stopped(struct device *dev) { return test_bit(0, &dev->tbusy); } static inline void -compat_netif_wake_queue(struct device *dev) +netif_wake_queue(struct device *dev) { clear_bit(0, &dev->tbusy); mark_bh(NET_BH); } static inline int -compat_netif_running(struct device *dev) +netif_running(struct device *dev) { return dev->start == 0; } static inline int -compat_netif_carrier_ok(struct device *dev) +netif_carrier_ok(struct device *dev) { return 1; } static inline void -compat_netif_carrier_on(struct device *dev) +netif_carrier_on(struct device *dev) { } static inline void -compat_netif_carrier_off(struct device *dev) +netif_carrier_off(struct device *dev) { } +#endif -#else +/* Keep compat_* defines for now */ #define compat_netif_start_queue(dev) netif_start_queue(dev) #define compat_netif_stop_queue(dev) netif_stop_queue(dev) #define compat_netif_queue_stopped(dev) netif_queue_stopped(dev) @@ -243,7 +261,6 @@ #define compat_netif_carrier_ok(dev) netif_carrier_ok(dev) #define compat_netif_carrier_on(dev) netif_carrier_on(dev) #define compat_netif_carrier_off(dev) netif_carrier_off(dev) -#endif /* unregister_netdevice_notifier was not safe prior to 2.6.17 */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 17) && \ @@ -266,7 +283,15 @@ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24) #define compat_netif_napi_add(dev, napi, poll, quota) \ netif_napi_add(dev, napi, poll, quota) + +#ifdef VMW_NETIF_SINGLE_NAPI_PARM +#define compat_netif_rx_complete(dev, napi) netif_rx_complete(napi) +#define compat_netif_rx_schedule(dev, napi) netif_rx_schedule(napi) +#else +#define compat_netif_rx_complete(dev, napi) netif_rx_complete(dev, napi) #define compat_netif_rx_schedule(dev, napi) netif_rx_schedule(dev, napi) +#endif + #define compat_napi_enable(dev, napi) napi_enable(napi) #define compat_napi_disable(dev, napi) napi_disable(napi) #else diff -urN a/modules/linux/vmxnet3/Makefile.kernel b/modules/linux/vmxnet3/Makefile.kernel --- a/modules/linux/vmxnet3/Makefile.kernel 2009-02-18 00:02:40.000000000 -0800 +++ b/modules/linux/vmxnet3/Makefile.kernel 2009-02-23 11:24:00.000000000 -0800 @@ -26,6 +26,7 @@ EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/skblin.c, -DVMW_SKB_LINEARIZE_2618, ) +EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/netif_num_params.c, -DVMW_NETIF_SINGLE_NAPI_PARM, ) obj-m += $(DRIVER).o diff -urN a/modules/linux/vmxnet3/Makefile.normal b/modules/linux/vmxnet3/Makefile.normal --- a/modules/linux/vmxnet3/Makefile.normal 2009-02-18 00:02:40.000000000 -0800 +++ b/modules/linux/vmxnet3/Makefile.normal 2009-02-23 11:24:00.000000000 -0800 @@ -61,6 +61,7 @@ | sed -n -e 's!^APATH!-I$(HEADER_DIR)/asm!p') CC_OPTS += $(call vm_check_build, $(SRCROOT)/autoconf/skblin.c, -DVMW_SKB_LINEARIZE_2618, ) +CC_OPTS += $(call vm_check_build, $(SRCROOT)/autoconf/netif_num_params.c, -DVMW_NETIF_SINGLE_NAPI_PARM, ) OBJS := vmxnet3.o diff -urN a/modules/linux/vmxnet3/vmxnet3.c b/modules/linux/vmxnet3/vmxnet3.c --- a/modules/linux/vmxnet3/vmxnet3.c 2009-02-18 00:02:40.000000000 -0800 +++ b/modules/linux/vmxnet3/vmxnet3.c 2009-02-23 11:24:00.000000000 -0800 @@ -155,7 +155,7 @@ #endif }; -static int disable_lro = 0; +static int disable_lro; /* *---------------------------------------------------------------------------- @@ -381,12 +381,11 @@ { struct vmxnet3_adapter *adapter = container_of(napi, struct vmxnet3_adapter, napi); int rxd_done, txd_done; - struct net_device *netdev = adapter->netdev; vmxnet3_do_poll(adapter, budget, &txd_done, &rxd_done); if (rxd_done < budget) { - netif_rx_complete(netdev, napi); + compat_netif_rx_complete(adapter->netdev, napi); vmxnet3_enable_intr(adapter, 0); } return rxd_done; @@ -410,7 +409,7 @@ vmxnet3_poll(struct net_device *poll_dev, int *budget) { int rxd_done, txd_done, quota; - struct vmxnet3_adapter *adapter = poll_dev->priv; + struct vmxnet3_adapter *adapter = netdev_priv(poll_dev); quota = min(*budget, poll_dev->quota); @@ -452,7 +451,7 @@ #endif { struct net_device *dev = dev_id; - struct vmxnet3_adapter *adapter = dev->priv; + struct vmxnet3_adapter *adapter = netdev_priv(dev); if (UNLIKELY(adapter->intr.type == VMXNET3_IT_INTX)) { uint32 icr = VMXNET3_READ_BAR1_REG(adapter, VMXNET3_REG_ICR); @@ -468,7 +467,7 @@ vmxnet3_disable_intr(adapter, 0); } - compat_netif_rx_schedule(dev, &adapter->napi); + compat_netif_rx_schedule(dev, &adapter->napi); #else vmxnet3_tq_tx_complete(&adapter->tx_queue, adapter); diff -urN a/modules/linux/vmxnet3/vmxnet3_version.h b/modules/linux/vmxnet3/vmxnet3_version.h --- a/modules/linux/vmxnet3/vmxnet3_version.h 2009-02-18 00:02:40.000000000 -0800 +++ b/modules/linux/vmxnet3/vmxnet3_version.h 2009-02-23 11:23:59.000000000 -0800 @@ -25,11 +25,11 @@ #ifndef _VMXNET3_VERSION_H_ #define _VMXNET3_VERSION_H_ -#define VMXNET3_DRIVER_VERSION 1.0.0.32 -#define VMXNET3_DRIVER_VERSION_COMMAS 1,0,0,32 -#define VMXNET3_DRIVER_VERSION_STRING "1.0.0.32" +#define VMXNET3_DRIVER_VERSION 1.0.0.33 +#define VMXNET3_DRIVER_VERSION_COMMAS 1,0,0,33 +#define VMXNET3_DRIVER_VERSION_STRING "1.0.0.33" /* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */ -#define VMXNET3_DRIVER_VERSION_NUM 0x01000020 +#define VMXNET3_DRIVER_VERSION_NUM 0x01000021 #endif /* _VMXNET3_VERSION_H_ */ |
From: Dmitry T. <dt...@vm...> - 2009-02-20 15:25:33
|
Hi Dominique, On Thursday 19 February 2009 01:06:29 Dominique Leuenberger wrote: > Hi, > > Just downloaded the latest tarball and trying to build the new rpms for > openSUSE. So far no luck. the vmxnet module seems not to be building > anymore: > The following should help with vmxnet, I will look in vmxnet3 in a bit. -- Dmitry --- a/modules/linux/vmxnet/vmxnet.c +++ b/modules/linux/vmxnet/vmxnet.c @@ -184,7 +184,7 @@ static int vmxnet_change_mtu(struct net_device *dev, int new_mtu) { - struct Vmxnet_Private *lp = (struct Vmxnet_Private *)dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); if (new_mtu < VMXNET_MIN_MTU || new_mtu > VMXNET_MAX_MTU) { return -EINVAL; @@ -258,7 +258,7 @@ vmxnet_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *drvinfo) { - struct Vmxnet_Private *lp = dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); strncpy(drvinfo->driver, vmxnet_driver.name, sizeof(drvinfo->driver)); drvinfo->driver[sizeof(drvinfo->driver) - 1] = '\0'; @@ -296,7 +296,7 @@ vmxnet_set_tso(struct net_device *dev, u32 data) { if (data) { - struct Vmxnet_Private *lp = (struct Vmxnet_Private *)dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); if (!lp->tso) { return -EINVAL; @@ -448,7 +448,7 @@ } if (value.data) { - struct Vmxnet_Private *lp = (struct Vmxnet_Private *)dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); if (!lp->tso) { return -EINVAL; @@ -620,7 +620,7 @@ static void vmxnet_tx_timeout(struct net_device *dev) { - compat_netif_wake_queue(dev); + netif_wake_queue(dev); } #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,43) */ @@ -646,11 +646,10 @@ { #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,43) struct net_device *dev = (struct net_device *)data; - struct Vmxnet_Private *lp; + struct Vmxnet_Private *lp = netdev_priv(dev); uint32 status; int ok; - lp = dev->priv; status = inl(dev->base_addr + VMXNET_STATUS_ADDR); ok = (status & VMXNET_STATUS_CONNECTED) != 0; if (ok != netif_carrier_ok(dev)) { @@ -825,13 +824,13 @@ } } - dev = compat_alloc_etherdev(sizeof *lp); + dev = alloc_etherdev(sizeof *lp); if (!dev) { printk(KERN_ERR "Unable to allocate ethernet device\n"); goto morph_back; } - lp = dev->priv; + lp = netdev_priv(dev); lp->pdev = pdev; dev->base_addr = ioaddr; @@ -1085,14 +1084,14 @@ #endif compat_pci_unmap_single(lp->pdev, lp->ddPA, lp->ddSize, PCI_DMA_BIDIRECTIONAL); kfree(lp->dd); -free_dev:; - compat_free_netdev(dev); -morph_back:; +free_dev: + free_netdev(dev); +morph_back: if (morphed) { /* Morph back to LANCE hw. */ outw(LANCE_CHIP, ioaddr - MORPH_PORT_SIZE); } -release_reg:; +release_reg: release_region(reqIOAddr, reqIOSize); pci_disable:; compat_pci_disable_device(pdev); @@ -1119,7 +1118,7 @@ vmxnet_remove_device(struct pci_dev* pdev) { struct net_device *dev = pci_get_drvdata(pdev); - struct Vmxnet_Private *lp = dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); /* * Do this before device is gone so we never call netif_carrier_* after @@ -1170,7 +1169,7 @@ compat_pci_unmap_single(lp->pdev, lp->ddPA, lp->ddSize, PCI_DMA_BIDIRECTIONAL); kfree(lp->dd); - compat_free_netdev(dev); + free_netdev(dev); compat_pci_disable_device(pdev); } @@ -1193,7 +1192,7 @@ static int vmxnet_init_ring(struct net_device *dev) { - struct Vmxnet_Private *lp = (Vmxnet_Private *)dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); Vmxnet2_DriverData *dd = lp->dd; unsigned int i; size_t offset; @@ -1321,7 +1320,7 @@ static int vmxnet_open(struct net_device *dev) { - struct Vmxnet_Private *lp = (Vmxnet_Private *)dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); unsigned int ioaddr = dev->base_addr; uint32 ddPA; @@ -1351,7 +1350,7 @@ #endif lp->dd->txStopped = FALSE; - compat_netif_start_queue(dev); + netif_start_queue(dev); #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,43) dev->interrupt = 0; @@ -1575,7 +1574,7 @@ static void check_tx_queue(struct net_device *dev) { - Vmxnet_Private *lp = (Vmxnet_Private *)dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); Vmxnet2_DriverData *dd = lp->dd; int completed = 0; @@ -1611,8 +1610,8 @@ lp->numTxPending -= completed; // XXX conditionally wake up the queue based on the # of freed entries - if (compat_netif_queue_stopped(dev)) { - compat_netif_wake_queue(dev); + if (netif_queue_stopped(dev)) { + netif_wake_queue(dev); dd->txStopped = FALSE; } } @@ -1643,7 +1642,7 @@ vmxnet_tx(struct sk_buff *skb, struct net_device *dev) { Vmxnet_TxStatus status = VMXNET_DEFER_TRANSMIT; - struct Vmxnet_Private *lp = (struct Vmxnet_Private *)dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); Vmxnet2_DriverData *dd = lp->dd; unsigned long flags; Vmxnet2_TxRingEntry *xre; @@ -1684,7 +1683,7 @@ /* check for the availability of tx ring entries */ if (dd->txRingLength - lp->numTxPending < txEntries) { dd->txStopped = TRUE; - compat_netif_stop_queue(dev); + netif_stop_queue(dev); check_tx_queue(dev); spin_unlock_irqrestore(&lp->txLock, flags); @@ -1814,7 +1813,7 @@ if (lp->txBufInfo[dd->txDriverNext].skb != NULL) { dd->txStopped = TRUE; - compat_netif_stop_queue(dev); + netif_stop_queue(dev); check_tx_queue(dev); spin_unlock_irqrestore(&lp->txLock, flags); @@ -2043,7 +2042,7 @@ static int vmxnet_rx(struct net_device *dev) { - Vmxnet_Private *lp = (Vmxnet_Private *)dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); Vmxnet2_DriverData *dd = lp->dd; if (!lp->devOpen) { @@ -2173,7 +2172,7 @@ } - lp = (struct Vmxnet_Private *)dev->priv; + lp = netdev_priv(dev); outl(VMXNET_CMD_INTR_ACK, dev->base_addr + VMXNET_COMMAND_ADDR); dd = lp->dd; @@ -2194,8 +2193,8 @@ spin_unlock(&lp->txLock); } - if (compat_netif_queue_stopped(dev) && !lp->dd->txStopped) { - compat_netif_wake_queue(dev); + if (netif_queue_stopped(dev) && !lp->dd->txStopped) { + netif_wake_queue(dev); } #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,43) @@ -2255,7 +2254,7 @@ vmxnet_close(struct net_device *dev) { unsigned int ioaddr = dev->base_addr; - Vmxnet_Private *lp = (Vmxnet_Private *)dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); int i; unsigned long flags; @@ -2267,7 +2266,7 @@ dev->start = 0; #endif - compat_netif_stop_queue(dev); + netif_stop_queue(dev); lp->devOpen = FALSE; @@ -2348,7 +2347,7 @@ static int vmxnet_load_multicast (struct net_device *dev) { - Vmxnet_Private *lp = (Vmxnet_Private *) dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); volatile u16 *mcast_table = (u16 *)lp->dd->LADRF; struct dev_mc_list *dmi = dev->mc_list; char *addrs; @@ -2409,7 +2408,7 @@ vmxnet_set_multicast_list(struct net_device *dev) { unsigned int ioaddr = dev->base_addr; - Vmxnet_Private *lp = (Vmxnet_Private *)dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); lp->dd->ifflags = ~(VMXNET_IFF_PROMISC |VMXNET_IFF_BROADCAST @@ -2459,7 +2458,7 @@ unsigned int ioaddr = dev->base_addr; int i; - if (compat_netif_running(dev)) + if (netif_running(dev)) return -EBUSY; memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); @@ -2489,7 +2488,7 @@ static struct net_device_stats * vmxnet_get_stats(struct net_device *dev) { - Vmxnet_Private *lp = (Vmxnet_Private *)dev->priv; + Vmxnet_Private *lp = netdev_priv(dev); return &lp->stats; } |
From: Dominique L. <Dom...@TM...> - 2009-02-23 10:31:57
Attachments:
open-vm-tools-2009.02.18-vmxnet.patch
|
>>> On 2/20/2009 at 16:25, Dmitry Torokhov <dt...@vm...> wrote: > Hi Dominique, > > On Thursday 19 February 2009 01:06:29 Dominique Leuenberger wrote: >> Hi, >> >> Just downloaded the latest tarball and trying to build the new rpms for >> openSUSE. So far no luck. the vmxnet module seems not to be building >> anymore: >> > > The following should help with vmxnet, I will look in vmxnet3 in a bit. Dmitry, The patch you attached directly did not do the trick (did not apply), but it gave enough pointers to recreate a working one. For reference, in case anybody else needs it, I attach 'my' version here (It's the same as yours, just the line numbers seemed not to be correct and thus it could not apply the patch). Dominique |
From: Dominique L. <Dom...@TM...> - 2009-02-20 15:34:26
|
>>> On 2/20/2009 at 16:25, Dmitry Torokhov <dt...@vm...> wrote: > Hi Dominique, > > On Thursday 19 February 2009 01:06:29 Dominique Leuenberger wrote: >> Hi, >> >> Just downloaded the latest tarball and trying to build the new rpms for >> openSUSE. So far no luck. the vmxnet module seems not to be building >> anymore: >> > > The following should help with vmxnet, I will look in vmxnet3 in a bit. Dmitry, Thank you very much. Can this patch also be applied when building against older kernels (I integrate it into RPM build process) or only against 2.6.29? Both is possible for me, I can easily %if it and have the patch only on newer versions if it would break the old ones. Dominique |
From: Dmitry T. <dt...@vm...> - 2009-02-20 16:09:28
|
On Friday 20 February 2009 07:28:20 Dominique Leuenberger wrote: > >>> On 2/20/2009 at 16:25, Dmitry Torokhov <dt...@vm...> wrote: > > > > Hi Dominique, > > > > On Thursday 19 February 2009 01:06:29 Dominique Leuenberger wrote: > >> Hi, > >> > >> Just downloaded the latest tarball and trying to build the new rpms for > >> openSUSE. So far no luck. the vmxnet module seems not to be building > >> anymore: > > > > The following should help with vmxnet, I will look in vmxnet3 in a bit. > > Dmitry, > > Thank you very much. Can this patch also be applied when building against > older kernels (I integrate it into RPM build process) or only against > 2.6.29? > > Both is possible for me, I can easily %if it and have the patch only on > newer versions if it would break the old ones. > How old is old? I think it should compile with most of 2.6 but not 2.4... I have the other part of the patch that has compatibility glue but I didn't think you would care for it. -- Dmitry |
From: Dominique L. <Dom...@TM...> - 2009-02-20 16:14:51
|
>>> On 2/20/2009 at 17:09, Dmitry Torokhov <dt...@vm...> wrote: > On Friday 20 February 2009 07:28:20 Dominique Leuenberger wrote: > How old is old? I think it should compile with most of 2.6 but not 2.4... I > have the other part of the patch that has compatibility glue but I didn't > think you would care for it. I see.. nono.. old is not that old in my case. I usually build on all supported openSUSE platforms. This means at the moment oldest one is openSUSE 10.3, which contains kernel 2.6.22 already... So everything is fine for me in this case. Dominique |