]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.xen/933-usb-mon-dma.patch
Imported linux-2.6.27.39 suse/xen patches.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.xen / 933-usb-mon-dma.patch
1 From: http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/1fcc9557d5ef
2 # HG changeset patch
3 # User Keir Fraser <keir.fraser@citrix.com>
4 # Date 1253603047 -3600
5 # Node ID 1fcc9557d5ef55d03b128a04cab4bd7227413aa7
6 # Parent eebccbc294dad786b2b14892bf1e60d0034f8f0d
7 Subject: xen/usb: force proper address translation in USB monitor
8 Patch-mainline: n/a
9
10 Signed-off-by: Jan Beulich <jbeulich@novell.com>
11
12 --- sle11-2009-09-18.orig/drivers/usb/mon/mon_dma.c 2007-04-26 05:08:32.000000000 +0200
13 +++ sle11-2009-09-18/drivers/usb/mon/mon_dma.c 2009-09-18 11:13:41.000000000 +0200
14 @@ -19,7 +19,11 @@
15 #if defined(__i386__) || defined(__x86_64__) /* CONFIG_ARCH_I386 doesn't exit */
16 #define MON_HAS_UNMAP 1
17
18 +#ifndef CONFIG_XEN
19 #define phys_to_page(phys) pfn_to_page((phys) >> PAGE_SHIFT)
20 +#else
21 +#define phys_to_page(phys) pfn_to_page(mfn_to_local_pfn((phys) >> PAGE_SHIFT))
22 +#endif
23
24 char mon_dmapeek(unsigned char *dst, dma_addr_t dma_addr, int len)
25 {