Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1613066 > unrolled thread
| Started by | Sinan Kaya <okaya@codeaurora.org> |
|---|---|
| First post | 2017-03-30 15:40 +0200 |
| Last post | 2017-03-30 15:40 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH V7 2/5] PCI/ASPM: split pci_aspm_init() into two Sinan Kaya <okaya@codeaurora.org> - 2017-03-30 15:40 +0200
| From | Sinan Kaya <okaya@codeaurora.org> |
|---|---|
| Date | 2017-03-30 15:40 +0200 |
| Subject | [PATCH V7 2/5] PCI/ASPM: split pci_aspm_init() into two |
| Message-ID | <tqIsV-70Q-7@gated-at.bofh.it> |
Split pci_aspm_init() body into pci_aspm_init_upstream()
and pci_aspm_init_downstream() for bridge and endpoint
specific code behavior.
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=194895
Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
---
drivers/pci/pcie/aspm.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index dc36717..a80d64b 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -826,6 +826,16 @@ static struct pcie_link_state *alloc_pcie_link_state(struct pci_dev *pdev)
return link;
}
+static int pci_aspm_init_downstream(struct pci_dev *pdev)
+{
+ return 0;
+}
+
+static int pci_aspm_init_upstream(struct pci_dev *pdev)
+{
+ return 0;
+}
+
/*
* pci_aspm_init: Initiate PCI express link state.
* It is called from device_add for every single pci device.
@@ -833,7 +843,10 @@ static struct pcie_link_state *alloc_pcie_link_state(struct pci_dev *pdev)
*/
int pci_aspm_init(struct pci_dev *pdev)
{
- return 0;
+ if (!pdev->has_secondary_link)
+ return pci_aspm_init_downstream(pdev);
+
+ return pci_aspm_init_upstream(pdev);
}
/*
--
1.9.1
Back to top | Article view | linux.kernel
csiph-web