summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Kuznetsov <vadimk@gentoo.org>2009-09-22 17:56:22 +0000
committerVadim Kuznetsov <vadimk@gentoo.org>2009-09-22 17:56:22 +0000
commit56ce8c340068fe6f78ff1e699eed34d6915ed56f (patch)
treee6122f4443041fc644cd021d8e3de347dc97c463 /app-emulation/vmware-modules
parentVersion bump (diff)
downloadhistorical-56ce8c340068fe6f78ff1e699eed34d6915ed56f.tar.gz
historical-56ce8c340068fe6f78ff1e699eed34d6915ed56f.tar.bz2
historical-56ce8c340068fe6f78ff1e699eed34d6915ed56f.zip
vmnet patch for 2.6.31 kernel. Bug 274173, comment 15.
Package-Manager: portage-2.2_rc41/cvs/Linux x86_64
Diffstat (limited to 'app-emulation/vmware-modules')
-rw-r--r--app-emulation/vmware-modules/ChangeLog8
-rw-r--r--app-emulation/vmware-modules/Manifest4
-rw-r--r--app-emulation/vmware-modules/files/1.0.0.24-vmnet-2.6.31.patch477
-rw-r--r--app-emulation/vmware-modules/vmware-modules-1.0.0.24-r1.ebuild75
4 files changed, 562 insertions, 2 deletions
diff --git a/app-emulation/vmware-modules/ChangeLog b/app-emulation/vmware-modules/ChangeLog
index 62499732a95b..660e414f5048 100644
--- a/app-emulation/vmware-modules/ChangeLog
+++ b/app-emulation/vmware-modules/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-emulation/vmware-modules
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/ChangeLog,v 1.49 2009/09/02 02:13:31 vadimk Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/ChangeLog,v 1.50 2009/09/22 17:56:21 vadimk Exp $
+
+*vmware-modules-1.0.0.24-r1 (22 Sep 2009)
+
+ 22 Sep 2009; Vadim Kuznetsov vadimk@gentoo.org
+ +vmware-modules-1.0.0.24-r1.ebuild, +files/1.0.0.24-vmnet-2.6.31.patch:
+ vmnet patch for 2.6.31 kernel. Bug 274173, comment 15.
02 Sep 2009; Vadim Kuznetsov vadimk@gentoo.org
-files/patches/vmmon/050_all_kernel-2.6.29.patch,
diff --git a/app-emulation/vmware-modules/Manifest b/app-emulation/vmware-modules/Manifest
index 7b6541a14637..b5a2d3e09b14 100644
--- a/app-emulation/vmware-modules/Manifest
+++ b/app-emulation/vmware-modules/Manifest
@@ -3,6 +3,7 @@ AUX 1.0.0.23-r1-kernel-2.6.29.patch 10451 RMD160 2f0094a87ae9530e6a5937f6b3dc3bd
AUX 1.0.0.24-kernel-2.6.29.patch 10343 RMD160 4c93cab9f129a279671aa82af989121b3bf1f191 SHA1 1fcd62b30ca2a15c82ffc82924eef3447a4a4e08 SHA256 7bda64e6c0fb2fd30f71b38fa0920169356913e17bb8802ffc1e57622a0dd79c
AUX 1.0.0.24-kernel-2.6.30.patch 1062 RMD160 8c02543ffcd46db13f179a63c589315f103b6c22 SHA1 f4d8030f1197788d9e2263ab4e3e861652702cd3 SHA256 deef76da29aec2aff33a0fe816faa1c4b61cb27858cdd6c1af70f9eaf9cde158
AUX 1.0.0.24-makefile-kernel-dir.patch 2129 RMD160 885b638c78cb0663d0d55682bafd453c6122fe17 SHA1 9a08768a9923d8259346f89ae78deae878b68df9 SHA256 fd583c13433bb3ddc64a21af6c472e3c6a2747990118a22881d2b48c16e5655f
+AUX 1.0.0.24-vmnet-2.6.31.patch 13974 RMD160 84af8197b341ccea2fdda39225f9259ccdbb4a2d SHA1 745c973cce7c220f2f5d6853d5ede61738fdd729 SHA256 b8391b3ecb7a15c1763b2eace1e747f73f8ace3c1125b5402b8662d7b29298b5
AUX 1.0.0.25-makefile-include.patch 3185 RMD160 a3aa2f7cb3a51c96be13080061543d9664d98096 SHA1 df61745eeb49f517a9b7fb882ec0baab772544dd SHA256 50b529606062794d90083a590e05966b3420f1f9c6648863bd0ff360c17d9b34
AUX 1.0.0.25-makefile-kernel-dir.patch 2129 RMD160 885b638c78cb0663d0d55682bafd453c6122fe17 SHA1 9a08768a9923d8259346f89ae78deae878b68df9 SHA256 fd583c13433bb3ddc64a21af6c472e3c6a2747990118a22881d2b48c16e5655f
AUX patches/000_all_makefile-include-directory.patch 342 RMD160 ae8b7c2e628681fff153bfa10242e62df5ab2e10 SHA1 be4f203063e676dc022ce600e15479b6ea56b954 SHA256 2da16602ef3c4cb040ac80a9fed18660fadcae2e843f425da0872f50aa5356db
@@ -27,7 +28,8 @@ EBUILD vmware-modules-1.0.0.15-r1.ebuild 311 RMD160 910dd70caac0af5c1bdb6d714b96
EBUILD vmware-modules-1.0.0.15-r2.ebuild 445 RMD160 d16a678a0c9291289be89006b74782aeb0ba5a7a SHA1 c27bc611caae5e0b4afdc45ed5d62ee238a43b1e SHA256 f387e8c45b0b2fcee19b80a66dd3497981c54297fd9d21b7e01c60fb7e39a65d
EBUILD vmware-modules-1.0.0.23-r1.ebuild 817 RMD160 e126704918b1c106185e7743006c8178a156620c SHA1 8aa89f0e4a772fa59e05b7a158817ccf84aba54d SHA256 c846170c19b8525ebcdbd01a3c0d9e0bad2ff02b8129475814c65c3f8403d711
EBUILD vmware-modules-1.0.0.23.ebuild 724 RMD160 35c62995060e0c709dbd690ef63c48a431dfae8a SHA1 6ea6e450fd540c772f5c7227056848f8513939c2 SHA256 a132d0c74e914ff65e0cef0bdbe54e4e9e05e59ad7d1dc72e404d568bd0e31f4
+EBUILD vmware-modules-1.0.0.24-r1.ebuild 1900 RMD160 4ecd9e1cbdf1540e595ffbd77af671cf5143b35b SHA1 65f1a25a5b3fd9ae83ca42f70b27e4de9719eceb SHA256 a60807b87c55cc00b2e8cd14dcf31d2a1c20f5a696fe5b70d4d404022f0f1b75
EBUILD vmware-modules-1.0.0.24.ebuild 1869 RMD160 365eaf6f73a6bc3a9fb89104124fd31760dd3c2f SHA1 f36147072ac47de26f64153b834fcf553bfaf1f8 SHA256 5f7c3ac912d9d1c95c49d946c5f16639967a1e4ebaeae5ef5d0c5910cd89ab2f
EBUILD vmware-modules-1.0.0.25.ebuild 1793 RMD160 f0d53f25710fe0a07594ad2567f6243defd7f940 SHA1 72e1c8dfd0bd62b4e22f39308382853bcaed840a SHA256 166a7c141f878e2adcf3630da17b2361fd2ed0f32456ce875b6f2115f83db25f
-MISC ChangeLog 11323 RMD160 16cc28eb104d461178b474fd153857d6b25656e4 SHA1 578e4969b7876769873a850b2565caef3e21ed3f SHA256 75c040b7cd708628b8615c5071da6d8f4b66ceef69214c73f24cddb85baaf92a
+MISC ChangeLog 11547 RMD160 4a719aaf131926de7883eb02f2942a37bfd0d8a3 SHA1 74cc47e15606a2528e819ab67cd0df0ee8efdb23 SHA256 6c6e777002d5e16735b7df2353c5fae555abbef7c60244421bcda3968aa77eab
MISC metadata.xml 288 RMD160 da2ee1499dd87693b63592a337d8352494cb9652 SHA1 e1b50a587afb7878e21828a957a6838e7d08e4e8 SHA256 100017b3059be218965923798780ab195dafaa893f98088592fb5b299e686c37
diff --git a/app-emulation/vmware-modules/files/1.0.0.24-vmnet-2.6.31.patch b/app-emulation/vmware-modules/files/1.0.0.24-vmnet-2.6.31.patch
new file mode 100644
index 000000000000..a15e8ec1907e
--- /dev/null
+++ b/app-emulation/vmware-modules/files/1.0.0.24-vmnet-2.6.31.patch
@@ -0,0 +1,477 @@
+diff -uh vmnet-only.old/bridge.c vmnet-only/bridge.c
+--- vmnet-only.old/bridge.c 2009-03-27 01:34:28.000000000 -0400
++++ vmnet-only/bridge.c 2009-08-14 22:55:21.000000000 -0400
+@@ -645,9 +645,7 @@
+ if (clone == NULL) {
+ dev_unlock_list();
+ } else {
+- struct sock *sk = bridge->sk;
+- atomic_add(skb->truesize, &sk->sk_wmem_alloc);
+- clone->sk = sk;
++ skb_set_owner_w(clone, bridge->sk);
+ clone->protocol = ((struct ethhdr *)skb->data)->h_proto; // XXX
+ if ((dev->flags & IFF_UP) != 0) {
+ dev_unlock_list();
+@@ -987,6 +985,7 @@
+ retval = -ENOMEM;
+ goto out;
+ }
++ sock_init_data(NULL, bridge->sk);
+ SET_SK_DEAD(bridge->sk);
+
+ bridge->wirelessAdapter = VNetBridgeIsDeviceWireless(bridge->dev);
+diff -uh vmnet-only.old/compat_netdevice.h vmnet-only/compat_netdevice.h
+--- vmnet-only.old/compat_netdevice.h 2009-03-27 01:34:28.000000000 -0400
++++ vmnet-only/compat_netdevice.h 2009-08-14 22:55:21.000000000 -0400
+@@ -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) && \
+diff -uh vmnet-only.old/compat_sched.h vmnet-only/compat_sched.h
+--- vmnet-only.old/compat_sched.h 2009-03-27 01:34:28.000000000 -0400
++++ vmnet-only/compat_sched.h 2009-08-14 22:55:21.000000000 -0400
+@@ -272,6 +272,20 @@
+ #endif
+
+ /*
++ * Around 2.6.27 kernel stopped sending signals to kernel
++ * threads being frozen, instead threads have to check
++ * freezing() or use wait_event_freezable(). Unfortunately
++ * wait_event_freezable() completely hides the fact that
++ * thread was frozen from calling code and sometimes we do
++ * want to know that.
++ */
++#ifdef PF_FREEZER_NOSIG
++#define compat_wait_check_freezing() freezing(current)
++#else
++#define compat_wait_check_freezing() (0)
++#endif
++
++/*
+ * Since 2.6.27-rc2 kill_proc() is gone... Replacement (GPL-only!)
+ * API is available since 2.6.19. Use them from 2.6.27-rc1 up.
+ */
+diff -uh vmnet-only.old/compat_sock.h vmnet-only/compat_sock.h
+--- vmnet-only.old/compat_sock.h 2009-03-27 01:34:28.000000000 -0400
++++ vmnet-only/compat_sock.h 2009-08-14 22:55:21.000000000 -0400
+@@ -22,21 +22,9 @@
+ #include <linux/stddef.h> /* for NULL */
+ #include <net/sock.h>
+
+-
+ /*
+ * Between 2.5.70 and 2.5.71 all sock members were renamed from XXX to sk_XXX.
+- *
+- * VMW_HAVE_SK_WMEM_ALLOC is defined in module Makefile if kernel's struct sock
+- * has sk_wmem_alloc member. See vmnet's Makefile.kernel for details.
+- * It also means that all modules including this file should do
+- *
+- * EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/socket.c, -DVMW_HAVE_SK_WMEM_ALLOC, )
+- *
+- * in their Makefiles.
+ */
+-#ifndef VMW_HAVE_SK_WMEM_ALLOC
+-# define sk_wmem_alloc wmem_alloc
+-#endif
+
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 71)
+ # define compat_sk_backlog_rcv backlog_rcv
+diff -uh vmnet-only.old/Makefile vmnet-only/Makefile
+--- vmnet-only.old/Makefile 2009-09-13 07:39:55.000000000 -0400
++++ vmnet-only/Makefile 2009-09-13 07:40:10.000000000 -0400
+@@ -106,9 +106,10 @@
+ postbuild:: ;
+
+ $(DRIVER_KO): prebuild
+- make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) modules
+- make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) postbuild
+-
++ make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
++ MODULEBUILDDIR=$(MODULEBUILDDIR) modules
++ make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
++ MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
+ else
+
+ ifneq ($(VM_CCVER), $(VMCCVER))
+@@ -121,7 +122,7 @@
+ endif
+
+ vm_check_build = $(shell if $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) \
+- $(CPPFLAGS) $(CFLAGS) $(CFLAGS_KERNEL) \
++ $(CPPFLAGS) $(CFLAGS) $(CFLAGS_KERNEL) $(LINUXINCLUDE) \
+ $(EXTRA_CFLAGS) -Iinclude2/asm/mach-default \
+ -DKBUILD_BASENAME=\"$(DRIVER)\" \
+ -Werror -S -o /dev/null -xc $(1) \
+diff -uh vmnet-only.old/Makefile.kernel vmnet-only/Makefile.kernel
+--- vmnet-only.old/Makefile.kernel 2009-09-13 07:39:55.000000000 -0400
++++ vmnet-only/Makefile.kernel 2009-09-13 07:40:10.000000000 -0400
+@@ -21,7 +21,6 @@
+
+ EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/epoll.c, -DVMW_HAVE_EPOLL, )
+-EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/socket.c, -DVMW_HAVE_SK_WMEM_ALLOC, )
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/sk_alloc.c,-DVMW_HAVE_SK_ALLOC_WITH_PROTO, )
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_net.c,-DVMW_NETDEV_HAS_NET, )
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_dev_net.c,-DVMW_NETDEV_HAS_DEV_NET, )
+diff -uh vmnet-only.old/Makefile.normal vmnet-only/Makefile.normal
+--- vmnet-only.old/Makefile.normal 2009-03-27 01:34:28.000000000 -0400
++++ vmnet-only/Makefile.normal 2009-08-14 22:55:22.000000000 -0400
+@@ -47,7 +47,6 @@
+ | sed -n -e 's!^APATH!-I$(HEADER_DIR)/asm!p')
+
+ CC_OPTS += $(call vm_check_build, $(SRCROOT)/epoll.c, -DVMW_HAVE_EPOLL, )
+-CC_OPTS += $(call vm_check_build, $(SRCROOT)/socket.c, -DVMW_HAVE_SK_WMEM_ALLOC, )
+ CC_OPTS += $(call vm_check_build, $(SRCROOT)/sk_alloc.c,-DVMW_HAVE_SK_ALLOC_WITH_PROTO, )
+ CC_OPTS += $(call vm_check_build, $(SRCROOT)/netdev_has_net.c,-DVMW_NETDEV_HAS_NET, )
+ CC_OPTS += $(call vm_check_build, $(SRCROOT)/netdev_has_dev_net.c,-DVMW_NETDEV_HAS_DEV_NET, )
+diff -uh vmnet-only.old/netif.c vmnet-only/netif.c
+--- vmnet-only.old/netif.c 2009-09-13 07:39:55.000000000 -0400
++++ vmnet-only/netif.c 2009-08-14 22:55:21.000000000 -0400
+@@ -55,30 +55,6 @@
+ struct net_device_stats stats;
+ } VNetNetIF;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
+-/*
+- Prior to KERNEL_VERSION(2, 6, 29) "struct net_device" had "void
+- *priv" field which was used as pointer to "VNetNetIF".
+-*/
+-
+-#define VNetNetIF_netdev_priv_size 0
+-
+-#define VNetNetIF_netdev_netIf(dev) (*(VNetNetIF**)&((dev)->priv))
+-
+-#else
+-/*
+- Since KERNEL_VERSION(2, 6, 29) pointer to "VNetNetIF" is stored in
+- explicitly allocated private area.
+-*/
+-typedef struct {
+- VNetNetIF *netIf;
+-} VNetNetIF_netdev_priv;
+-
+-#define VNetNetIF_netdev_priv_size sizeof(VNetNetIF_netdev_priv)
+-
+-#define VNetNetIF_netdev_netIf(dev) (((VNetNetIF_netdev_priv *)compat_netdev_priv(dev))->netIf)
+-
+-#endif
+
+ static void VNetNetIfFree(VNetJack *this);
+ static void VNetNetIfReceive(VNetJack *this, struct sk_buff *skb);
+@@ -100,73 +76,6 @@
+ static int VNetNetIfProcRead(char *page, char **start, off_t off,
+ int count, int *eof, void *data);
+
+-#ifndef KERNEL_2_3_43
+-/* softnet API emulation */
+-
+-
+-/*
+- *----------------------------------------------------------------------
+- *
+- * netif_stop_queue --
+- *
+- * Stops queue processing.
+- *
+- * Results:
+- * None.
+- *
+- *----------------------------------------------------------------------
+- */
+-
+-static inline void
+-netif_stop_queue(struct net_device *dev) // IN:
+-{
+- dev->tbusy = 1;
+-}
+-
+-
+-/*
+- *----------------------------------------------------------------------
+- *
+- * netif_start_queue --
+- *
+- * Enables queue processing. It does not try to start received
+- * frames processing.
+- *
+- * Results:
+- * None.
+- *
+- *----------------------------------------------------------------------
+- */
+-
+-static inline void
+-netif_start_queue(struct net_device *dev) // IN:
+-{
+- dev->tbusy = 0;
+-}
+-
+-
+-/*
+- *----------------------------------------------------------------------
+- *
+- * netif_wake_queue --
+- *
+- * Enables queue processing. It schedules receive queue processing.
+- *
+- * Results:
+- * None.
+- *
+- *----------------------------------------------------------------------
+- */
+-
+-static inline void
+-netif_wake_queue(struct net_device *dev) // IN:
+-{
+- dev->tbusy = 0;
+- mark_bh(NET_BH);
+-}
+-#endif
+-
+-
+ #if 0
+ #ifdef KERNEL_2_3_43
+ /*
+@@ -221,7 +130,29 @@
+ static void
+ VNetNetIfSetup(struct net_device *dev) // IN:
+ {
++#ifdef HAVE_NET_DEVICE_OPS
++ static const struct net_device_ops vnetNetifOps = {
++ .ndo_init = VNetNetifProbe,
++ .ndo_open = VNetNetifOpen,
++ .ndo_start_xmit = VNetNetifStartXmit,
++ .ndo_stop = VNetNetifClose,
++ .ndo_get_stats = VNetNetifGetStats,
++ .ndo_set_mac_address = VNetNetifSetMAC,
++ .ndo_set_multicast_list = VNetNetifSetMulticast,
++ /*
++ * We cannot stuck... If someone will report problems under
++ * low memory conditions or some such, we should enable it.
++ */
++#if 0
++ .ndo_tx_timeout = VNetNetifTxTimeout,
++#endif
++ };
++#endif /* HAVE_NET_DEVICE_OPS */
++
+ ether_setup(dev); // turns on IFF_BROADCAST, IFF_MULTICAST
++#ifdef HAVE_NET_DEVICE_OPS
++ dev->netdev_ops = &vnetNetifOps;
++#else
+ dev->init = VNetNetifProbe;
+ dev->open = VNetNetifOpen;
+ dev->hard_start_xmit = VNetNetifStartXmit;
+@@ -236,9 +167,43 @@
+ */
+ #if 0
+ dev->tx_timeout = VNetNetifTxTimeout;
++#endif
++#endif
++#endif /* HAVE_NET_DEVICE_OPS */
++
++#if 0
++ /* Only necessary if tx_timeout is set. See above. */
+ dev->watchdog_timeo = TX_TIMEOUT;
+ #endif
+-#endif
++}
++
++
++/*
++ *----------------------------------------------------------------------
++ *
++ * VNetNetIfNetDeviceToNetIf --
++ *
++ * Converts net_device to netIf.
++ *
++ * Results:
++ * Converted pointer.
++ *
++ * Side effects:
++ * None.
++ *
++ *----------------------------------------------------------------------
++ */
++
++static INLINE VNetNetIF *
++VNetNetIfNetDeviceToNetIf(struct net_device *dev)
++{
++#ifdef HAVE_NETDEV_PRIV
++ VNetNetIF** devPriv = netdev_priv(dev);
++
++ return *devPriv;
++#else
++ return dev->priv;
++#endif
+ }
+
+
+@@ -342,13 +307,21 @@
+ memcpy(netIf->devName, devName, sizeof netIf->devName);
+ NULL_TERMINATE_STRING(netIf->devName);
+
+- dev = compat_alloc_netdev(VNetNetIF_netdev_priv_size, netIf->devName, VNetNetIfSetup);
++#ifdef HAVE_NETDEV_PRIV
++ dev = compat_alloc_netdev(sizeof(VNetNetIF *), netIf->devName, VNetNetIfSetup);
+ if (!dev) {
+ retval = -ENOMEM;
+ goto out;
+ }
+-
+- VNetNetIF_netdev_netIf(dev) = netIf;
++ *(VNetNetIF**)netdev_priv(dev) = netIf;
++#else
++ dev = compat_alloc_netdev(0, netIf->devName, VNetNetIfSetup);
++ if (!dev) {
++ retval = -ENOMEM;
++ goto out;
++ }
++ dev->priv = netIf;
++#endif
+ netIf->dev = dev;
+
+ memcpy(dev->dev_addr, netIf->port.paddr, sizeof netIf->port.paddr);
+@@ -590,12 +563,14 @@
+ VNetNetifStartXmit(struct sk_buff *skb, // IN:
+ struct net_device *dev) // IN:
+ {
+- VNetNetIF *netIf = VNetNetIF_netdev_netIf(dev);
++ VNetNetIF *netIf;
+
+ if(skb == NULL) {
+ return 0;
+ }
+
++ netIf = VNetNetIfNetDeviceToNetIf(dev);
++
+ /*
+ * Block a timer-based transmit from overlapping. This could better be
+ * done with atomic_swap(1, dev->tbusy), but set_bit() works as well.
+@@ -642,11 +617,13 @@
+ VNetNetifSetMAC(struct net_device *dev, // IN:
+ void *p) // IN:
+ {
+- VNetNetIF *netIf = VNetNetIF_netdev_netIf(dev);
++ VNetNetIF *netIf;
+ struct sockaddr const *addr = p;
++
+ if (!VMX86_IS_STATIC_MAC(addr->sa_data)) {
+ return -EINVAL;
+ }
++ netIf = VNetNetIfNetDeviceToNetIf(dev);
+ memcpy(netIf->port.paddr, addr->sa_data, dev->addr_len);
+ memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
+ return 0;
+@@ -696,11 +673,12 @@
+ *----------------------------------------------------------------------
+ */
+
+-struct net_device_stats *
++static struct net_device_stats *
+ VNetNetifGetStats(struct net_device *dev) // IN:
+ {
+- VNetNetIF *netIf = VNetNetIF_netdev_netIf(dev);
+- return &(netIf->stats);
++ VNetNetIF *netIf = VNetNetIfNetDeviceToNetIf(dev);
++
++ return &netIf->stats;
+ }
+
+
+Only in vmnet-only.old: socket.c
diff --git a/app-emulation/vmware-modules/vmware-modules-1.0.0.24-r1.ebuild b/app-emulation/vmware-modules/vmware-modules-1.0.0.24-r1.ebuild
new file mode 100644
index 000000000000..e7ef1b7af8a8
--- /dev/null
+++ b/app-emulation/vmware-modules/vmware-modules-1.0.0.24-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/vmware-modules-1.0.0.24-r1.ebuild,v 1.1 2009/09/22 17:56:21 vadimk Exp $
+
+EAPI="2"
+
+inherit eutils flag-o-matic linux-mod
+
+DESCRIPTION="VMware kernel modules"
+HOMEPAGE="http://www.vmware.com/"
+
+SRC_URI="x86? (
+ mirror://gentoo/${P}.x86.tar.bz2
+ http://dev.gentoo.org/~vadimk/${P}.x86.tar.bz2
+ )
+ amd64? (
+ mirror://gentoo/${P}.amd64.tar.bz2
+ http://dev.gentoo.org/~vadimk/${P}.amd64.tar.bz2
+ )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+
+ VMWARE_VER="VME_V65" # THIS VALUE IS JUST A PLACE HOLDER
+ VMWARE_GROUP=${VMWARE_GROUP:-vmware}
+
+ VMWARE_MODULE_LIST="vmblock vmci vmmon vmnet vsock"
+ VMWARE_MOD_DIR="${PN}-${PVR}"
+
+ BUILD_TARGETS="auto-build VMWARE_VER=${VMWARE_VER} KERNEL_DIR=${KERNEL_DIR} KBUILD_OUTPUT=${KV_OUT_DIR}"
+
+ enewgroup "${VMWARE_GROUP}"
+ filter-flags -mfpmath=sse
+
+ for mod in ${VMWARE_MODULE_LIST}; do
+ MODULE_NAMES="${MODULE_NAMES} ${mod}(misc:${S}/${mod}-only)"
+ done
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ for mod in ${VMWARE_MODULE_LIST}; do
+ unpack ./"${P}"/${mod}.tar
+ done
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PV}-makefile-kernel-dir.patch"
+ epatch "${FILESDIR}/${PV}-kernel-2.6.29.patch"
+ epatch "${FILESDIR}/${PV}-kernel-2.6.30.patch"
+ epatch "${FILESDIR}/${PV}-vmnet-2.6.31.patch"
+}
+
+src_install() {
+ # this adds udev rules for vmmon*
+ if [[ -n "`echo ${VMWARE_MODULE_LIST} | grep vmmon`" ]];
+ then
+ dodir /etc/udev/rules.d
+ echo 'KERNEL=="vmmon*", GROUP="'$VMWARE_GROUP'" MODE=660' >> "${D}/etc/udev/rules.d/60-vmware.rules" || die
+ echo 'KERNEL=="vmnet*", GROUP="'$VMWARE_GROUP'" MODE=660' >> "${D}/etc/udev/rules.d/60-vmware.rules" || die
+ fi
+
+ linux-mod_src_install
+}