packages: open-vm-tools/open-vm-tools.spec, open-vm-tools/open-vm-tools-ker...

baggins baggins at pld-linux.org
Fri Apr 6 22:00:45 CEST 2012


Author: baggins                      Date: Fri Apr  6 20:00:45 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- fix vmxnet build with kernels 3.2+

---- Files affected:
packages/open-vm-tools:
   open-vm-tools.spec (1.136 -> 1.137) , open-vm-tools-kernel-3.2.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/open-vm-tools/open-vm-tools.spec
diff -u packages/open-vm-tools/open-vm-tools.spec:1.136 packages/open-vm-tools/open-vm-tools.spec:1.137
--- packages/open-vm-tools/open-vm-tools.spec:1.136	Fri Apr  6 21:59:43 2012
+++ packages/open-vm-tools/open-vm-tools.spec	Fri Apr  6 22:00:40 2012
@@ -27,6 +27,7 @@
 Source2:	%{name}-modprobe.d
 Source3:	%{name}-init
 Source4:	%{name}-vmware-user.desktop
+Patch0:		%{name}-kernel-3.2.patch
 URL:		http://open-vm-tools.sourceforge.net/
 BuildRequires:	rpmbuild(macros) >= 1.453
 %if %{with userspace}
@@ -220,6 +221,8 @@
 %prep
 #setup -q -n %{name}-%{snap}-%{rev}
 %setup -q -n %{name}-%{ver}-%{rev}
+%patch0 -p1
+
 cp %{SOURCE1} packaging
 %{__sed} -i -e 's|##{BUILD_OUTPUT}##|build|' docs/api/doxygen.conf
 
@@ -412,6 +415,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.137  2012/04/06 20:00:40  baggins
+- fix vmxnet build with kernels 3.2+
+
 Revision 1.136  2012/04/06 19:59:43  baggins
 - up to 8.8.2-590212
 

================================================================
Index: packages/open-vm-tools/open-vm-tools-kernel-3.2.patch
diff -u /dev/null packages/open-vm-tools/open-vm-tools-kernel-3.2.patch:1.1
--- /dev/null	Fri Apr  6 22:00:45 2012
+++ packages/open-vm-tools/open-vm-tools-kernel-3.2.patch	Fri Apr  6 22:00:40 2012
@@ -0,0 +1,50 @@
+--- open-vm-tools-8.8.2-590212/modules/linux/vmxnet/vmxnet.c.orig	2012-03-16 01:46:19.000000000 +0100
++++ open-vm-tools-8.8.2-590212/modules/linux/vmxnet/vmxnet.c	2012-04-06 21:44:30.147182151 +0200
+@@ -1005,7 +1005,11 @@
+       .ndo_start_xmit = &vmxnet_start_tx,
+       .ndo_stop = &vmxnet_close,
+       .ndo_get_stats = &vmxnet_get_stats,
++#   if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)
++      .ndo_set_rx_mode = &vmxnet_set_multicast_list,
++#   else
+       .ndo_set_multicast_list = &vmxnet_set_multicast_list,
++#   endif
+       .ndo_change_mtu = &vmxnet_change_mtu,
+ #   ifdef VMW_HAVE_POLL_CONTROLLER
+       .ndo_poll_controller = vmxnet_netpoll,
+@@ -2079,7 +2083,11 @@
+          } else {
+             // map the part of the frag that is not copied
+             dma = pci_map_page(lp->pdev,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)
++                               frag->page.p,
++#else
+                                frag->page,
++#endif
+                                frag->page_offset + offset,
+                                frag->size - offset,
+                                PCI_DMA_TODEVICE);
+@@ -2098,7 +2106,11 @@
+    for ( ; nextFrag < skb_shinfo(skb)->nr_frags; nextFrag++) {
+       frag = &skb_shinfo(skb)->frags[nextFrag];
+       dma = pci_map_page(lp->pdev,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)
++                         frag->page.p,
++#else
+                          frag->page,
++#endif
+                          frag->page_offset,
+                          frag->size,
+                          PCI_DMA_TODEVICE);
+@@ -2596,7 +2608,11 @@
+          }
+ 
+          pci_unmap_page(pdev, rre2->paddr, PAGE_SIZE, PCI_DMA_FROMDEVICE);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)
++         skb_shinfo(skb)->frags[numFrags].page.p = lp->rxPages[dd->rxDriverNext2];
++#else
+          skb_shinfo(skb)->frags[numFrags].page = lp->rxPages[dd->rxDriverNext2];
++#endif
+          skb_shinfo(skb)->frags[numFrags].page_offset = 0;
+          skb_shinfo(skb)->frags[numFrags].size = rre2->actualLength;
+          skb->data_len += rre2->actualLength;
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/packages/open-vm-tools/open-vm-tools.spec?r1=1.136&r2=1.137



More information about the pld-cvs-commit mailing list