Re: [PATCH] PCI: Power on bridges before scanning new devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 25, 2016 at 10:45:48PM +0200, Rafael J. Wysocki wrote:
> On Wednesday, May 25, 2016 04:19:48 PM Mika Westerberg wrote:
> > On Wed, May 25, 2016 at 12:13:09AM +0300, Mika Westerberg wrote:
> > > On Tue, May 24, 2016 at 03:53:23PM +0300, Mika Westerberg wrote:
> > > > > I dropped "ACPI / hotplug / PCI: Runtime resume bridge before rescan"
> > > > > on the assumption that "PCI: Power on bridges before scanning new
> > > > > devices" is sufficient to cover both the ACPI and the generic PCi
> > > > > rescan cases, but I'd like some reassurance about that.
> > > > 
> > > > I agree with your reasoning that the patch should not be needed anymore.
> > > > However, I have the machine which needed that patch at home so I'm not
> > > > able to test it now. I'll do that later today when I get back home.
> > > 
> > > I tried now on my Lenovo Yoga 900 laptop and unfortunately "PCI: Power
> > > on bridges before scanning new devices" seems not to be enough. This
> > > machine has SD-card reader connected to one PCIe port and once I unload
> > > the sdhci-pci driver and enable runtime PM for the device, next system
> > > suspend/resume cycle loses the SD-card reader PCI device.
> > > 
> > > I will investigate more tomorrow -- it is getting late here.
> > 
> > I think I found reason for the issue.
> > 
> > When the laptop resumes it will send ACPI BUS_CHECK event for the two
> > PCIe root ports. This ends up in acpiphp_check_bridge() where it goes
> > through all slots in that bridge checking if the devices are still
> > present. This happens before we call pci_scan_bridge() for the bridge
> > itself.
> > 
> > Since the bridge is in D3 config space of the device behind it is not
> > available and we determine that the device is not there anymore.
> > 
> > It looks like we either need that ACPI hotplug patch or alternatively we
> > could add pm_runtime_get/put() in acpiphp_check_bridge().
> 
> Have you tried the latter?

Indeed I tried and it worked fine. I can make formal patch doing that
which then replaces the current ACPI hotplug patch, if that is the
preferred way.
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux