Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eaecb547 authored by Subramanian Ananthanarayanan's avatar Subramanian Ananthanarayanan
Browse files

PCI: Configure RC MPS to 128 for Realtek 8168 attach



Change is to configure QC RC MPS 128 bytes as 8168 device only supports
128 bytes. Without this quirk, since RC is using pcie_bus_perf flag
MPS is configured to 256 bytes, when EP MRRS is changed to 4096 bytes
RC is responding with packets of 256 bytes causing functionality break.

Since pcie_bus_perf is used for many products, this change provies a
provision to configure RC to 128 bytes for realtek 8168 attach alone.

Change-Id: I4a82293e4f71bf188d4f0f2be8fa194c5ab007c2
Signed-off-by: default avatarSubramanian Ananthanarayanan <quic_skananth@quicinc.com>
parent bc353eb5
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -2415,6 +2415,20 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE,
DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_NVIDIA,  PCI_DEVICE_ID_NVIDIA_CK804_PCIE,
			quirk_nvidia_ck804_pcie_aer_ext_cap);

/*
 * Quirk to limit QCOM RC MPS to 128 in case of Realtek 8168
 * attaches.
 */
static void quirk_realtek_rc_mpss_limit(struct pci_dev *pdev)
{
	struct pci_dev *root_port = pcie_find_root_port(pdev);

	if (root_port->vendor  == PCI_VENDOR_ID_QCOM)
		pcie_set_mps(root_port, 128);
}
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_REALTEK, 0x8168,
			quirk_realtek_rc_mpss_limit);

static void quirk_via_cx700_pci_parking_caching(struct pci_dev *dev)
{
	/*