diff options
author | Stephen Hemminger <stephen@networkplumber.org> | 2014-01-10 16:01:05 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-01-10 18:58:49 -0500 |
commit | ecc8635608342a05ded722f0e30e6ccd682f84a6 (patch) | |
tree | 33291aa0450523faefef5a2273012b986538b2d8 /drivers/pci | |
parent | 3ea8197e1371abd68aef289cad97feb764281642 (diff) |
PCI: Remove unused Optimized Buffer Flush/Fill support
My philosophy is unused code is dead code. And dead code is subject to bit
rot and is a likely source of bugs. Use it or lose it.
This reverts 48a92a8179b3 ("PCI: add OBFF enable/disable support"),
removing these interfaces:
pci_enable_obff()
pci_disable_obff()
[bhelgaas: split to separate patch, also remove prototypes from pci.h]
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci.c | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 020f672deabb..84a24d16778f 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -2150,79 +2150,6 @@ void pci_disable_ido(struct pci_dev *dev, unsigned long type) | |||
2150 | } | 2150 | } |
2151 | EXPORT_SYMBOL(pci_disable_ido); | 2151 | EXPORT_SYMBOL(pci_disable_ido); |
2152 | 2152 | ||
2153 | /** | ||
2154 | * pci_enable_obff - enable optimized buffer flush/fill | ||
2155 | * @dev: PCI device | ||
2156 | * @type: type of signaling to use | ||
2157 | * | ||
2158 | * Try to enable @type OBFF signaling on @dev. It will try using WAKE# | ||
2159 | * signaling if possible, falling back to message signaling only if | ||
2160 | * WAKE# isn't supported. @type should indicate whether the PCIe link | ||
2161 | * be brought out of L0s or L1 to send the message. It should be either | ||
2162 | * %PCI_EXP_OBFF_SIGNAL_ALWAYS or %PCI_OBFF_SIGNAL_L0. | ||
2163 | * | ||
2164 | * If your device can benefit from receiving all messages, even at the | ||
2165 | * power cost of bringing the link back up from a low power state, use | ||
2166 | * %PCI_EXP_OBFF_SIGNAL_ALWAYS. Otherwise, use %PCI_OBFF_SIGNAL_L0 (the | ||
2167 | * preferred type). | ||
2168 | * | ||
2169 | * RETURNS: | ||
2170 | * Zero on success, appropriate error number on failure. | ||
2171 | */ | ||
2172 | int pci_enable_obff(struct pci_dev *dev, enum pci_obff_signal_type type) | ||
2173 | { | ||
2174 | u32 cap; | ||
2175 | u16 ctrl; | ||
2176 | int ret; | ||
2177 | |||
2178 | pcie_capability_read_dword(dev, PCI_EXP_DEVCAP2, &cap); | ||
2179 | if (!(cap & PCI_EXP_DEVCAP2_OBFF_MASK)) | ||
2180 | return -ENOTSUPP; /* no OBFF support at all */ | ||
2181 | |||
2182 | /* Make sure the topology supports OBFF as well */ | ||
2183 | if (dev->bus->self) { | ||
2184 | ret = pci_enable_obff(dev->bus->self, type); | ||
2185 | if (ret) | ||
2186 | return ret; | ||
2187 | } | ||
2188 | |||
2189 | pcie_capability_read_word(dev, PCI_EXP_DEVCTL2, &ctrl); | ||
2190 | if (cap & PCI_EXP_DEVCAP2_OBFF_WAKE) | ||
2191 | ctrl |= PCI_EXP_DEVCTL2_OBFF_WAKE_EN; | ||
2192 | else { | ||
2193 | switch (type) { | ||
2194 | case PCI_EXP_OBFF_SIGNAL_L0: | ||
2195 | if (!(ctrl & PCI_EXP_DEVCTL2_OBFF_WAKE_EN)) | ||
2196 | ctrl |= PCI_EXP_DEVCTL2_OBFF_MSGA_EN; | ||
2197 | break; | ||
2198 | case PCI_EXP_OBFF_SIGNAL_ALWAYS: | ||
2199 | ctrl &= ~PCI_EXP_DEVCTL2_OBFF_WAKE_EN; | ||
2200 | ctrl |= PCI_EXP_DEVCTL2_OBFF_MSGB_EN; | ||
2201 | break; | ||
2202 | default: | ||
2203 | WARN(1, "bad OBFF signal type\n"); | ||
2204 | return -ENOTSUPP; | ||
2205 | } | ||
2206 | } | ||
2207 | pcie_capability_write_word(dev, PCI_EXP_DEVCTL2, ctrl); | ||
2208 | |||
2209 | return 0; | ||
2210 | } | ||
2211 | EXPORT_SYMBOL(pci_enable_obff); | ||
2212 | |||
2213 | /** | ||
2214 | * pci_disable_obff - disable optimized buffer flush/fill | ||
2215 | * @dev: PCI device | ||
2216 | * | ||
2217 | * Disable OBFF on @dev. | ||
2218 | */ | ||
2219 | void pci_disable_obff(struct pci_dev *dev) | ||
2220 | { | ||
2221 | pcie_capability_clear_word(dev, PCI_EXP_DEVCTL2, | ||
2222 | PCI_EXP_DEVCTL2_OBFF_WAKE_EN); | ||
2223 | } | ||
2224 | EXPORT_SYMBOL(pci_disable_obff); | ||
2225 | |||
2226 | static int pci_acs_enable; | 2153 | static int pci_acs_enable; |
2227 | 2154 | ||
2228 | /** | 2155 | /** |