From: Bjorn Helgaas Date: Tue, 17 May 2016 19:35:38 +0000 (-0500) Subject: Merge branches 'pci/hotplug' and 'pci/resource' into next X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=45604e68ed7acf23e6c4cbac9930c61df19220c8;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Merge branches 'pci/hotplug' and 'pci/resource' into next * pci/hotplug: PCI: Use cached copy of PCI_EXP_SLTCAP_HPC bit * pci/resource: PCI: Disable all BAR sizing for devices with non-compliant BARs x86/PCI: Mark Broadwell-EP Home Agent 1 as having non-compliant BARs PCI: Identify Enhanced Allocation (EA) BAR Equivalent resources in sysfs --- 45604e68ed7acf23e6c4cbac9930c61df19220c8 diff --cc drivers/pci/pcie/portdrv_core.c index 050069f32f77,847f4fdca50c,88122dc2e1b1..32d4d0a3d20e --- a/drivers/pci/pcie/portdrv_core.c +++ b/drivers/pci/pcie/portdrv_core.c @@@@ -254,8 -254,8 -254,9 +254,7 @@@@ static void cleanup_service_irqs(struc static int get_port_device_capability(struct pci_dev *dev) { int services = 0; - - u32 reg32; int cap_mask = 0; -- int err; if (pcie_ports_disabled) return 0; @@@@ -265,23 -265,21 -266,26 +264,18 @@@@ if (pci_aer_available()) cap_mask |= PCIE_PORT_SERVICE_AER; -- if (pcie_ports_auto) { -- err = pcie_port_platform_notify(dev, &cap_mask); -- if (err) -- return 0; -- } ++ if (pcie_ports_auto) ++ pcie_port_platform_notify(dev, &cap_mask); /* Hot-Plug Capable */ - - if ((cap_mask & PCIE_PORT_SERVICE_HP) && - - pcie_caps_reg(dev) & PCI_EXP_FLAGS_SLOT) { - - pcie_capability_read_dword(dev, PCI_EXP_SLTCAP, ®32); - - if (reg32 & PCI_EXP_SLTCAP_HPC) { - - services |= PCIE_PORT_SERVICE_HP; - - /* - - * Disable hot-plug interrupts in case they have been - - * enabled by the BIOS and the hot-plug service driver - - * is not loaded. - - */ - - pcie_capability_clear_word(dev, PCI_EXP_SLTCTL, - - PCI_EXP_SLTCTL_CCIE | PCI_EXP_SLTCTL_HPIE); - - } + + if ((cap_mask & PCIE_PORT_SERVICE_HP) && dev->is_hotplug_bridge) { + + services |= PCIE_PORT_SERVICE_HP; + + /* + + * Disable hot-plug interrupts in case they have been enabled + + * by the BIOS and the hot-plug service driver is not loaded. + + */ + + pcie_capability_clear_word(dev, PCI_EXP_SLTCTL, + + PCI_EXP_SLTCTL_CCIE | PCI_EXP_SLTCTL_HPIE); } /* AER capable */ if ((cap_mask & PCIE_PORT_SERVICE_AER)