From: Stefan Agner <stefan@agner.ch>
To: Trent Piepho <tpiepho@impinj.com>
Cc: jingoohan1@gmail.com, l.stach@pengutronix.de,
gustavo.pimentel@synopsys.com, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org, bhelgaas@google.com
Subject: Re: [PATCH] PCI: dwc: Limit config space size for i.MX6
Date: Thu, 15 Nov 2018 16:00:32 +0100 [thread overview]
Message-ID: <b06c24705caddf2f1e97237fd6aa3523@agner.ch> (raw)
In-Reply-To: <1542224641.30311.478.camel@impinj.com>
On 14.11.2018 20:44, Trent Piepho wrote:
> On Wed, 2018-11-14 at 16:49 +0100, Stefan Agner wrote:
>> On 19.10.2018 13:13, Stefan Agner wrote:
>> > Reading the full 4k config space through sysfs leads to an
>> > external abort. Testing on a platform showed that the upper
>> > limit is 512. Limit config space to 512.
>>
>> Any comment on this patch?
>>
>> Since other devices use similar quirks, I guess the fix can't be far
>> off?
>>
>> Maybe restricting to the PCI device ID used in i.MX 6 only is too
>> restrictive, but I guess better restrictive for now?
>
> To trigger this bug I should read the sysfs "config" file for the PCI
> bridge device?
>
> Tested on imx7, no problems.
>
> # hexdump -C
> /sys/devices/platform/soc/30800000.aips-bus/33800000.pcie/pci0000:00/0000:00:00.0/config
>
>
> [stuff]
> 00000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> |................|
> *
>
> 00000400 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> |................|
> *
>
> 00000700 76 00 63 01 ff ff ff ff 04 00 00 07 00 f0 f0 1b
> |v.c.............|
> [more stuff]
>
> The bridge on imx7d is 16c3:abcd, same as patch I believe. I do have a
> pci-e device connected, unlike the original bug. Maybe that is
> related? Or maybe this problem is fixed in imx7d?
The i.MX 7D seems to have a different register set...
I don't think it is related to whether a PCIe device is connected or
not.
The fact that i.MX 7D has the same device id and does not suffer the
problem actually shows that the approach this patch takes is not
ideal...
Will send a patch limiting register access on a per driver/compatible
string level.
--
Stefan
>
>> >
>> > #define PCI_VENDOR_ID_SYNOPSYS 0x16c3
>> > +#define PCI_DEVICE_ID_SYNOPSYS_IMX6 0xabcd
>> >
>> > #define PCI_VENDOR_ID_VITESSE 0x1725
>> > #define PCI_DEVICE_ID_VITESSE_VSC7174 0x7174
prev parent reply other threads:[~2018-11-15 15:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-19 11:13 [PATCH] PCI: dwc: Limit config space size for i.MX6 Stefan Agner
2018-11-14 15:49 ` Stefan Agner
2018-11-14 16:20 ` Lucas Stach
2018-11-14 17:41 ` Stefan Agner
2018-11-14 19:44 ` Trent Piepho
2018-11-15 15:00 ` Stefan Agner [this message]
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=b06c24705caddf2f1e97237fd6aa3523@agner.ch \
--to=stefan@agner.ch \
--cc=bhelgaas@google.com \
--cc=gustavo.pimentel@synopsys.com \
--cc=jingoohan1@gmail.com \
--cc=l.stach@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=tpiepho@impinj.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).