]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/backports-3.18.1-1_no_dma_sgtable_on_x86_64.patch
suricata: Change midstream policy to "pass-flow"
[ipfire-2.x.git] / src / patches / backports-3.18.1-1_no_dma_sgtable_on_x86_64.patch
1 diff -Naur backports-4.1.1-1.org/compat/dma-shared-helpers.c backports-4.1.1-1/compat/dma-shared-helpers.c
2 --- backports-4.1.1-1.org/compat/dma-shared-helpers.c 2015-07-01 23:10:37.000000000 +0200
3 +++ backports-4.1.1-1/compat/dma-shared-helpers.c 2015-09-25 13:29:14.006762269 +0200
4 @@ -20,22 +20,3 @@
5 #endif /* LINUX_VERSION_CODE <= KERNEL_VERSION(3,6,0) */
6 #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) */
7
8 -#if RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,0)
9 -/*
10 - * Create scatter-list for the already allocated DMA buffer.
11 - */
12 -int dma_common_get_sgtable(struct device *dev, struct sg_table *sgt,
13 - void *cpu_addr, dma_addr_t handle, size_t size)
14 -{
15 - struct page *page = virt_to_page(cpu_addr);
16 - int ret;
17 -
18 - ret = sg_alloc_table(sgt, 1, GFP_KERNEL);
19 - if (unlikely(ret))
20 - return ret;
21 -
22 - sg_set_page(sgt->sgl, page, PAGE_ALIGN(size), 0);
23 - return 0;
24 -}
25 -EXPORT_SYMBOL_GPL(dma_common_get_sgtable);
26 -#endif /* RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,0) */