LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Krzysztof Hałasa" <khalasa@piap.pl>
To: "Krzysztof Wilczyński" <kw@linux.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, Artem Lapkin <email2tema@gmail.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Huacai Chen <chenhuacai@gmail.com>, Rob Herring <robh@kernel.org>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Richard Zhu <hongxing.zhu@nxp.com>,
Lucas Stach <l.stach@pengutronix.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCIe: limit Max Read Request Size on i.MX to 512 bytes
Date: Fri, 13 Aug 2021 14:09:51 +0200 [thread overview]
Message-ID: <m31r6x1r74.fsf@t19.piap.pl> (raw)
In-Reply-To: <20210813101305.GA598827@rocinante> ("Krzysztof =?utf-8?Q?Wil?= =?utf-8?Q?czy=C5=84ski=22's?= message of "Fri, 13 Aug 2021 12:13:05 +0200")
Krzysztof, :-)
> Would it be possible to implement this particular MRRS fix as a quirk
> only for the i.MX6 controller? Unless this is something that we need in
> the core, a quirk would be preferred over something that changes the PCI
> core.
I have briefly considered it, but I think it would be *much* more
complicated and error-prone. It also appears that there are more
platforms which need it - the old CNS3xxx, which currently subverts the
PCIE_BUS_PEER2PEER, the loongson, keystone, maybe all DWC PCIe.
Multiplication of the "quirk" code doesn't really look good to me.
TBH I don't think of this as of a "quirk" - all systems have MRRS
limits, it just happens that these ones have their limit lower than 4096
bytes. This isn't a limitation of a particular PCIe device, this is a
common limit of the whole system.
Also I'm not exactly sure the loongson fixup is complete.
It's only done at pci-enable*() time (e.g. for devices which have bigger
MRRS after power-up), while e.g. the r8169 driver changes MRRS well
after pci-enable*().
This means it needs to stay in/below pcie_get_readrq(), and while it
could mean going to ops->write*, it would be a real mess parsing the
devices, PCIE capabilities etc.
Now it's basically a few lines in a seldom called routine in pci.c, and
the loongson case (and others) can be made simpler (and really fixed) as
well.
--
Krzysztof "Chris" Hałasa
Sieć Badawcza Łukasiewicz
Przemysłowy Instytut Automatyki i Pomiarów PIAP
Al. Jerozolimskie 202, 02-486 Warszawa
next prev parent reply other threads:[~2021-08-13 12:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-13 8:52 Krzysztof Hałasa
2021-08-13 10:13 ` Krzysztof Wilczyński
2021-08-13 12:09 ` Krzysztof Hałasa [this message]
2021-08-13 19:22 ` Bjorn Helgaas
2021-08-16 5:18 ` Krzysztof Hałasa
2021-08-16 7:49 ` Richard Zhu
2021-08-16 11:18 ` Krzysztof Hałasa
2021-08-13 13:45 ` Rob Herring
2021-08-13 18:18 ` Krzysztof Hałasa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m31r6x1r74.fsf@t19.piap.pl \
--to=khalasa@piap.pl \
--cc=bhelgaas@google.com \
--cc=chenhuacai@gmail.com \
--cc=email2tema@gmail.com \
--cc=hongxing.zhu@nxp.com \
--cc=kw@linux.com \
--cc=l.stach@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=narmstrong@baylibre.com \
--cc=robh@kernel.org \
--subject='Re: [PATCH] PCIe: limit Max Read Request Size on i.MX to 512 bytes' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).