diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2009-05-13 12:17:04 +0900 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-06-18 13:57:26 -0700 |
commit | 5cde89d80172a393e49077d2450545b97ac8d972 (patch) | |
tree | 86d5810ca54f0be2079c294e90ad3b3c9504bd69 /drivers/pci/pcie | |
parent | 4d246e458918d469ad645fd5f937ac22982e0466 (diff) | |
download | linux-5cde89d80172a393e49077d2450545b97ac8d972.tar.gz linux-5cde89d80172a393e49077d2450545b97ac8d972.tar.bz2 linux-5cde89d80172a393e49077d2450545b97ac8d972.zip |
PCI ASPM: cleanup misc in struct pcie_link_state
Cleanup for some fields in pcie_link_state.
- Add comments.
- make "downstream_has_switch" field 1-bit.
Acked-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/pcie')
-rw-r--r-- | drivers/pci/pcie/aspm.c | 18 |
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 { }; struct pcie_link_state { - struct list_head sibling; - struct pci_dev *pdev; - bool downstream_has_switch; - - struct pcie_link_state *parent; - struct list_head children; - struct list_head link; + struct pci_dev *pdev; /* Upstream component of the Link */ + struct pcie_link_state *parent; /* pointer to the parent Link state */ + struct list_head sibling; /* node in link_list */ + struct list_head children; /* list of child link states */ + struct list_head link; /* node in parent's children list */ /* ASPM state */ u32 aspm_support:2; /* Supported ASPM state */ @@ -50,6 +48,8 @@ struct pcie_link_state { u32 clkpm_enabled:1; /* Current Clock PM state */ u32 clkpm_default:1; /* Default Clock PM state by BIOS */ + u32 has_switch:1; /* Downstream has switches? */ + /* Latencies */ struct aspm_latency latency; /* Exit latency */ /* @@ -648,7 +648,7 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev) if (!link_state) goto unlock_out; - link_state->downstream_has_switch = pcie_aspm_downstream_has_switch(pdev); + link_state->has_switch = pcie_aspm_downstream_has_switch(pdev); INIT_LIST_HEAD(&link_state->children); INIT_LIST_HEAD(&link_state->link); if (pdev->bus->self) {/* this is a switch */ @@ -679,7 +679,7 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev) link_state->pdev = pdev; list_add(&link_state->sibling, &link_list); - if (link_state->downstream_has_switch) { + if (link_state->has_switch) { /* * If link has switch, delay the link config. The leaf link * initialization will config the whole hierarchy. but we must |