Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'pci-v6.5-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci

Pull pci fixes from Bjorn Helgaas:

- Add Manivannan Sadhasivam as DesignWare PCIe driver co-maintainer
(Krzysztof Wilczyński)

- Revert "PCI: dwc: Wait for link up only if link is started" to fix a
regression on Qualcomm platforms that don't reach interconnect sync
state if the slot is empty (Johan Hovold)

- Revert "PCI: mvebu: Mark driver as BROKEN" so people can use
pci-mvebu even though some others report problems (Bjorn Helgaas)

- Avoid a NULL pointer dereference when using acpiphp for root bus
hotplug to fix a regression added in v6.5-rc1 (Igor Mammedov)

* tag 'pci-v6.5-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
PCI: acpiphp: Use pci_assign_unassigned_bridge_resources() only for non-root bus
Revert "PCI: mvebu: Mark driver as BROKEN"
Revert "PCI: dwc: Wait for link up only if link is started"
MAINTAINERS: Add Manivannan Sadhasivam as DesignWare PCIe driver maintainer

+19 -25
+1
MAINTAINERS
··· 16293 16293 PCI DRIVER FOR SYNOPSYS DESIGNWARE 16294 16294 M: Jingoo Han <jingoohan1@gmail.com> 16295 16295 M: Gustavo Pimentel <gustavo.pimentel@synopsys.com> 16296 + M: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> 16296 16297 L: linux-pci@vger.kernel.org 16297 16298 S: Maintained 16298 16299 F: Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml
-1
drivers/pci/controller/Kconfig
··· 179 179 depends on MVEBU_MBUS 180 180 depends on ARM 181 181 depends on OF 182 - depends on BROKEN 183 182 select PCI_BRIDGE_EMUL 184 183 help 185 184 Add support for Marvell EBU PCIe controller. This PCIe controller
+4 -9
drivers/pci/controller/dwc/pcie-designware-host.c
··· 485 485 if (ret) 486 486 goto err_remove_edma; 487 487 488 - if (dw_pcie_link_up(pci)) { 489 - dw_pcie_print_link_status(pci); 490 - } else { 488 + if (!dw_pcie_link_up(pci)) { 491 489 ret = dw_pcie_start_link(pci); 492 490 if (ret) 493 491 goto err_remove_edma; 494 - 495 - if (pci->ops && pci->ops->start_link) { 496 - ret = dw_pcie_wait_for_link(pci); 497 - if (ret) 498 - goto err_stop_link; 499 - } 500 492 } 493 + 494 + /* Ignore errors, the link may come up later */ 495 + dw_pcie_wait_for_link(pci); 501 496 502 497 bridge->sysdata = pp; 503 498
+7 -13
drivers/pci/controller/dwc/pcie-designware.c
··· 644 644 dw_pcie_writel_atu(pci, dir, index, PCIE_ATU_REGION_CTRL2, 0); 645 645 } 646 646 647 - void dw_pcie_print_link_status(struct dw_pcie *pci) 648 - { 649 - u32 offset, val; 650 - 651 - offset = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP); 652 - val = dw_pcie_readw_dbi(pci, offset + PCI_EXP_LNKSTA); 653 - 654 - dev_info(pci->dev, "PCIe Gen.%u x%u link up\n", 655 - FIELD_GET(PCI_EXP_LNKSTA_CLS, val), 656 - FIELD_GET(PCI_EXP_LNKSTA_NLW, val)); 657 - } 658 - 659 647 int dw_pcie_wait_for_link(struct dw_pcie *pci) 660 648 { 649 + u32 offset, val; 661 650 int retries; 662 651 663 652 /* Check if the link is up or not */ ··· 662 673 return -ETIMEDOUT; 663 674 } 664 675 665 - dw_pcie_print_link_status(pci); 676 + offset = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP); 677 + val = dw_pcie_readw_dbi(pci, offset + PCI_EXP_LNKSTA); 678 + 679 + dev_info(pci->dev, "PCIe Gen.%u x%u link up\n", 680 + FIELD_GET(PCI_EXP_LNKSTA_CLS, val), 681 + FIELD_GET(PCI_EXP_LNKSTA_NLW, val)); 666 682 667 683 return 0; 668 684 }
-1
drivers/pci/controller/dwc/pcie-designware.h
··· 429 429 void dw_pcie_iatu_detect(struct dw_pcie *pci); 430 430 int dw_pcie_edma_detect(struct dw_pcie *pci); 431 431 void dw_pcie_edma_remove(struct dw_pcie *pci); 432 - void dw_pcie_print_link_status(struct dw_pcie *pci); 433 432 434 433 static inline void dw_pcie_writel_dbi(struct dw_pcie *pci, u32 reg, u32 val) 435 434 {
+7 -1
drivers/pci/hotplug/acpiphp_glue.c
··· 498 498 acpiphp_native_scan_bridge(dev); 499 499 } 500 500 } else { 501 + LIST_HEAD(add_list); 501 502 int max, pass; 502 503 503 504 acpiphp_rescan_slot(slot); ··· 512 511 if (pass && dev->subordinate) { 513 512 check_hotplug_bridge(slot, dev); 514 513 pcibios_resource_survey_bus(dev->subordinate); 514 + if (pci_is_root_bus(bus)) 515 + __pci_bus_size_bridges(dev->subordinate, &add_list); 515 516 } 516 517 } 517 518 } 518 - pci_assign_unassigned_bridge_resources(bus->self); 519 + if (pci_is_root_bus(bus)) 520 + __pci_bus_assign_resources(bus, &add_list, NULL); 521 + else 522 + pci_assign_unassigned_bridge_resources(bus->self); 519 523 } 520 524 521 525 acpiphp_sanitize_bus(bus);