diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-01 15:05:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-01 15:05:36 -0400 |
commit | fdb2f9c2ebd4f07d7b11a3bc86d8c669eb841697 (patch) | |
tree | d85824518fc13a8c84b7399019fc11ad77aaa120 /drivers/net/wireless | |
parent | 81f56e5375e84689b891e0e6c5a02ec12a1f18d9 (diff) | |
parent | 78c8f84302ce007aedcfa11912fd4aacf22727ab (diff) |
Merge tag 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI changes from Bjorn Helgaas:
"Host bridge hotplug
- Protect acpi_pci_drivers and acpi_pci_roots (Taku Izumi)
- Clear host bridge resource info to avoid issue when releasing
(Yinghai Lu)
- Notify acpi_pci_drivers when hot-plugging host bridges (Jiang Liu)
- Use standard list ops for acpi_pci_drivers (Jiang Liu)
Device hotplug
- Use pci_get_domain_bus_and_slot() to close hotplug races (Jiang
Liu)
- Remove fakephp driver (Bjorn Helgaas)
- Fix VGA ref count in hotplug remove path (Yinghai Lu)
- Allow acpiphp to handle PCIe ports without native hotplug (Jiang
Liu)
- Implement resume regardless of pciehp_force param (Oliver Neukum)
- Make pci_fixup_irqs() work after init (Thierry Reding)
Miscellaneous
- Add pci_pcie_type(dev) and remove pci_dev.pcie_type (Yijing Wang)
- Factor out PCI Express Capability accessors (Jiang Liu)
- Add pcibios_window_alignment() so powerpc EEH can use generic
resource assignment (Gavin Shan)
- Make pci_error_handlers const (Stephen Hemminger)
- Cleanup drivers/pci/remove.c (Bjorn Helgaas)
- Improve Vendor-Specific Extended Capability support (Bjorn
Helgaas)
- Use standard list ops for bus->devices (Bjorn Helgaas)
- Avoid kmalloc in pci_get_subsys() and pci_get_class() (Feng Tang)
- Reassign invalid bus number ranges (Intel DP43BF workaround)
(Yinghai Lu)"
* tag 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (102 commits)
PCI: acpiphp: Handle PCIe ports without native hotplug capability
PCI/ACPI: Use acpi_driver_data() rather than searching acpi_pci_roots
PCI/ACPI: Protect acpi_pci_roots list with mutex
PCI/ACPI: Use acpi_pci_root info rather than looking it up again
PCI/ACPI: Pass acpi_pci_root to acpi_pci_drivers' add/remove interface
PCI/ACPI: Protect acpi_pci_drivers list with mutex
PCI/ACPI: Notify acpi_pci_drivers when hot-plugging PCI root bridges
PCI/ACPI: Use normal list for struct acpi_pci_driver
PCI/ACPI: Use DEVICE_ACPI_HANDLE rather than searching acpi_pci_roots
PCI: Fix default vga ref_count
ia64/PCI: Clear host bridge aperture struct resource
x86/PCI: Clear host bridge aperture struct resource
PCI: Stop all children first, before removing all children
Revert "PCI: Use hotplug-safe pci_get_domain_bus_and_slot()"
PCI: Provide a default pcibios_update_irq()
PCI: Discard __init annotations for pci_fixup_irqs() and related functions
PCI: Use correct type when freeing bus resource list
PCI: Check P2P bridge for invalid secondary/subordinate range
PCI: Convert "new_id"/"remove_id" into generic pci_bus driver attributes
xen-pcifront: Use hotplug-safe pci_get_domain_bus_and_slot()
...
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/pci.c | 21 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/common.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/trans.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/pci.c | 8 |
4 files changed, 12 insertions, 28 deletions
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index a978984d78a5..ef11dc639461 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c | |||
@@ -113,41 +113,32 @@ static void ath_pci_aspm_init(struct ath_common *common) | |||
113 | struct ath_hw *ah = sc->sc_ah; | 113 | struct ath_hw *ah = sc->sc_ah; |
114 | struct pci_dev *pdev = to_pci_dev(sc->dev); | 114 | struct pci_dev *pdev = to_pci_dev(sc->dev); |
115 | struct pci_dev *parent; | 115 | struct pci_dev *parent; |
116 | int pos; | 116 | u16 aspm; |
117 | u8 aspm; | ||
118 | 117 | ||
119 | if (!ah->is_pciexpress) | 118 | if (!ah->is_pciexpress) |
120 | return; | 119 | return; |
121 | 120 | ||
122 | pos = pci_pcie_cap(pdev); | ||
123 | if (!pos) | ||
124 | return; | ||
125 | |||
126 | parent = pdev->bus->self; | 121 | parent = pdev->bus->self; |
127 | if (!parent) | 122 | if (!parent) |
128 | return; | 123 | return; |
129 | 124 | ||
130 | if (ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE) { | 125 | if (ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE) { |
131 | /* Bluetooth coexistance requires disabling ASPM. */ | 126 | /* Bluetooth coexistance requires disabling ASPM. */ |
132 | pci_read_config_byte(pdev, pos + PCI_EXP_LNKCTL, &aspm); | 127 | pcie_capability_clear_word(pdev, PCI_EXP_LNKCTL, |
133 | aspm &= ~(PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1); | 128 | PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1); |
134 | pci_write_config_byte(pdev, pos + PCI_EXP_LNKCTL, aspm); | ||
135 | 129 | ||
136 | /* | 130 | /* |
137 | * Both upstream and downstream PCIe components should | 131 | * Both upstream and downstream PCIe components should |
138 | * have the same ASPM settings. | 132 | * have the same ASPM settings. |
139 | */ | 133 | */ |
140 | pos = pci_pcie_cap(parent); | 134 | pcie_capability_clear_word(parent, PCI_EXP_LNKCTL, |
141 | pci_read_config_byte(parent, pos + PCI_EXP_LNKCTL, &aspm); | 135 | PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1); |
142 | aspm &= ~(PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1); | ||
143 | pci_write_config_byte(parent, pos + PCI_EXP_LNKCTL, aspm); | ||
144 | 136 | ||
145 | ath_info(common, "Disabling ASPM since BTCOEX is enabled\n"); | 137 | ath_info(common, "Disabling ASPM since BTCOEX is enabled\n"); |
146 | return; | 138 | return; |
147 | } | 139 | } |
148 | 140 | ||
149 | pos = pci_pcie_cap(parent); | 141 | pcie_capability_read_word(parent, PCI_EXP_LNKCTL, &aspm); |
150 | pci_read_config_byte(parent, pos + PCI_EXP_LNKCTL, &aspm); | ||
151 | if (aspm & (PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1)) { | 142 | if (aspm & (PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1)) { |
152 | ah->aspm_enabled = true; | 143 | ah->aspm_enabled = true; |
153 | /* Initialize PCIe PM and SERDES registers. */ | 144 | /* Initialize PCIe PM and SERDES registers. */ |
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h index 5f5017767b99..724682669060 100644 --- a/drivers/net/wireless/iwlegacy/common.h +++ b/drivers/net/wireless/iwlegacy/common.h | |||
@@ -1832,10 +1832,8 @@ int il_enqueue_hcmd(struct il_priv *il, struct il_host_cmd *cmd); | |||
1832 | static inline u16 | 1832 | static inline u16 |
1833 | il_pcie_link_ctl(struct il_priv *il) | 1833 | il_pcie_link_ctl(struct il_priv *il) |
1834 | { | 1834 | { |
1835 | int pos; | ||
1836 | u16 pci_lnk_ctl; | 1835 | u16 pci_lnk_ctl; |
1837 | pos = pci_pcie_cap(il->pci_dev); | 1836 | pcie_capability_read_word(il->pci_dev, PCI_EXP_LNKCTL, &pci_lnk_ctl); |
1838 | pci_read_config_word(il->pci_dev, pos + PCI_EXP_LNKCTL, &pci_lnk_ctl); | ||
1839 | return pci_lnk_ctl; | 1837 | return pci_lnk_ctl; |
1840 | } | 1838 | } |
1841 | 1839 | ||
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index dbeebef562d5..063ecaff5b56 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c | |||
@@ -675,13 +675,10 @@ static void iwl_set_pwr_vmain(struct iwl_trans *trans) | |||
675 | static u16 iwl_pciexp_link_ctrl(struct iwl_trans *trans) | 675 | static u16 iwl_pciexp_link_ctrl(struct iwl_trans *trans) |
676 | { | 676 | { |
677 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); | 677 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); |
678 | int pos; | ||
679 | u16 pci_lnk_ctl; | 678 | u16 pci_lnk_ctl; |
680 | 679 | ||
681 | struct pci_dev *pci_dev = trans_pcie->pci_dev; | 680 | pcie_capability_read_word(trans_pcie->pci_dev, PCI_EXP_LNKCTL, |
682 | 681 | &pci_lnk_ctl); | |
683 | pos = pci_pcie_cap(pci_dev); | ||
684 | pci_read_config_word(pci_dev, pos + PCI_EXP_LNKCTL, &pci_lnk_ctl); | ||
685 | return pci_lnk_ctl; | 682 | return pci_lnk_ctl; |
686 | } | 683 | } |
687 | 684 | ||
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index 80f75d3ba84a..5983631a1b1a 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
@@ -372,13 +372,11 @@ static void rtl_pci_parse_configuration(struct pci_dev *pdev, | |||
372 | struct rtl_pci_priv *pcipriv = rtl_pcipriv(hw); | 372 | struct rtl_pci_priv *pcipriv = rtl_pcipriv(hw); |
373 | 373 | ||
374 | u8 tmp; | 374 | u8 tmp; |
375 | int pos; | 375 | u16 linkctrl_reg; |
376 | u8 linkctrl_reg; | ||
377 | 376 | ||
378 | /*Link Control Register */ | 377 | /*Link Control Register */ |
379 | pos = pci_pcie_cap(pdev); | 378 | pcie_capability_read_word(pdev, PCI_EXP_LNKCTL, &linkctrl_reg); |
380 | pci_read_config_byte(pdev, pos + PCI_EXP_LNKCTL, &linkctrl_reg); | 379 | pcipriv->ndis_adapter.linkctrl_reg = (u8)linkctrl_reg; |
381 | pcipriv->ndis_adapter.linkctrl_reg = linkctrl_reg; | ||
382 | 380 | ||
383 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "Link Control Register =%x\n", | 381 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "Link Control Register =%x\n", |
384 | pcipriv->ndis_adapter.linkctrl_reg); | 382 | pcipriv->ndis_adapter.linkctrl_reg); |