Dominique Leuenberger
de200b6f0e
+ Added 0001-Remove-unused-DEPRECATED-macro.patch + Added 0002-Conditionally-define-g_info-macro.patch + Added 0003-Add-kuid_t-kgid_t-compatibility-layer.patch + Added 0004-Use-new-link-helpers.patch + Added 0005-Update-hgfs-file-operations-for-newer-kernels.patch + Added 0006-Fix-vmxnet-module-on-kernels-3.16.patch + Added 0007-Fix-vmhgfs-module-on-kernels-3.16.patch + Added 0008-Fix-segfault-in-vmhgfs.patch + Droped g_info_redefine.patch (now named 0002-Conditionally-define-g_info-macro.patch). - Enable building of KMP packages. - Fix bashisms in preun script. - Do not generate timestamps in the doxygen docs. OBS-URL: https://build.opensuse.org/package/show/Virtualization:VMware/open-vm-tools?expand=0&rev=267
75 lines
2.2 KiB
Diff
75 lines
2.2 KiB
Diff
From 4601d767d60e9a377c285994266c6fef49cae550 Mon Sep 17 00:00:00 2001
|
|
From: "Scott M. Kroll" <skroll@gmail.com>
|
|
Date: Fri, 15 Aug 2014 10:40:38 -0400
|
|
Subject: [PATCH 10/11] Fix vmxnet module on kernels >= 3.16
|
|
|
|
* Add compat check for ethtool_ops in net_device struct.
|
|
* SET_ETHTOOL_OPS is no longer defined, but can be manually.
|
|
---
|
|
open-vm-tools/modules/linux/shared/compat_netdevice.h | 4 ++++
|
|
open-vm-tools/modules/linux/vmxnet/vmxnet.c | 13 ++++++++-----
|
|
2 files changed, 12 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/open-vm-tools/modules/linux/shared/compat_netdevice.h b/open-vm-tools/modules/linux/shared/compat_netdevice.h
|
|
index 3aec25b..a65d59b 100644
|
|
--- a/open-vm-tools/modules/linux/shared/compat_netdevice.h
|
|
+++ b/open-vm-tools/modules/linux/shared/compat_netdevice.h
|
|
@@ -337,4 +337,8 @@ typedef netdev_features_t compat_netdev_features_t;
|
|
typedef u32 compat_netdev_features_t;
|
|
#endif
|
|
|
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) || defined(SET_ETHTOOL_OPS)
|
|
+#define VMW_HAVE_ETHTOOL_OPS 1
|
|
+#endif
|
|
+
|
|
#endif /* __COMPAT_NETDEVICE_H__ */
|
|
diff --git a/open-vm-tools/modules/linux/vmxnet/vmxnet.c b/open-vm-tools/modules/linux/vmxnet/vmxnet.c
|
|
index 54b4590..7fb5692 100644
|
|
--- a/open-vm-tools/modules/linux/vmxnet/vmxnet.c
|
|
+++ b/open-vm-tools/modules/linux/vmxnet/vmxnet.c
|
|
@@ -283,8 +283,7 @@ vmxnet_change_mtu(struct net_device *dev, int new_mtu)
|
|
|
|
#endif
|
|
|
|
-
|
|
-#ifdef SET_ETHTOOL_OPS
|
|
+#ifdef VMW_HAVE_ETHTOOL_OPS
|
|
/*
|
|
*----------------------------------------------------------------------------
|
|
*
|
|
@@ -530,7 +529,7 @@ vmxnet_ethtool_ops = {
|
|
};
|
|
|
|
|
|
-#else /* !defined(SET_ETHTOOL_OPS) */
|
|
+#else /* !defined(VMW_HAVE_ETHTOOL_OPS) */
|
|
|
|
|
|
/*
|
|
@@ -743,7 +742,7 @@ vmxnet_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
|
}
|
|
return -EOPNOTSUPP;
|
|
}
|
|
-#endif /* SET_ETHTOOL_OPS */
|
|
+#endif /* !defined(VMW_HAVE_ETHTOOL_OPS) */
|
|
|
|
|
|
/*
|
|
@@ -1142,8 +1141,12 @@ vmxnet_probe_device(struct pci_dev *pdev, // IN: vmxnet PCI device
|
|
dev->watchdog_timeo = VMXNET_WATCHDOG_TIMEOUT;
|
|
#endif
|
|
|
|
-#ifdef SET_ETHTOOL_OPS
|
|
+#ifdef VMW_HAVE_ETHTOOL_OPS
|
|
+# ifdef SET_ETHTOOL_OPS
|
|
SET_ETHTOOL_OPS(dev, &vmxnet_ethtool_ops);
|
|
+# else
|
|
+ dev->ethtool_ops = &vmxnet_ethtool_ops;
|
|
+# endif
|
|
#else
|
|
dev->do_ioctl = vmxnet_ioctl;
|
|
#endif
|
|
--
|
|
2.0.4
|
|
|