Skip to content
Permalink
Browse files
PCI: dwc: meson add quirk
Device set same 256 bytes maximum read request size equal MAX_READ_REQ_SIZE
was find some issue with HDMI scrambled picture and nvme devices
at intensive writing...

[    4.798971] nvme 0000:01:00.0: fix MRRS from 512 to 256

This quirk setup same MRRS if we try solve this problem with
pci=pcie_bus_perf kernel command line param

Signed-off-by: Artem Lapkin <art@khadas.com>
  • Loading branch information
Artem Lapkin authored and intel-lab-lkp committed Jun 18, 2021
1 parent f25d926 commit 1ef258aa2d36864949ac0d97fbdb475c8b1a8fd0
Showing 1 changed file with 27 additions and 0 deletions.
@@ -466,6 +466,33 @@ static int meson_pcie_probe(struct platform_device *pdev)
return ret;
}

static void meson_pcie_quirk(struct pci_dev *dev)
{
int mrrs;

/* no need quirk */
if (pcie_bus_config != PCIE_BUS_DEFAULT)
return;

/* no need for root bus */
if (pci_is_root_bus(dev->bus))
return;

mrrs = pcie_get_readrq(dev);

/*
* set same 256 bytes maximum read request size equal MAX_READ_REQ_SIZE
* was find some issue with HDMI scrambled picture and nvme devices
* at intensive writing...
*/

if (mrrs != MAX_READ_REQ_SIZE) {
dev_info(&dev->dev, "fix MRRS from %d to %d\n", mrrs, MAX_READ_REQ_SIZE);
pcie_set_readrq(dev, MAX_READ_REQ_SIZE);
}
}
DECLARE_PCI_FIXUP_ENABLE(PCI_ANY_ID, PCI_ANY_ID, meson_pcie_quirk);

static const struct of_device_id meson_pcie_of_match[] = {
{
.compatible = "amlogic,axg-pcie",

0 comments on commit 1ef258a

Please sign in to comment.