From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f175.google.com ([209.85.192.175]:52103 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751553Ab3KTHJl (ORCPT ); Wed, 20 Nov 2013 02:09:41 -0500 Received: by mail-pd0-f175.google.com with SMTP id w10so7119145pde.34 for ; Tue, 19 Nov 2013 23:09:40 -0800 (PST) Date: Wed, 20 Nov 2013 15:09:30 +0800 From: Adam Lee To: Myron Stowe Cc: Bjorn Helgaas , "linux-pci@vger.kernel.org" , open list , Amos Kong , Myron Stowe , Thomas Renninger , Ben Hutchings Subject: Re: [PATCH] pci: check PCI_EXP_FLAGS_SLOT before setting hotplug bridge Message-ID: <20131120070930.GD3821@adam-laptop> References: <1384767652-20567-1-git-send-email-adam.lee@canonical.com> <20131119055714.GA3451@adam-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Sender: linux-pci-owner@vger.kernel.org List-ID: On Tue, Nov 19, 2013 at 11:08:06AM -0700, Myron Stowe wrote: > On Mon, Nov 18, 2013 at 10:57 PM, Adam Lee wrote: > > On Mon, Nov 18, 2013 at 10:38:17AM -0700, Bjorn Helgaas wrote: > >> [+cc Myron, Amos, Thomas, Ben] > >> > >> On Mon, Nov 18, 2013 at 2:40 AM, Adam Lee wrote: > >> > This patch adds the PCI_EXP_FLAGS_SLOT check back before setting > >> > hotplug bridge, which is omitted by an API switching commit, > >> > 59875ae489609b2267548dc85160c5f0f0c6f9d4 "PCI/core: Use PCI Express > >> > Capability accessors". > >> > > >> > Some Lenovo laptops hang in booting without this fix. > >> > >> What kernel version hangs? I suspect you might be missing 6d3a1741f1 > >> ("PCI: Support PCIe Capability Slot registers only for ports with > >> slots"), because it *looks* like the current kernel should work > >> correctly even without your patch. > > > > No, patching 6d3a1741f1 and d3694d4fa3 doesn't fix the hang. > > Did you actually try it? This patch did solve a problem that I > encountered (see below). On Tue, Nov 19, 2013 at 10:40:09AM -0700, Bjorn Helgaas wrote: > > > > It hangs in acpi_evaluate_integer() from > > 59875ae489609b2267548dc85160c5f0f0c6f9d4 "PCI/core: Use PCI Express > > Capability accessors" and before > > ac212b6980d8d5eda705864fc5a8ecddc6d6eacc "ACPI / processor: Use common > > hotplug infrastructure", 3.4~3.11. (double confirmed) ^^^^^^^^ should be 3.7~3.10 > I don't understand what you're saying here. We're talking about this path: > > set_pcie_hotplug_bridge > pcie_capability_read_dword(dev, PCI_EXP_SLTCAP, ...) > pcie_capability_reg_implemented(dev, PCI_EXP_SLTCAP) > pcie_cap_has_sltctl(dev) > > This path doesn't invoke acpi_evaluate_integer(). How does a hang > there relate to the patch you posted? Are you saying you bisected the > hang to one of the commits you mentioned? Bjorn and Myron, Yes, I did try, and those two commits are both coming from bisect, it is weird. But good news, I tried the new series containing three patches, it fixed that hang.(backported to 3.8, pcie_flags_reg is fine) Great thanks. -- Adam Lee