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
This commit is contained in:
Bjorn Helgaas 2021-11-05 11:28:44 -05:00
commit 1f948b88b1

View File

@ -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;
}