From: Vadim Kuznetsov Date: Tue, 10 Jan 2012 14:53:41 +0000 (+0000) Subject: patches for 3.1.x and 3.2 kernels. Bug 395305 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=443326db2e456c9a3f970ae5378f4b5baf59353f;p=gentoo.git patches for 3.1.x and 3.2 kernels. Bug 395305 Package-Manager: portage-2.1.10.44/cvs/Linux x86_64 --- diff --git a/app-emulation/vmware-modules/ChangeLog b/app-emulation/vmware-modules/ChangeLog index 3a49a8074ddb..43d0dc263eb5 100644 --- a/app-emulation/vmware-modules/ChangeLog +++ b/app-emulation/vmware-modules/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for app-emulation/vmware-modules # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/ChangeLog,v 1.86 2012/01/06 21:29:50 vadimk Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/ChangeLog,v 1.87 2012/01/10 14:53:41 vadimk Exp $ + + 10 Jan 2012; Vadim Kuznetsov +files/238-3.2.0.patch, + +files/238-netdevice.patch, vmware-modules-238.5.ebuild: + patches for 3.1.x and 3.2 kernels. Bug 395305 06 Jan 2012; Vadim Kuznetsov files/264-3.2.0.patch: fixed patch for 3.2.0 kernel . Bug 397733. diff --git a/app-emulation/vmware-modules/Manifest b/app-emulation/vmware-modules/Manifest index eb97ad7ffca7..9b4d73f3b304 100644 --- a/app-emulation/vmware-modules/Manifest +++ b/app-emulation/vmware-modules/Manifest @@ -2,9 +2,11 @@ Hash: SHA1 AUX 238-2.6.39.patch 8566 RMD160 1fb07e92cebba852da61b36ee10dcdb4e12d5729 SHA1 6098b91349ab7bc128fea3df27671423f5ddcd1a SHA256 31e68e9897660cc8ff898eae1d722d616205fff1efd30cd8e042a3a455bd2350 +AUX 238-3.2.0.patch 3533 RMD160 e7928a853397dd5f01b46022e2abdd24c440c4b1 SHA1 bb91934f89cabb305ad9df6d6f5df3fa4f32f900 SHA256 df2bf5a026281559ba6e0d364555c8f48024b7ce2231c652960b5c477cc4545a AUX 238-jobserver.patch 2899 RMD160 0a90332d966245e11f1ecee5a60e47779a746ccb SHA1 b6b36a98cf626f3fb5c7044b1c72f4ac917c5bd1 SHA256 131c606fdafe80f10151c667796270101f3b06ee70a1b872862e15bcfb4ee46d AUX 238-makefile-include.patch 2791 RMD160 8665507d2b565931dc13a5f49eec6e33205d42fb SHA1 d48ca9316e65d536e50d07dfe945a6ff195be7cd SHA256 ac676433ca499268bd6a1f0d7d904a44095bb1a777ad31d055e8c4990eea586c AUX 238-makefile-kernel-dir.patch 2201 RMD160 22b81e2c3c347ac6bad3afef15eea31250c34f2a SHA1 033160ded8fda76e6f016040cc4bb3f4ca0dd603 SHA256 780b79fcc6e8e836632f4542ac6c3da2d475b3ad1e2e88e1c51aea849a5172c7 +AUX 238-netdevice.patch 833 RMD160 552fa78378ac721865a0629a4a29318a11e6b1bd SHA1 16d95a575ea14de67d11f4faf72842c3edb96dea SHA256 8f17ce379abda45a8f94e1dcd6e43367273f97f76edd41f9941beb3b1730a751 AUX 238-sema.patch 3621 RMD160 c1710c17094f21bdc31190975a29421055cb85a8 SHA1 960475b3c91a2850554170afbb810ff0d23ef08b SHA256 b56a5b6aa655f830f93424ec23cedd7dde7304f214357cde05bc89574600cbe0 AUX 238-unlocked_ioctl.patch 1114 RMD160 9e837ff627f539e70fd0c110b17d5dd606dea9ea SHA1 0b1f11171a9d76a42ebf768557dc2e28152bc77a SHA256 d3ea574000ab0ccacad75534fc76b482ef78a47a7804e9f2abeb406ceccbb458 AUX 264-3.2.0.patch 3527 RMD160 1bb5eaebbf8cc17bd9dd4f2cd87554e52bb1f714 SHA1 0d80f90ef11fc07064963c4ec90a136a8b40189a SHA256 5c4e679b9667a353c4b19ad17ec086386314a56c1890e87a44fc6da16c655029 @@ -12,14 +14,14 @@ AUX 264-jobserver.patch 2899 RMD160 0a90332d966245e11f1ecee5a60e47779a746ccb SHA AUX 264-makefile-include.patch 2501 RMD160 da46f1229097539c7272d421f4d50b322e4d6e28 SHA1 30b57e8033e49eaf4923a4032765950e684533fc SHA256 208121855fe18ecb279ff40f2833463559363461c2170d32c17040211a01f169 AUX 264-makefile-kernel-dir.patch 2201 RMD160 22b81e2c3c347ac6bad3afef15eea31250c34f2a SHA1 033160ded8fda76e6f016040cc4bb3f4ca0dd603 SHA256 780b79fcc6e8e836632f4542ac6c3da2d475b3ad1e2e88e1c51aea849a5172c7 AUX 264-netdevice.patch 833 RMD160 552fa78378ac721865a0629a4a29318a11e6b1bd SHA1 16d95a575ea14de67d11f4faf72842c3edb96dea SHA256 8f17ce379abda45a8f94e1dcd6e43367273f97f76edd41f9941beb3b1730a751 -EBUILD vmware-modules-238.5.ebuild 1991 RMD160 fde27449f5ec59546fcc83592541d23d6cfe7b10 SHA1 ff401389381805741db248a3da10125c6036efd7 SHA256 74eb7f90a96ef0cd74ce8f2bef164ddb9b20f27c00131c76e3e4da3650e7d254 +EBUILD vmware-modules-238.5.ebuild 2087 RMD160 6770e9125947e21472749ce723d5bbb201b5c345 SHA1 5d0e2337a14f7b572f0fbc400ab8fc52124d6009 SHA256 531581204310b9fd300f8ddd1125ed39d89cc8d9b8412c4cde2192e81e900df4 EBUILD vmware-modules-264.1.ebuild 1947 RMD160 462c55f79892966bbef1f0c505092b9c8b579abc SHA1 d63b451316f54854188bcc71185bfeeb92761325 SHA256 8fc6e05da6208ee6652ef316e4b46e059a8e27cc7c4d87260f668bdfa77c5103 -MISC ChangeLog 19373 RMD160 eb25c492463a32d8478515cd4beb43586b997dab SHA1 f2da9697a65d538d8e1647c3276f6ed98d28c194 SHA256 cf5243acabc895573c8226f11dfb2419f1db23b0c21fa20c0597299963a2608c +MISC ChangeLog 19556 RMD160 e4e7cfb9f094970f62a4d7ae9a880eb26e1cb443 SHA1 9a1b3eb16624f0d042eb505aea6945fb9f659553 SHA256 134c85fe41c5d13a1a5453cb215fbaaec2e06d53587927ffef44c9da946a0913 MISC metadata.xml 288 RMD160 da2ee1499dd87693b63592a337d8352494cb9652 SHA1 e1b50a587afb7878e21828a957a6838e7d08e4e8 SHA256 100017b3059be218965923798780ab195dafaa893f98088592fb5b299e686c37 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) -iEYEARECAAYFAk8HZ90ACgkQiLKviuHfItUIpgCfbHFZIk3PgwgfaporaLpUhKTH -L78AoKaA9yrj+HCGz0grssojygPkpJCu -=HeYw +iEYEARECAAYFAk8MUQUACgkQiLKviuHfItUveQCgtEPm0P4VyTG0Y8WdERIV452M +DNUAn2m5RipBXj58Ua9cb3tGScyd9zCA +=jQoq -----END PGP SIGNATURE----- diff --git a/app-emulation/vmware-modules/files/238-3.2.0.patch b/app-emulation/vmware-modules/files/238-3.2.0.patch new file mode 100644 index 000000000000..0416214c3125 --- /dev/null +++ b/app-emulation/vmware-modules/files/238-3.2.0.patch @@ -0,0 +1,103 @@ +diff --git a/vmmon-only/linux/iommu.c b/vmmon-only/linux/iommu.c +index b0ee013..f0f5c9a 100644 +--- a/vmmon-only/linux/iommu.c ++++ b/vmmon-only/linux/iommu.c +@@ -36,6 +36,12 @@ + #define PCI_BDF_SLOTFUNC(bdf) PCI_DEVFN(PCI_SLOT(bdf), PCI_FUNC(bdf)) + #define PCI_BDF_BUS(bdf) (((bdf) >> 8) & 0xff) + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) ++#include ++#define iommu_found() iommu_present(&pci_bus_type) ++#define iommu_domain_alloc() iommu_domain_alloc(&pci_bus_type) ++#endif ++ + typedef struct PassthruDevice { + struct pci_dev *pdev; + VMLinux *vmLinux; +diff --git a/vmnet-only/filter.c b/vmnet-only/filter.c +index b0017d7..6c0687f 100644 +--- a/vmnet-only/filter.c ++++ b/vmnet-only/filter.c +@@ -41,6 +41,10 @@ + #include "vnetInt.h" + #include "vmnetInt.h" + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) ++#include ++#endif ++ + // VNet_FilterLogPacket.action for dropped packets + #define VNET_FILTER_ACTION_DRP (1) + #define VNET_FILTER_ACTION_DRP_SHORT (2) +diff --git a/vmnet-only/netif.c b/vmnet-only/netif.c +index b3c752b..79d4896 100644 +--- a/vmnet-only/netif.c ++++ b/vmnet-only/netif.c +@@ -62,7 +62,9 @@ static int VNetNetifClose(struct net_device *dev); + static int VNetNetifStartXmit(struct sk_buff *skb, struct net_device *dev); + static struct net_device_stats *VNetNetifGetStats(struct net_device *dev); + static int VNetNetifSetMAC(struct net_device *dev, void *addr); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0) + static void VNetNetifSetMulticast(struct net_device *dev); ++#endif + #if 0 + static void VNetNetifTxTimeout(struct net_device *dev); + #endif +@@ -131,7 +133,9 @@ VNetNetIfSetup(struct net_device *dev) // IN: + .ndo_stop = VNetNetifClose, + .ndo_get_stats = VNetNetifGetStats, + .ndo_set_mac_address = VNetNetifSetMAC, ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0) + .ndo_set_multicast_list = VNetNetifSetMulticast, ++#endif + /* + * We cannot stuck... If someone will report problems under + * low memory conditions or some such, we should enable it. +@@ -152,7 +156,9 @@ VNetNetIfSetup(struct net_device *dev) // IN: + dev->stop = VNetNetifClose; + dev->get_stats = VNetNetifGetStats; + dev->set_mac_address = VNetNetifSetMAC; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0) + dev->set_multicast_list = VNetNetifSetMulticast; ++#endif + /* + * We cannot stuck... If someone will report problems under + * low memory conditions or some such, we should enable it. +@@ -621,11 +627,12 @@ VNetNetifSetMAC(struct net_device *dev, // IN: + *---------------------------------------------------------------------- + */ + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0) + void + VNetNetifSetMulticast(struct net_device *dev) // IN: unused + { + } +- ++#endif + + /* + *---------------------------------------------------------------------- +diff --git a/vmnet-only/userif.c b/vmnet-only/userif.c +index 4e65c76..fd12aa9 100644 +--- a/vmnet-only/userif.c ++++ b/vmnet-only/userif.c +@@ -572,10 +572,18 @@ VNetCsumCopyDatagram(const struct sk_buff *skb, // IN: skb to copy + unsigned int tmpCsum; + const void *vaddr; + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) ++ vaddr = kmap(skb_frag_page(frag)); ++#else + vaddr = kmap(frag->page); ++#endif + tmpCsum = csum_and_copy_to_user(vaddr + frag->page_offset, + curr, frag->size, 0, &err); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) ++ kunmap(skb_frag_page(frag)); ++#else + kunmap(frag->page); ++#endif + if (err) { + return err; + } diff --git a/app-emulation/vmware-modules/files/238-netdevice.patch b/app-emulation/vmware-modules/files/238-netdevice.patch new file mode 100644 index 000000000000..35231a3205e3 --- /dev/null +++ b/app-emulation/vmware-modules/files/238-netdevice.patch @@ -0,0 +1,24 @@ +diff --git a/vmnet-only/compat_netdevice.h b/vmnet-only/compat_netdevice.h +index 7a56304..9ff4548 100644 +--- a/vmnet-only/compat_netdevice.h ++++ b/vmnet-only/compat_netdevice.h +@@ -47,6 +47,19 @@ + # define net_device device + #endif + ++/* it looks like these have been removed from the kernel 3.1 ++ * probably because the "transition" is considered complete. ++ * so to keep this source compatible we just redefine them like they were ++ * previously ++ */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0) ++#define HAVE_ALLOC_NETDEV /* feature macro: alloc_xxxdev ++ functions are available. */ ++#define HAVE_FREE_NETDEV /* free_netdev() */ ++#define HAVE_NETDEV_PRIV /* netdev_priv() */ ++#define HAVE_NETIF_QUEUE ++#define HAVE_NET_DEVICE_OPS ++#endif + + /* + * SET_MODULE_OWNER appeared sometime during 2.3.x. It was setting diff --git a/app-emulation/vmware-modules/vmware-modules-238.5.ebuild b/app-emulation/vmware-modules/vmware-modules-238.5.ebuild index 6b77c241fda7..5f450f51acea 100644 --- a/app-emulation/vmware-modules/vmware-modules-238.5.ebuild +++ b/app-emulation/vmware-modules/vmware-modules-238.5.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/vmware-modules-238.5.ebuild,v 1.1 2011/10/08 18:04:57 vadimk Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/vmware-modules-238.5.ebuild,v 1.2 2012/01/10 14:53:41 vadimk Exp $ EAPI="2" @@ -64,6 +64,8 @@ src_prepare() { epatch "${FILESDIR}/${PV_MAJOR}-jobserver.patch" kernel_is ge 2 6 37 && epatch "${FILESDIR}/${PV_MAJOR}-sema.patch" kernel_is ge 2 6 39 && epatch "${FILESDIR}/${PV_MAJOR}-2.6.39.patch" + epatch "${FILESDIR}/${PV_MAJOR}-netdevice.patch" + epatch "${FILESDIR}/${PV_MAJOR}-3.2.0.patch" } src_install() {