Commit efdf8288 authored by Kenji Kaneshige's avatar Kenji Kaneshige Committed by Jesse Barnes

PCI ASPM: remove has_switch field

We don't need the 'has_switch' field in the struct pcie_link_state.
Acked-by: default avatarShaohua Li <shaohua.li@intel.com>
Signed-off-by: default avatarKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 5e0eaa7d
...@@ -48,8 +48,6 @@ struct pcie_link_state { ...@@ -48,8 +48,6 @@ struct pcie_link_state {
u32 clkpm_enabled:1; /* Current Clock PM state */ u32 clkpm_enabled:1; /* Current Clock PM state */
u32 clkpm_default:1; /* Default Clock PM state by BIOS */ u32 clkpm_default:1; /* Default Clock PM state by BIOS */
u32 has_switch:1; /* Downstream has switches? */
/* Latencies */ /* Latencies */
struct aspm_latency latency; /* Exit latency */ struct aspm_latency latency; /* Exit latency */
/* /*
...@@ -595,7 +593,6 @@ static struct pcie_link_state *pcie_aspm_setup_link_state(struct pci_dev *pdev) ...@@ -595,7 +593,6 @@ static struct pcie_link_state *pcie_aspm_setup_link_state(struct pci_dev *pdev)
INIT_LIST_HEAD(&link->children); INIT_LIST_HEAD(&link->children);
INIT_LIST_HEAD(&link->link); INIT_LIST_HEAD(&link->link);
link->pdev = pdev; link->pdev = pdev;
link->has_switch = pcie_aspm_downstream_has_switch(link);
if (pdev->pcie_type == PCI_EXP_TYPE_DOWNSTREAM) { if (pdev->pcie_type == PCI_EXP_TYPE_DOWNSTREAM) {
struct pcie_link_state *parent; struct pcie_link_state *parent;
parent = pdev->bus->parent->self->link_state; parent = pdev->bus->parent->self->link_state;
...@@ -655,7 +652,7 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev) ...@@ -655,7 +652,7 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev)
* initialization will config the whole hierarchy. But we must * initialization will config the whole hierarchy. But we must
* make sure BIOS doesn't set unsupported link state. * make sure BIOS doesn't set unsupported link state.
*/ */
if (link->has_switch) { if (pcie_aspm_downstream_has_switch(link)) {
state = pcie_aspm_check_state(link, link->aspm_default); state = pcie_aspm_check_state(link, link->aspm_default);
__pcie_aspm_config_link(link, state); __pcie_aspm_config_link(link, state);
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment