Revert "PCI: Cache PCIe Device Capabilities register"
This reverts commit 619013d797
which is
commit 69139244806537f9d51364f37fe146bb2ee88a05 upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: Ic2bd4ea9575eb5c79e0a77f0f65a88f0245c3b4a
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
54292b6722
commit
60f9b585da
@ -31,7 +31,6 @@
|
||||
#include <linux/vmalloc.h>
|
||||
#include <asm/dma.h>
|
||||
#include <linux/aer.h>
|
||||
#include <linux/bitfield.h>
|
||||
#ifndef __GENKSYMS__
|
||||
#include <trace/hooks/pci.h>
|
||||
#endif
|
||||
@ -4580,10 +4579,13 @@ EXPORT_SYMBOL(pci_wait_for_pending_transaction);
|
||||
*/
|
||||
bool pcie_has_flr(struct pci_dev *dev)
|
||||
{
|
||||
u32 cap;
|
||||
|
||||
if (dev->dev_flags & PCI_DEV_FLAGS_NO_FLR_RESET)
|
||||
return false;
|
||||
|
||||
return FIELD_GET(PCI_EXP_DEVCAP_FLR, dev->devcap) == 1;
|
||||
pcie_capability_read_dword(dev, PCI_EXP_DEVCAP, &cap);
|
||||
return cap & PCI_EXP_DEVCAP_FLR;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pcie_has_flr);
|
||||
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include <linux/hypervisor.h>
|
||||
#include <linux/irqdomain.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/bitfield.h>
|
||||
#include "pci.h"
|
||||
|
||||
#define CARDBUS_LATENCY_TIMER 176 /* secondary latency timer */
|
||||
@ -1497,8 +1496,8 @@ void set_pcie_port_type(struct pci_dev *pdev)
|
||||
pdev->pcie_cap = pos;
|
||||
pci_read_config_word(pdev, pos + PCI_EXP_FLAGS, ®16);
|
||||
pdev->pcie_flags_reg = reg16;
|
||||
pci_read_config_dword(pdev, pos + PCI_EXP_DEVCAP, &pdev->devcap);
|
||||
pdev->pcie_mpss = FIELD_GET(PCI_EXP_DEVCAP_PAYLOAD, pdev->devcap);
|
||||
pci_read_config_word(pdev, pos + PCI_EXP_DEVCAP, ®16);
|
||||
pdev->pcie_mpss = reg16 & PCI_EXP_DEVCAP_PAYLOAD;
|
||||
|
||||
parent = pci_upstream_bridge(pdev);
|
||||
if (!parent)
|
||||
|
@ -334,7 +334,6 @@ struct pci_dev {
|
||||
#ifdef CONFIG_PCIEPORTBUS
|
||||
struct rcec_ea *rcec_ea; /* RCEC cached endpoint association */
|
||||
#endif
|
||||
u32 devcap; /* PCIe Device Capabilities */
|
||||
u8 pcie_cap; /* PCIe capability offset */
|
||||
u8 msi_cap; /* MSI capability offset */
|
||||
u8 msix_cap; /* MSI-X capability offset */
|
||||
|
Loading…
Reference in New Issue
Block a user