summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wctdm24xxp/base.c
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2012-03-21 19:11:57 +0000
committerShaun Ruffell <sruffell@digium.com>2012-03-21 19:11:57 +0000
commitbef97f2ff7f9fd7e9e2973111a0dc5b1445a72a1 (patch)
tree4ad12ce37f5bf02c3821319fc553ac90ff0a6066 /drivers/dahdi/wctdm24xxp/base.c
parent120ddfed50b71256a3fe5f0b718507143faad284 (diff)
wcte12xp, wctdm24xxp: Add compile-time option to disable ASPM for PCIe devices.
Certain BIOSes appear to enable ASPM even though it is not fully supported by the platform. Also, since the PCIe links for TDM cards are always in use it does not make sense to allow them to transition to the disabled state. Just turn off power management on the PCIe links completely. For more information see http://lwn.net/Articles/449448/. Internal-Issue-ID: DAHLIN-283 Signed-off-by: Shaun Ruffell <sruffell@digium.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10557 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.6@10567 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wctdm24xxp/base.c')
-rw-r--r--drivers/dahdi/wctdm24xxp/base.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c
index 039c379..c6ebb38 100644
--- a/drivers/dahdi/wctdm24xxp/base.c
+++ b/drivers/dahdi/wctdm24xxp/base.c
@@ -191,6 +191,11 @@ static const struct wctdm_desc wcaex410 = { "Wildcard AEX410", FLAG_EXPRESS, 4 }
static const struct wctdm_desc wcha80000 = { "HA8-0000", 0, 8 };
static const struct wctdm_desc wchb80000 = { "HB8-0000", FLAG_EXPRESS, 8 };
+static inline bool is_pcie(const struct wctdm *wc)
+{
+ return (wc->desc->flags & FLAG_EXPRESS) > 0;
+}
+
/**
* Returns true if the card is one of the Hybrid Digital Analog Cards.
*/
@@ -5679,6 +5684,13 @@ __wctdm_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
wc->vb.pdev = pdev;
wc->vb.debug = &debug;
+#ifdef CONFIG_VOICEBUS_DISABLE_ASPM
+ if (is_pcie(wc)) {
+ pci_disable_link_state(pdev->bus->self, PCIE_LINK_STATE_L0S |
+ PCIE_LINK_STATE_L1 | PCIE_LINK_STATE_CLKPM);
+ };
+#endif
+
if (is_hx8(wc)) {
wc->vb.ops = &hx8_voicebus_operations;
ret = voicebus_boot_init(&wc->vb, wc->board_name);