diff options
author | Matthew Wilcox <matthew@wil.cx> | 2009-12-13 08:11:31 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-02-22 16:15:17 -0800 |
commit | 536c8cb49eccd4f753b4782e7e975ef87359cb44 (patch) | |
tree | 1cc2a32b17e4eb1fc4c9b64dc4895892a2fd3d41 /drivers/pci/hotplug/pciehp_hpc.c | |
parent | f07852d6442c46c50b59c7e2acc8a1b291f9ab6d (diff) | |
download | linux-stable-536c8cb49eccd4f753b4782e7e975ef87359cb44.tar.gz linux-stable-536c8cb49eccd4f753b4782e7e975ef87359cb44.tar.bz2 linux-stable-536c8cb49eccd4f753b4782e7e975ef87359cb44.zip |
PCI: Unify pcie_link_speed and pci_bus_speed
These enums must not overlap anyway, since we only have a single
pci_bus_speed_strings array. Use a single enum, and move it to
pci.h. Add 'SPEED' to the pcie names to make it clear what they are.
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/hotplug/pciehp_hpc.c')
-rw-r--r-- | drivers/pci/hotplug/pciehp_hpc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 10040d58c8ef..6744ca1d8d01 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -613,7 +613,7 @@ static irqreturn_t pcie_isr(int irq, void *dev_id) int pciehp_get_max_link_speed(struct slot *slot, enum pci_bus_speed *value) { struct controller *ctrl = slot->ctrl; - enum pcie_link_speed lnk_speed; + enum pci_bus_speed lnk_speed; u32 lnk_cap; int retval = 0; @@ -625,13 +625,13 @@ int pciehp_get_max_link_speed(struct slot *slot, enum pci_bus_speed *value) switch (lnk_cap & 0x000F) { case 1: - lnk_speed = PCIE_2_5GB; + lnk_speed = PCIE_SPEED_2_5GT; break; case 2: - lnk_speed = PCIE_5_0GB; + lnk_speed = PCIE_SPEED_5_0GT; break; default: - lnk_speed = PCIE_LNK_SPEED_UNKNOWN; + lnk_speed = PCI_SPEED_UNKNOWN; break; } @@ -694,7 +694,7 @@ int pciehp_get_max_lnk_width(struct slot *slot, int pciehp_get_cur_link_speed(struct slot *slot, enum pci_bus_speed *value) { struct controller *ctrl = slot->ctrl; - enum pcie_link_speed lnk_speed = PCI_SPEED_UNKNOWN; + enum pci_bus_speed lnk_speed = PCI_SPEED_UNKNOWN; int retval = 0; u16 lnk_status; @@ -707,13 +707,13 @@ int pciehp_get_cur_link_speed(struct slot *slot, enum pci_bus_speed *value) switch (lnk_status & PCI_EXP_LNKSTA_CLS) { case 1: - lnk_speed = PCIE_2_5GB; + lnk_speed = PCIE_SPEED_2_5GT; break; case 2: - lnk_speed = PCIE_5_0GB; + lnk_speed = PCIE_SPEED_5_0GT; break; default: - lnk_speed = PCIE_LNK_SPEED_UNKNOWN; + lnk_speed = PCI_SPEED_UNKNOWN; break; } |