1 |
vadimk 12/01/06 14:30:38 |
2 |
|
3 |
Added: 264-3.2.0.patch |
4 |
Log: |
5 |
added patch for 3.2 kernel |
6 |
|
7 |
(Portage version: 2.1.10.44/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 app-emulation/vmware-modules/files/264-3.2.0.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/vmware-modules/files/264-3.2.0.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/vmware-modules/files/264-3.2.0.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: 264-3.2.0.patch |
16 |
=================================================================== |
17 |
diff --git a/vmmon-only/linux/iommu.c b/vmmon-only/linux/iommu.c |
18 |
index c692c2d..e8b6099 100644 |
19 |
--- a/vmmon-only/linux/iommu.c |
20 |
+++ b/vmmon-only/linux/iommu.c |
21 |
@@ -42,6 +42,12 @@ |
22 |
#define PCI_BDF_SLOTFUNC(bdf) PCI_DEVFN(PCI_SLOT(bdf), PCI_FUNC(bdf)) |
23 |
#define PCI_BDF_BUS(bdf) (((bdf) >> 8) & 0xff) |
24 |
|
25 |
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) |
26 |
+#include <linux/pci.h> |
27 |
+#define iommu_found() iommu_present(&pci_bus_type) |
28 |
+#define iommu_domain_alloc() iommu_domain_alloc(&pci_bus_type) |
29 |
+#endif |
30 |
+ |
31 |
typedef struct PassthruDevice { |
32 |
uint32 bdf; |
33 |
struct pci_dev *pdev; |
34 |
diff --git a/vmnet-only/filter.c b/vmnet-only/filter.c |
35 |
index 491add5..74f7a3b 100644 |
36 |
--- a/vmnet-only/filter.c |
37 |
+++ b/vmnet-only/filter.c |
38 |
@@ -40,6 +40,10 @@ |
39 |
#include "vnetInt.h" |
40 |
#include "vmnetInt.h" |
41 |
|
42 |
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) |
43 |
+#include <linux/export.h> |
44 |
+#endif |
45 |
+ |
46 |
// VNet_FilterLogPacket.action for dropped packets |
47 |
#define VNET_FILTER_ACTION_DRP (1) |
48 |
#define VNET_FILTER_ACTION_DRP_SHORT (2) |
49 |
diff --git a/vmnet-only/netif.c b/vmnet-only/netif.c |
50 |
index 4bdb643..540301c 100644 |
51 |
--- a/vmnet-only/netif.c |
52 |
+++ b/vmnet-only/netif.c |
53 |
@@ -62,7 +62,9 @@ static int VNetNetifClose(struct net_device *dev); |
54 |
static int VNetNetifStartXmit(struct sk_buff *skb, struct net_device *dev); |
55 |
static struct net_device_stats *VNetNetifGetStats(struct net_device *dev); |
56 |
static int VNetNetifSetMAC(struct net_device *dev, void *addr); |
57 |
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) |
58 |
static void VNetNetifSetMulticast(struct net_device *dev); |
59 |
+#endif |
60 |
#if 0 |
61 |
static void VNetNetifTxTimeout(struct net_device *dev); |
62 |
#endif |
63 |
@@ -131,7 +133,9 @@ VNetNetIfSetup(struct net_device *dev) // IN: |
64 |
.ndo_stop = VNetNetifClose, |
65 |
.ndo_get_stats = VNetNetifGetStats, |
66 |
.ndo_set_mac_address = VNetNetifSetMAC, |
67 |
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0) |
68 |
.ndo_set_multicast_list = VNetNetifSetMulticast, |
69 |
+#endif |
70 |
/* |
71 |
* We cannot stuck... If someone will report problems under |
72 |
* low memory conditions or some such, we should enable it. |
73 |
@@ -612,11 +616,12 @@ VNetNetifSetMAC(struct net_device *dev, // IN: |
74 |
*---------------------------------------------------------------------- |
75 |
*/ |
76 |
|
77 |
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) |
78 |
void |
79 |
VNetNetifSetMulticast(struct net_device *dev) // IN: unused |
80 |
{ |
81 |
} |
82 |
- |
83 |
+#endif |
84 |
|
85 |
/* |
86 |
*---------------------------------------------------------------------- |
87 |
diff --git a/vmnet-only/userif.c b/vmnet-only/userif.c |
88 |
index 541187b..77e0089 100644 |
89 |
--- a/vmnet-only/userif.c |
90 |
+++ b/vmnet-only/userif.c |
91 |
@@ -517,10 +517,18 @@ VNetCsumCopyDatagram(const struct sk_buff *skb, // IN: skb to copy |
92 |
unsigned int tmpCsum; |
93 |
const void *vaddr; |
94 |
|
95 |
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) |
96 |
+ vaddr = kmap(skb_frag_page(frag)); |
97 |
+#else |
98 |
vaddr = kmap(frag->page); |
99 |
+#endif |
100 |
tmpCsum = csum_and_copy_to_user(vaddr + frag->page_offset, |
101 |
curr, frag->size, 0, &err); |
102 |
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) |
103 |
+ kunmap(skb_frag_page(frag)); |
104 |
+#else |
105 |
kunmap(frag->page); |
106 |
+#endif |
107 |
if (err) { |
108 |
return err; |
109 |
} |