pci-v5.10-fixes-1
-----BEGIN PGP SIGNATURE----- iQJIBAABCgAyFiEEgMe7l+5h9hnxdsnuWYigwDrT+vwFAl+jExMUHGJoZWxnYWFz QGdvb2dsZS5jb20ACgkQWYigwDrT+vzweRAAkFJPHpi8ZL+2zX9U/mEPZsP0X8j+ ulYoPn41NUuEWTObv3MFBXCrYcvacbAYBc109ih1gchbpgr2Khipn2NEZbPmlUc2 EQbIZJ5GO2z9DZc7UEZRqU3MU74YwAfVUSE5Su4Z8/L+5PXkwIzJFrbZFzEyucg3 lfT2HCrQcky2MzN2eo/1SBvrd6kZxrasBtLFBwP9NvBXWeYOwOz7vVRzY54xDqeg Tary2xUiVOrm84ELa1QaKqc5eozp0qw6URhRStp98iDTPWhubgk148FZMWst5/dp Vq9oPnZQ8ViLqgb6vHSoex4w2ZsJBquHNeICf7CGhwyTp+M6Fp4yt7dtu20d7ff2 UPAWC/lGUZeYks5Esp5CtcFB6vvBxMxu0hYkTVAr+v0TaQmKTADvJZKSCn+M9SwR +D0hqEgh3rdzB4pisbV/obdEFCnHjaioV0OXNeR+3E1sEXSj0vx7XLjuUfk6VTly Y+/c/SReYmYAHfiPPArboWJCbfLJqm1R42dtfRAg5tmSjuUMgPxWqCcHY4USadK3 o2I9zXaeP9QhJpwexo0FZOZEWKxYyl2RSodgiIfqMzrf35bYwgK7sgiiLnRM117k yhMBIw3kwDd2YuFbOnu5SXza/qWbcBZMjrT2sHO5CGVSRiwy5pqEZwmDknqwhONn bLj4Czp9ZqC5ObM= =lCCR -----END PGP SIGNATURE----- Merge tag 'pci-v5.10-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - Fix ACS regression that broke device pass-through (Rajat Jain) - Revert DesignWare ATU memory resource to use last entry to fix Tegra194 regression (Rob Herring) - Remove duplicate mvebu resource requests to fix regression on Turris Omnia (Rob Herring) * tag 'pci-v5.10-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: mvebu: Fix duplicate resource requests PCI: dwc: Restore ATU memory resource setup to use last entry PCI: Always enable ACS even if no ACS Capability
This commit is contained in:
commit
e2557a2cde
@ -586,8 +586,12 @@ void dw_pcie_setup_rc(struct pcie_port *pp)
|
||||
* ATU, so we should not program the ATU here.
|
||||
*/
|
||||
if (pp->bridge->child_ops == &dw_child_pcie_ops) {
|
||||
struct resource_entry *entry =
|
||||
resource_list_first_type(&pp->bridge->windows, IORESOURCE_MEM);
|
||||
struct resource_entry *tmp, *entry = NULL;
|
||||
|
||||
/* Get last memory resource entry */
|
||||
resource_list_for_each_entry(tmp, &pp->bridge->windows)
|
||||
if (resource_type(tmp->res) == IORESOURCE_MEM)
|
||||
entry = tmp;
|
||||
|
||||
dw_pcie_prog_outbound_atu(pci, PCIE_ATU_REGION_INDEX0,
|
||||
PCIE_ATU_TYPE_MEM, entry->res->start,
|
||||
|
@ -958,25 +958,16 @@ static void mvebu_pcie_powerdown(struct mvebu_pcie_port *port)
|
||||
}
|
||||
|
||||
/*
|
||||
* We can't use devm_of_pci_get_host_bridge_resources() because we
|
||||
* need to parse our special DT properties encoding the MEM and IO
|
||||
* apertures.
|
||||
* devm_of_pci_get_host_bridge_resources() only sets up translateable resources,
|
||||
* so we need extra resource setup parsing our special DT properties encoding
|
||||
* the MEM and IO apertures.
|
||||
*/
|
||||
static int mvebu_pcie_parse_request_resources(struct mvebu_pcie *pcie)
|
||||
{
|
||||
struct device *dev = &pcie->pdev->dev;
|
||||
struct device_node *np = dev->of_node;
|
||||
struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie);
|
||||
int ret;
|
||||
|
||||
/* Get the bus range */
|
||||
ret = of_pci_parse_bus_range(np, &pcie->busn);
|
||||
if (ret) {
|
||||
dev_err(dev, "failed to parse bus-range property: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
pci_add_resource(&bridge->windows, &pcie->busn);
|
||||
|
||||
/* Get the PCIe memory aperture */
|
||||
mvebu_mbus_get_pcie_mem_aperture(&pcie->mem);
|
||||
if (resource_size(&pcie->mem) == 0) {
|
||||
@ -986,6 +977,9 @@ static int mvebu_pcie_parse_request_resources(struct mvebu_pcie *pcie)
|
||||
|
||||
pcie->mem.name = "PCI MEM";
|
||||
pci_add_resource(&bridge->windows, &pcie->mem);
|
||||
ret = devm_request_resource(dev, &iomem_resource, &pcie->mem);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Get the PCIe IO aperture */
|
||||
mvebu_mbus_get_pcie_io_aperture(&pcie->io);
|
||||
@ -999,9 +993,12 @@ static int mvebu_pcie_parse_request_resources(struct mvebu_pcie *pcie)
|
||||
pcie->realio.name = "PCI I/O";
|
||||
|
||||
pci_add_resource(&bridge->windows, &pcie->realio);
|
||||
ret = devm_request_resource(dev, &ioport_resource, &pcie->realio);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return devm_request_pci_bus_resources(dev, &bridge->windows);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3516,8 +3516,13 @@ void pci_acs_init(struct pci_dev *dev)
|
||||
{
|
||||
dev->acs_cap = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ACS);
|
||||
|
||||
if (dev->acs_cap)
|
||||
pci_enable_acs(dev);
|
||||
/*
|
||||
* Attempt to enable ACS regardless of capability because some Root
|
||||
* Ports (e.g. those quirked with *_intel_pch_acs_*) do not have
|
||||
* the standard ACS capability but still support ACS via those
|
||||
* quirks.
|
||||
*/
|
||||
pci_enable_acs(dev);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user