diff options
author | Evan Teran <evan.teran@gmail.com> | 2014-10-11 11:58:05 -0400 |
---|---|---|
committer | Evan Teran <evan.teran@gmail.com> | 2014-10-11 11:58:05 -0400 |
commit | b55dad0ffdcb610e070ebf66cc1f7bd5be37ea4a (patch) | |
tree | 3aea932b521fd1bb392ea22cb0e836e575aa27da /app-emulation/open-vm-tools-kmod/files | |
parent | now compiles on 3.17.0 :-) (diff) | |
download | vmware-b55dad0ffdcb610e070ebf66cc1f7bd5be37ea4a.tar.gz vmware-b55dad0ffdcb610e070ebf66cc1f7bd5be37ea4a.tar.bz2 vmware-b55dad0ffdcb610e070ebf66cc1f7bd5be37ea4a.zip |
synching open-vm-tools-kmod with latest in mainline
Diffstat (limited to 'app-emulation/open-vm-tools-kmod/files')
4 files changed, 42 insertions, 145 deletions
diff --git a/app-emulation/open-vm-tools-kmod/files/fragsize.patch b/app-emulation/open-vm-tools-kmod/files/fragsize.patch deleted file mode 100644 index 1f85df5..0000000 --- a/app-emulation/open-vm-tools-kmod/files/fragsize.patch +++ /dev/null @@ -1,104 +0,0 @@ -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/frozen.patch b/app-emulation/open-vm-tools-kmod/files/frozen.patch deleted file mode 100644 index 8b3fd7f..0000000 --- a/app-emulation/open-vm-tools-kmod/files/frozen.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -urpN a/modules/linux/vmsync/sync.c b/modules/linux/vmsync/sync.c ---- a/modules/linux/vmsync/sync.c 2012-08-01 19:02:59.000000000 -0700 -+++ b/modules/linux/vmsync/sync.c 2012-10-14 07:38:18.000000000 -0700 -@@ -162,7 +162,11 @@ VmSyncThawDevices(void *_state) // IN - cancel_delayed_work(&state->thawTask); - list_for_each_safe(cur, tmp, &state->devices) { - dev = list_entry(cur, VmSyncBlockDevice, list); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) -+ if (dev->sb != NULL && dev->sb->s_writers.frozen != SB_UNFROZEN) { -+#else - if (dev->sb != NULL && dev->sb->s_frozen != SB_UNFROZEN) { -+#endif - thaw_bdev(dev->bdev, dev->sb); - atomic_dec(&gFreezeCount); - } -@@ -237,7 +241,11 @@ VmSyncAddPath(const VmSyncState *state, - * the superblock is already frozen. - */ - if (inode->i_sb->s_bdev == NULL || -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) -+ inode->i_sb->s_writers.frozen != SB_UNFROZEN) { -+#else - inode->i_sb->s_frozen != SB_UNFROZEN) { -+#endif - result = (inode->i_sb->s_bdev == NULL) ? -EINVAL : -EALREADY; - compat_path_release(&nd); - goto exit; - diff --git a/app-emulation/open-vm-tools-kmod/files/putname.patch b/app-emulation/open-vm-tools-kmod/files/putname.patch deleted file mode 100644 index b605e12..0000000 --- a/app-emulation/open-vm-tools-kmod/files/putname.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/modules/linux/vmblock/linux/control.c b/modules/linux/vmblock/linux/control.c -index 79716bd..2dd83fe 100644 ---- a/modules/linux/vmblock/linux/control.c -+++ b/modules/linux/vmblock/linux/control.c -@@ -293,7 +293,7 @@ ExecuteBlockOp(const char __user *buf, // IN: buffer with name - - retval = i < 0 ? -EINVAL : blockOp(name, blocker); - -- putname(name); -+ __putname(name); - - return retval; - } diff --git a/app-emulation/open-vm-tools-kmod/files/vmhgfs-linux-3.11.patch b/app-emulation/open-vm-tools-kmod/files/vmhgfs-linux-3.11.patch new file mode 100644 index 0000000..3918162 --- /dev/null +++ b/app-emulation/open-vm-tools-kmod/files/vmhgfs-linux-3.11.patch @@ -0,0 +1,42 @@ +Source: https://github.com/rasa/vmware-tools-patches/ + +--- a/modules/linux/vmhgfs/inode.c ++++ b/modules/linux/vmhgfs/inode.c +@@ -31,6 +31,9 @@ + #include <linux/namei.h> + #endif + #include <linux/highmem.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) ++#include <linux/dcache.h> ++#endif + + #include "compat_cred.h" + #include "compat_fs.h" +@@ -1890,7 +1893,11 @@ + #endif + &inode->i_dentry, + d_alias) { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) ++ int dcount = d_count(dentry); ++#else + int dcount = dentry->d_count; ++#endif + if (dcount) { + LOG(4, ("Found %s %d \n", dentry->d_name.name, dcount)); + return HgfsAccessInt(dentry, mask & (MAY_READ | MAY_WRITE | MAY_EXEC)); +@@ -1943,10 +1950,12 @@ + list_for_each(pos, &inode->i_dentry) { + int dcount; + struct dentry *dentry = list_entry(pos, struct dentry, d_alias); +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 38) +- dcount = atomic_read(&dentry->d_count); +-#else ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) ++ dcount = d_count(dentry); ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) + dcount = dentry->d_count; ++#else ++ dcount = atomic_read(&dentry->d_count); + #endif + if (dcount) { + LOG(4, ("Found %s %d \n", (dentry)->d_name.name, dcount)); |