summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2021-11-05 11:28:44 -0500
committerBjorn Helgaas <bhelgaas@google.com>2021-11-05 11:28:44 -0500
commit1f948b88b148d8392cb98540ea4d0d268dc257e0 (patch)
tree7dc6eb3108c1f2ff8db0a240555fffb20b7cc1b2 /drivers/pci
parentefe6856390bae3a2aa170bdd51c34b8832b83bc6 (diff)
parent3a19407913e8e43d6b799a59bc0f6cae889b5446 (diff)
Merge branch 'pci/p2pdma'
- Apply bus offset correctly in DMA address calculation, which used the wrong sign before (Wang Lu) * pci/p2pdma: PCI/P2PDMA: Apply bus offset correctly in DMA address calculation
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/p2pdma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
index 50cdde3e9a8b..327882638b30 100644
--- a/drivers/pci/p2pdma.c
+++ b/drivers/pci/p2pdma.c
@@ -874,7 +874,7 @@ static int __pci_p2pdma_map_sg(struct pci_p2pdma_pagemap *p2p_pgmap,
int i;
for_each_sg(sg, s, nents, i) {
- s->dma_address = sg_phys(s) - p2p_pgmap->bus_offset;
+ s->dma_address = sg_phys(s) + p2p_pgmap->bus_offset;
sg_dma_len(s) = s->length;
}