Skip to content

Commit 63d8687

Browse files
author
Scott Wood
committed
Revert "powerpc/fsl_pci: simplify fsl_pci_dma_set_mask"
This reverts commit c6e5485 due to failures such as: e1000e 2000:01:00.0: Tx DMA map failed Signed-off-by: Scott Wood <oss@buserror.net>
1 parent 5f470b3 commit 63d8687

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

arch/powerpc/sysdev/fsl_pci.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ static int fsl_pci_dma_set_mask(struct device *dev, u64 dma_mask)
135135
* mapping that allows addressing any RAM address from across PCI.
136136
*/
137137
if (dev_is_pci(dev) && dma_mask >= pci64_dma_offset * 2 - 1) {
138-
dev->bus_dma_mask = 0;
138+
set_dma_ops(dev, &dma_nommu_ops);
139139
set_dma_offset(dev, pci64_dma_offset);
140140
}
141141

@@ -395,6 +395,10 @@ static void setup_pci_atmu(struct pci_controller *hose)
395395
out_be32(&pci->piw[win_idx].piwar, piwar);
396396
}
397397

398+
/*
399+
* install our own dma_set_mask handler to fixup dma_ops
400+
* and dma_offset
401+
*/
398402
ppc_md.dma_set_mask = fsl_pci_dma_set_mask;
399403

400404
pr_info("%pOF: Setup 64-bit PCI DMA window\n", hose->dn);

0 commit comments

Comments
 (0)