aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pcie/aspm.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index 2d7e695b7589..a1ae9b6f3995 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -32,13 +32,11 @@ struct aspm_latency {
32}; 32};
33 33
34struct pcie_link_state { 34struct pcie_link_state {
35 struct list_head sibling; 35 struct pci_dev *pdev; /* Upstream component of the Link */
36 struct pci_dev *pdev; 36 struct pcie_link_state *parent; /* pointer to the parent Link state */
37 bool downstream_has_switch; 37 struct list_head sibling; /* node in link_list */
38 38 struct list_head children; /* list of child link states */
39 struct pcie_link_state *parent; 39 struct list_head link; /* node in parent's children list */
40 struct list_head children;
41 struct list_head link;
42 40
43 /* ASPM state */ 41 /* ASPM state */
44 u32 aspm_support:2; /* Supported ASPM state */ 42 u32 aspm_support:2; /* Supported ASPM state */
@@ -50,6 +48,8 @@ struct pcie_link_state {
50 u32 clkpm_enabled:1; /* Current Clock PM state */ 48 u32 clkpm_enabled:1; /* Current Clock PM state */
51 u32 clkpm_default:1; /* Default Clock PM state by BIOS */ 49 u32 clkpm_default:1; /* Default Clock PM state by BIOS */
52 50
51 u32 has_switch:1; /* Downstream has switches? */
52
53 /* Latencies */ 53 /* Latencies */
54 struct aspm_latency latency; /* Exit latency */ 54 struct aspm_latency latency; /* Exit latency */
55 /* 55 /*
@@ -648,7 +648,7 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev)
648 if (!link_state) 648 if (!link_state)
649 goto unlock_out; 649 goto unlock_out;
650 650
651 link_state->downstream_has_switch = pcie_aspm_downstream_has_switch(pdev); 651 link_state->has_switch = pcie_aspm_downstream_has_switch(pdev);
652 INIT_LIST_HEAD(&link_state->children); 652 INIT_LIST_HEAD(&link_state->children);
653 INIT_LIST_HEAD(&link_state->link); 653 INIT_LIST_HEAD(&link_state->link);
654 if (pdev->bus->self) {/* this is a switch */ 654 if (pdev->bus->self) {/* this is a switch */
@@ -679,7 +679,7 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev)
679 link_state->pdev = pdev; 679 link_state->pdev = pdev;
680 list_add(&link_state->sibling, &link_list); 680 list_add(&link_state->sibling, &link_list);
681 681
682 if (link_state->downstream_has_switch) { 682 if (link_state->has_switch) {
683 /* 683 /*
684 * If link has switch, delay the link config. The leaf link 684 * If link has switch, delay the link config. The leaf link
685 * initialization will config the whole hierarchy. but we must 685 * initialization will config the whole hierarchy. but we must