summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Kuznetsov <vadimk@gentoo.org>2012-02-04 16:34:59 +0000
committerVadim Kuznetsov <vadimk@gentoo.org>2012-02-04 16:34:59 +0000
commit5621585fdd8000b7a0b4ead87cf9a0e4b3f53165 (patch)
treeb835dbc568e5e9e5238f48802e8a12553dbbfd36 /app-emulation/open-vm-tools-kmod
parentAdd ~arm/~s390/~sh (diff)
downloadgentoo-2-5621585fdd8000b7a0b4ead87cf9a0e4b3f53165.tar.gz
gentoo-2-5621585fdd8000b7a0b4ead87cf9a0e4b3f53165.tar.bz2
gentoo-2-5621585fdd8000b7a0b4ead87cf9a0e4b3f53165.zip
patches for kernel ge 3.2.0
(Portage version: 2.1.10.44/cvs/Linux x86_64)
Diffstat (limited to 'app-emulation/open-vm-tools-kmod')
-rw-r--r--app-emulation/open-vm-tools-kmod/ChangeLog10
-rw-r--r--app-emulation/open-vm-tools-kmod/files/fragsize.patch104
-rw-r--r--app-emulation/open-vm-tools-kmod/files/moduleparam.patch12
-rw-r--r--app-emulation/open-vm-tools-kmod/files/setnlink.patch45
-rw-r--r--app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-2011.11.20.535097.ebuild7
-rw-r--r--app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-8.8.1.528969.ebuild7
6 files changed, 179 insertions, 6 deletions
diff --git a/app-emulation/open-vm-tools-kmod/ChangeLog b/app-emulation/open-vm-tools-kmod/ChangeLog
index 245aece935e9..ac1ee4360450 100644
--- a/app-emulation/open-vm-tools-kmod/ChangeLog
+++ b/app-emulation/open-vm-tools-kmod/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-emulation/open-vm-tools-kmod
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/open-vm-tools-kmod/ChangeLog,v 1.21 2011/12/03 18:33:48 vadimk Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/open-vm-tools-kmod/ChangeLog,v 1.22 2012/02/04 16:34:59 vadimk Exp $
+
+ 04 Feb 2012; Vadim Kuznetsov <vadimk@gentoo.org> +files/fragsize.patch,
+ +files/moduleparam.patch, +files/setnlink.patch,
+ open-vm-tools-kmod-2011.11.20.535097.ebuild,
+ open-vm-tools-kmod-8.8.1.528969.ebuild:
+ patches for kernel ge 3.2.0
*open-vm-tools-kmod-2011.11.20.535097 (03 Dec 2011)
*open-vm-tools-kmod-8.8.1.528969 (03 Dec 2011)
diff --git a/app-emulation/open-vm-tools-kmod/files/fragsize.patch b/app-emulation/open-vm-tools-kmod/files/fragsize.patch
new file mode 100644
index 000000000000..1f85df500884
--- /dev/null
+++ b/app-emulation/open-vm-tools-kmod/files/fragsize.patch
@@ -0,0 +1,104 @@
+diff --git a/modules/linux/vmxnet/vmxnet.c b/modules/linux/vmxnet/vmxnet.c
+index a6f5740..3c75bb2 100644
+--- a/modules/linux/vmxnet/vmxnet.c
++++ b/modules/linux/vmxnet/vmxnet.c
+@@ -989,7 +989,7 @@ vmxnet_probe_device(struct pci_dev *pdev, // IN: vmxnet PCI device
+ .ndo_start_xmit = &vmxnet_start_tx,
+ .ndo_stop = &vmxnet_close,
+ .ndo_get_stats = &vmxnet_get_stats,
+- .ndo_set_multicast_list = &vmxnet_set_multicast_list,
++ .ndo_set_rx_mode = &vmxnet_set_multicast_list,
+ .ndo_change_mtu = &vmxnet_change_mtu,
+ # ifdef VMW_HAVE_POLL_CONTROLLER
+ .ndo_poll_controller = vmxnet_netpoll,
+@@ -2033,21 +2033,23 @@ vmxnet_map_pkt(struct sk_buff *skb,
+ offset -= skb_headlen(skb);
+
+ for ( ; nextFrag < skb_shinfo(skb)->nr_frags; nextFrag++){
++ int fragSize;
+ frag = &skb_shinfo(skb)->frags[nextFrag];
++ fragSize = skb_frag_size(frag);
+
+ // skip those frags that are completely copied
+- if (offset >= frag->size){
+- offset -= frag->size;
++ if (offset >= fragSize){
++ offset -= fragSize;
+ } else {
+ // map the part of the frag that is not copied
+ dma = pci_map_page(lp->pdev,
+- frag->page,
++ frag->page.p,
+ frag->page_offset + offset,
+- frag->size - offset,
++ fragSize - offset,
+ PCI_DMA_TODEVICE);
+- VMXNET_FILL_SG(xre->sg.sg[nextSg], dma, frag->size - offset);
++ VMXNET_FILL_SG(xre->sg.sg[nextSg], dma, fragSize - offset);
+ VMXNET_LOG("vmxnet_map_tx: txRing[%u].sg[%d] -> frag[%d]+%u (%uB)\n",
+- dd->txDriverNext, nextSg, nextFrag, offset, frag->size - offset);
++ dd->txDriverNext, nextSg, nextFrag, offset, fragSize - offset);
+ nextSg++;
+ nextFrag++;
+
+@@ -2058,11 +2060,14 @@ vmxnet_map_pkt(struct sk_buff *skb,
+
+ // map the remaining frags, we might need to use additional tx entries
+ for ( ; nextFrag < skb_shinfo(skb)->nr_frags; nextFrag++) {
++ int fragSize;
+ frag = &skb_shinfo(skb)->frags[nextFrag];
++ fragSize = skb_frag_size(frag);
++
+ dma = pci_map_page(lp->pdev,
+- frag->page,
++ frag->page.p,
+ frag->page_offset,
+- frag->size,
++ fragSize,
+ PCI_DMA_TODEVICE);
+
+ if (nextSg == VMXNET2_SG_DEFAULT_LENGTH) {
+@@ -2091,9 +2096,9 @@ vmxnet_map_pkt(struct sk_buff *skb,
+
+ nextSg = 0;
+ }
+- VMXNET_FILL_SG(xre->sg.sg[nextSg], dma, frag->size);
++ VMXNET_FILL_SG(xre->sg.sg[nextSg], dma, fragSize);
+ VMXNET_LOG("vmxnet_map_tx: txRing[%u].sg[%d] -> frag[%d] (%uB)\n",
+- dd->txDriverNext, nextSg, nextFrag, frag->size);
++ dd->txDriverNext, nextSg, nextFrag, fragSize);
+ nextSg++;
+ }
+
+@@ -2548,7 +2553,7 @@ vmxnet_rx_frags(Vmxnet_Private *lp, struct sk_buff *skb)
+ if (UNLIKELY(newPage == NULL)) {
+ skb_shinfo(skb)->nr_frags = numFrags;
+ skb->len += skb->data_len;
+- skb->truesize += skb->data_len;
++ skb->truesize += PAGE_SIZE;
+
+ compat_dev_kfree_skb(skb, FREE_WRITE);
+
+@@ -2558,10 +2563,12 @@ vmxnet_rx_frags(Vmxnet_Private *lp, struct sk_buff *skb)
+ }
+
+ pci_unmap_page(pdev, rre2->paddr, PAGE_SIZE, PCI_DMA_FROMDEVICE);
+- skb_shinfo(skb)->frags[numFrags].page = lp->rxPages[dd->rxDriverNext2];
++ __skb_frag_set_page(&skb_shinfo(skb)->frags[numFrags],
++ lp->rxPages[dd->rxDriverNext2]);
+ skb_shinfo(skb)->frags[numFrags].page_offset = 0;
+ skb_shinfo(skb)->frags[numFrags].size = rre2->actualLength;
+ skb->data_len += rre2->actualLength;
++ skb->truesize += PAGE_SIZE;
+ numFrags++;
+
+ /* refill the buffer */
+@@ -2579,7 +2586,7 @@ vmxnet_rx_frags(Vmxnet_Private *lp, struct sk_buff *skb)
+ VMXNET_ASSERT(numFrags > 0);
+ skb_shinfo(skb)->nr_frags = numFrags;
+ skb->len += skb->data_len;
+- skb->truesize += skb->data_len;
++ skb->truesize += PAGE_SIZE;
+ VMXNET_LOG("vmxnet_rx: %dB from rxRing[%d](%dB)+rxRing2[%d, %d)(%dB)\n",
+ skb->len, dd->rxDriverNext, skb_headlen(skb),
+ firstFrag, dd->rxDriverNext2, skb->data_len);
diff --git a/app-emulation/open-vm-tools-kmod/files/moduleparam.patch b/app-emulation/open-vm-tools-kmod/files/moduleparam.patch
new file mode 100644
index 000000000000..6589705a3a1c
--- /dev/null
+++ b/app-emulation/open-vm-tools-kmod/files/moduleparam.patch
@@ -0,0 +1,12 @@
+diff --git a/modules/linux/vmhgfs/tcp.c b/modules/linux/vmhgfs/tcp.c
+index c7070a6..31a40df 100644
+--- a/modules/linux/vmhgfs/tcp.c
++++ b/modules/linux/vmhgfs/tcp.c
+@@ -32,6 +32,7 @@
+ #include <linux/in.h>
+ #include <linux/net.h>
+ #include <linux/inet.h>
++#include <linux/moduleparam.h>
+ #include <linux/errno.h>
+ #include <linux/kthread.h>
+
diff --git a/app-emulation/open-vm-tools-kmod/files/setnlink.patch b/app-emulation/open-vm-tools-kmod/files/setnlink.patch
new file mode 100644
index 000000000000..9ae4fe7a4fef
--- /dev/null
+++ b/app-emulation/open-vm-tools-kmod/files/setnlink.patch
@@ -0,0 +1,45 @@
+diff --git a/modules/linux/vmhgfs/fsutil.c b/modules/linux/vmhgfs/fsutil.c
+index 0c5102b..a978005 100644
+--- a/modules/linux/vmhgfs/fsutil.c
++++ b/modules/linux/vmhgfs/fsutil.c
+@@ -62,6 +62,31 @@ static int HgfsPackGetattrRequest(HgfsReq *req,
+ * Private function implementations.
+ */
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
++/*
++ *----------------------------------------------------------------------------
++ *
++ * set_nlink --
++ *
++ * Set an inode's link count.
++ *
++ * Results:
++ * None
++ *
++ * Side effects:
++ * None
++ *
++ *----------------------------------------------------------------------------
++ */
++
++static inline void
++set_nlink(struct inode *inode, unsigned int nlink)
++{
++ inode->i_nlink = nlink;
++}
++#endif
++
++
+ /*
+ *----------------------------------------------------------------------
+ *
+@@ -607,7 +632,7 @@ HgfsChangeFileAttributes(struct inode *inode, // IN/OUT: Inode
+ * account for '.' and ".."), and find printed a hard link error. So until
+ * we have getattr support for nlink, everyone gets 1.
+ */
+- inode->i_nlink = 1;
++ set_nlink(inode, 1);
+
+ /*
+ * Use the stored uid and gid if we were given them at mount-time, or if
diff --git a/app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-2011.11.20.535097.ebuild b/app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-2011.11.20.535097.ebuild
index bf6b93ddd1eb..902728e29563 100644
--- a/app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-2011.11.20.535097.ebuild
+++ b/app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-2011.11.20.535097.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/open-vm-tools-kmod/open-vm-tools-kmod-2011.11.20.535097.ebuild,v 1.1 2011/12/03 18:33:48 vadimk Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-2011.11.20.535097.ebuild,v 1.2 2012/02/04 16:34:59 vadimk Exp $
EAPI="4"
@@ -51,6 +51,9 @@ pkg_setup() {
src_prepare() {
sed -i.bak -e '/\smake\s/s/make/$(MAKE)/g' modules/linux/{vmblock,vmci,vmhgfs,vmsync,vmxnet,vsock}/Makefile\
|| die "Sed failed."
+ kernel_is ge 3 2 0 && epatch "${FILESDIR}/moduleparam.patch"
+ kernel_is ge 3 2 0 && epatch "${FILESDIR}/setnlink.patch"
+ kernel_is ge 3 2 0 && epatch "${FILESDIR}/fragsize.patch"
}
src_configure() {
diff --git a/app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-8.8.1.528969.ebuild b/app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-8.8.1.528969.ebuild
index 214fa645a686..1d0def00d634 100644
--- a/app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-8.8.1.528969.ebuild
+++ b/app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-8.8.1.528969.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/open-vm-tools-kmod/open-vm-tools-kmod-8.8.1.528969.ebuild,v 1.1 2011/12/03 18:33:48 vadimk Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-8.8.1.528969.ebuild,v 1.2 2012/02/04 16:34:59 vadimk Exp $
EAPI="4"
@@ -51,6 +51,9 @@ pkg_setup() {
src_prepare() {
sed -i.bak -e '/\smake\s/s/make/$(MAKE)/g' modules/linux/{vmblock,vmci,vmhgfs,vmsync,vmxnet,vsock}/Makefile\
|| die "Sed failed."
+ kernel_is ge 3 2 0 && epatch "${FILESDIR}/moduleparam.patch"
+ kernel_is ge 3 2 0 && epatch "${FILESDIR}/setnlink.patch"
+ kernel_is ge 3 2 0 && epatch "${FILESDIR}/fragsize.patch"
}
src_configure() {