projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63dd9b4
)
s390/pci: return correct dma address for offset > PAGE_SIZE
author
Gerald Schaefer
<
[email protected]
>
Mon, 22 Apr 2013 17:27:17 +0000
(19:27 +0200)
committer
Martin Schwidefsky
<
[email protected]
>
Tue, 23 Apr 2013 08:18:16 +0000
(10:18 +0200)
For offset > PAGE_SIZE, s390_dma_map_pages() will issue a warning
and return a wrong dma address.
This patch removes the warning and fixes the dma return address
calculation.
Signed-off-by: Gerald Schaefer <
[email protected]
>
Signed-off-by: Martin Schwidefsky <
[email protected]
>
arch/s390/pci/pci_dma.c
patch
|
blob
|
history
diff --git
a/arch/s390/pci/pci_dma.c
b/arch/s390/pci/pci_dma.c
index 60e4999e6b67bbfd7f4594de2072cb46726301db..f8e69d5bc0a90631cb12c43fbe3b01e02786e7ea 100644
(file)
--- a/
arch/s390/pci/pci_dma.c
+++ b/
arch/s390/pci/pci_dma.c
@@
-269,8
+269,6
@@
static dma_addr_t s390_dma_map_pages(struct device *dev, struct page *page,
int flags = ZPCI_PTE_VALID;
dma_addr_t dma_addr;
- WARN_ON_ONCE(offset > PAGE_SIZE);
-
/* This rounds up number of pages based on size and offset */
nr_pages = iommu_num_pages(pa, size, PAGE_SIZE);
iommu_page_index = dma_alloc_iommu(zdev, nr_pages);
@@
-292,7
+290,7
@@
static dma_addr_t s390_dma_map_pages(struct device *dev, struct page *page,
if (!dma_update_trans(zdev, pa, dma_addr, size, flags)) {
atomic64_add(nr_pages, (atomic64_t *) &zdev->fmb->mapped_pages);
- return dma_addr +
offset
;
+ return dma_addr +
(offset & ~PAGE_MASK)
;
}
out_free: