From: Bjorn Helgaas <bhelgaas@google.com>
To: Joe Lawrence <Joe.Lawrence@stratus.com>
Cc: Myron Stowe <mstowe@redhat.com>,
linux-pci@vger.kernel.org, Matthew Garrett <mjg59@srcf.ucam.org>,
David Bulkow <david.bulkow@stratus.com>,
shli@kernel.org, shli@fusionio.com,
kaneshige.kenji@jp.fujitsu.com,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] PCI: ASPM exit link state code could skip devices
Date: Fri, 1 Feb 2013 15:31:41 -0700 [thread overview]
Message-ID: <CAErSpo7OYFF7YGDneoTvVjhxMq1q92UewddseLrx_w7VJ+JOBA@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1302011442200.11804@jlaw-desktop.mno.stratus.com>
On Fri, Feb 1, 2013 at 12:55 PM, Joe Lawrence <Joe.Lawrence@stratus.com> wrote:
> On Thu, 31 Jan 2013, Myron Stowe wrote:
>> PCI: ASPM exit link state code is skipping devices
>>
>> From: Myron Stowe <myron.stowe@redhat.com>
>>
>> On PCI bus hotplug removal, 'pcie_aspm_exit_link_state' can potentially
>> skip parent devices that have link_state allocated. Instead of exiting
>> early if a given device in not PCIe, check whether or not the device's
>> parent has link_state allocated. This enables 'pcie_aspm_exit_link_state'
>> to properly clean up parent link_state when the last function in a slot
>> might not be PCIe.
>>
>> Reported-by: Joe Lawrence <joe.lawrence@stratus.com>
>> Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
>> ---
>>
>> drivers/pci/pcie/aspm.c | 5 +----
>> 1 files changed, 1 insertions(+), 4 deletions(-)
>>
>>
>> diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
>> index 8474b6a..aa52727 100644
>> --- a/drivers/pci/pcie/aspm.c
>> +++ b/drivers/pci/pcie/aspm.c
>> @@ -634,10 +634,7 @@ void pcie_aspm_exit_link_state(struct pci_dev *pdev)
>> struct pci_dev *parent = pdev->bus->self;
>> struct pcie_link_state *link, *root, *parent_link;
>>
>> - if (!pci_is_pcie(pdev) || !parent || !parent->link_state)
>> - return;
>> - if ((pci_pcie_type(parent) != PCI_EXP_TYPE_ROOT_PORT) &&
>> - (pci_pcie_type(parent) != PCI_EXP_TYPE_DOWNSTREAM))
>> + if (!parent || !parent->link_state)
>> return;
>>
>> down_read(&pci_bus_sem);
>>
>>
>>
>
> Hi Myron,
>
> The patch tests eliminates the reported crash when hotplugging our
> problem PCI bus.
>
> The additional checks removed from pcie_aspm_exit_link_state (ie, the
> simplification) do appear to be unnecessary as pcie_aspm_init_link_state
> is already preventing such devices from allocating link state.
I added a Tested-by for you, Joe, and applied this to my pci/joe-aspm
branch for v3.9. Thanks!
prev parent reply other threads:[~2013-02-01 22:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alpine.DEB.2.02.1301181302260.31163@jlaw-desktop.mno.stratus.com>
[not found] ` <alpine.DEB.2.02.1301181322500.31163@jlaw-desktop.mno.stratus.com>
2013-01-31 23:29 ` Myron Stowe
2013-02-01 19:55 ` Joe Lawrence
2013-02-01 22:31 ` Bjorn Helgaas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAErSpo7OYFF7YGDneoTvVjhxMq1q92UewddseLrx_w7VJ+JOBA@mail.gmail.com \
--to=bhelgaas@google.com \
--cc=Joe.Lawrence@stratus.com \
--cc=david.bulkow@stratus.com \
--cc=kaneshige.kenji@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=mstowe@redhat.com \
--cc=shli@fusionio.com \
--cc=shli@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®