|
@@ -1597,9 +1597,10 @@ static int pnv_pci_ioda_dma_set_mask(struct pci_dev *pdev, u64 dma_mask)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-static u64 pnv_pci_ioda_dma_get_required_mask(struct pnv_phb *phb,
|
|
|
|
- struct pci_dev *pdev)
|
|
|
|
|
|
+static u64 pnv_pci_ioda_dma_get_required_mask(struct pci_dev *pdev)
|
|
{
|
|
{
|
|
|
|
+ struct pci_controller *hose = pci_bus_to_host(pdev->bus);
|
|
|
|
+ struct pnv_phb *phb = hose->private_data;
|
|
struct pci_dn *pdn = pci_get_pdn(pdev);
|
|
struct pci_dn *pdn = pci_get_pdn(pdev);
|
|
struct pnv_ioda_pe *pe;
|
|
struct pnv_ioda_pe *pe;
|
|
u64 end, mask;
|
|
u64 end, mask;
|
|
@@ -3024,6 +3025,7 @@ static const struct pci_controller_ops pnv_pci_ioda_controller_ops = {
|
|
.window_alignment = pnv_pci_window_alignment,
|
|
.window_alignment = pnv_pci_window_alignment,
|
|
.reset_secondary_bus = pnv_pci_reset_secondary_bus,
|
|
.reset_secondary_bus = pnv_pci_reset_secondary_bus,
|
|
.dma_set_mask = pnv_pci_ioda_dma_set_mask,
|
|
.dma_set_mask = pnv_pci_ioda_dma_set_mask,
|
|
|
|
+ .dma_get_required_mask = pnv_pci_ioda_dma_get_required_mask,
|
|
.shutdown = pnv_pci_ioda_shutdown,
|
|
.shutdown = pnv_pci_ioda_shutdown,
|
|
};
|
|
};
|
|
|
|
|
|
@@ -3170,7 +3172,6 @@ static void __init pnv_pci_init_ioda_phb(struct device_node *np,
|
|
|
|
|
|
/* Setup TCEs */
|
|
/* Setup TCEs */
|
|
phb->dma_dev_setup = pnv_pci_ioda_dma_dev_setup;
|
|
phb->dma_dev_setup = pnv_pci_ioda_dma_dev_setup;
|
|
- phb->dma_get_required_mask = pnv_pci_ioda_dma_get_required_mask;
|
|
|
|
|
|
|
|
/* Setup MSI support */
|
|
/* Setup MSI support */
|
|
pnv_pci_init_ioda_msis(phb);
|
|
pnv_pci_init_ioda_msis(phb);
|