diff options
author | Vadim Kuznetsov <vadimk@gentoo.org> | 2012-02-04 16:15:00 +0000 |
---|---|---|
committer | Vadim Kuznetsov <vadimk@gentoo.org> | 2012-02-04 16:15:00 +0000 |
commit | f133459d7f91214264dcc3f26274f55ddb4e8c75 (patch) | |
tree | c1903ad0844d58745cf7f1ab8c13c9a31145bab8 /app-emulation/open-vm-tools-kmod/files | |
parent | open-vm-tools: version bump (masked) (diff) | |
download | vmware-f133459d7f91214264dcc3f26274f55ddb4e8c75.tar.gz vmware-f133459d7f91214264dcc3f26274f55ddb4e8c75.tar.bz2 vmware-f133459d7f91214264dcc3f26274f55ddb4e8c75.zip |
open-vm-tools-kmod: patches for kernel ge 3.2.0
open-vm-tools-2011.12.20.562307 version bump.
svn path=/trunk/; revision=533
Diffstat (limited to 'app-emulation/open-vm-tools-kmod/files')
3 files changed, 161 insertions, 0 deletions
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 0000000..1f85df5 --- /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 0000000..6589705 --- /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 0000000..9ae4fe7 --- /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 |