From: Sinan Kaya <okaya@codeaurora.org>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Linux PCI <linux-pci@vger.kernel.org>
Subject: Re: ASPM after Hotplug Question
Date: Mon, 23 Jan 2017 10:35:06 -0500 [thread overview]
Message-ID: <3fcde45d-47e4-3424-398f-5af6687fb6b1@codeaurora.org> (raw)
In-Reply-To: <8dd6d5da-bab0-8f77-11b6-9982b02134ed@codeaurora.org>
On 1/22/2017 2:08 PM, Sinan Kaya wrote:
> [snip]
>
>>>
>>> Bjorn
>>>
>>
>> / # lspci
>> 03:00:00.0 Class 0604: 17cb:0401
>> 03:01:00.0 Class 0200: 8086:1572
>> 03:01:00.1 Class 0200: 8086:1572
>>
>>
>> It looks like ASPM is only getting configured for the root port following
>> insertion.
>>
>> Removal:
>> [ 32.142474] pci 0003:01:00.1: pcie_aspm_exit_link_state:662
>> [ 34.142378] pci 0003:01:00.0: pcie_aspm_exit_link_state:659
>>
>> Insertion:
>> [ 35.910342] pcieport 0003:00:00.0: pcie_aspm_init_link_state:565
>> [ 35.931227] pcieport 0003:00:00.0: pcie_aspm_init_link_state:617
>>
it looks like this is what is happening.
hotplug insertion
pcie_aspm_init_link_state
pcie_config_aspm_path
default policy, do nothing
[ 128.691521] pcieport 0003:00:00.0: pcie_aspm_init_link_state:570
[ 128.712402] pcie_config_aspm_link:439 state=0
430 static void pcie_config_aspm_link(struct pcie_link_state *link, u32 state)
431 {
432 u32 upstream = 0, dwstream = 0;
433 struct pci_dev *child, *parent = link->pdev;
434 struct pci_bus *linkbus = parent->subordinate;
435
436 /* Nothing to do if the link is already in the requested state */
437 state &= (link->aspm_capable & ~link->aspm_disable);
438 if (link->aspm_enabled == state) {
439 pr_info("%s:%d state=%d\n", __func__, __LINE__, state);
440 return;
441 }
Should we add a new policy that comes through the hotplug insertion path?
Regarding your question on why this is not being done in configure_device,
probably the reason is that L0s and L1 needs to be enabled in a specific
order before enabling on the root port.
That must be the reason for attaching this code behavior.
I think the real problem is the assumption default policy on the hotplug
insertion path.
--
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
prev parent reply other threads:[~2017-01-23 15:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-22 1:35 ASPM after Hotplug Question Sinan Kaya
2017-01-22 14:48 ` Bjorn Helgaas
2017-01-22 19:06 ` Sinan Kaya
2017-01-22 19:08 ` Sinan Kaya
2017-01-23 15:35 ` Sinan Kaya [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=3fcde45d-47e4-3424-398f-5af6687fb6b1@codeaurora.org \
--to=okaya@codeaurora.org \
--cc=helgaas@kernel.org \
--cc=linux-pci@vger.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