From: Michael Ellerman <mpe@ellerman.id.au>
To: "Bjorn Helgaas" <helgaas@kernel.org>, "Pali Rohár" <pali@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc/fsl-pci: Fix Class Code of PCIe Root Port
Date: Mon, 25 Jul 2022 22:24:39 +1000 [thread overview]
Message-ID: <87r129bcs8.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20220722194226.GA1927257@bhelgaas>
Bjorn Helgaas <helgaas@kernel.org> writes:
> On Wed, Jul 06, 2022 at 12:10:43PM +0200, Pali Rohár wrote:
>> By default old pre-3.0 Freescale PCIe controllers reports invalid PCI Class
>> Code 0x0b20 for PCIe Root Port. It can be seen by lspci -b output on P2020
>> board which has this pre-3.0 controller:
>>
>> $ lspci -bvnn
>> 00:00.0 Power PC [0b20]: Freescale Semiconductor Inc P2020E [1957:0070] (rev 21)
>> !!! Invalid class 0b20 for header type 01
>> Capabilities: [4c] Express Root Port (Slot-), MSI 00
>>
>> Fix this issue by programming correct PCI Class Code 0x0604 for PCIe Root
>> Port to the Freescale specific PCIe register 0x474.
>>
>> With this change lspci -b output is:
>>
>> $ lspci -bvnn
>> 00:00.0 PCI bridge [0604]: Freescale Semiconductor Inc P2020E [1957:0070] (rev 21) (prog-if 00 [Normal decode])
>> Capabilities: [4c] Express Root Port (Slot-), MSI 00
>>
>> Without any "Invalid class" error. So class code was properly reflected
>> into standard (read-only) PCI register 0x08.
>>
>> Same fix is already implemented in U-Boot pcie_fsl.c driver in commit:
>> http://source.denx.de/u-boot/u-boot/-/commit/d18d06ac35229345a0af80977a408cfbe1d1015b
>>
>> Fix activated by U-Boot stay active also after booting Linux kernel.
>> But boards which use older U-Boot version without that fix are affected and
>> still require this fix.
>>
>> So implement this class code fix also in kernel fsl_pci.c driver.
>>
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Pali Rohár <pali@kernel.org>
>
> I assume the powerpc folks will take care of this.
Will do.
cheers
WARNING: multiple messages have this Message-ID (diff)
From: Michael Ellerman <mpe@ellerman.id.au>
To: "Bjorn Helgaas" <helgaas@kernel.org>, "Pali Rohár" <pali@kernel.org>
Cc: linux-kernel@vger.kernel.org, Paul Mackerras <paulus@samba.org>,
linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/fsl-pci: Fix Class Code of PCIe Root Port
Date: Mon, 25 Jul 2022 22:24:39 +1000 [thread overview]
Message-ID: <87r129bcs8.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20220722194226.GA1927257@bhelgaas>
Bjorn Helgaas <helgaas@kernel.org> writes:
> On Wed, Jul 06, 2022 at 12:10:43PM +0200, Pali Rohár wrote:
>> By default old pre-3.0 Freescale PCIe controllers reports invalid PCI Class
>> Code 0x0b20 for PCIe Root Port. It can be seen by lspci -b output on P2020
>> board which has this pre-3.0 controller:
>>
>> $ lspci -bvnn
>> 00:00.0 Power PC [0b20]: Freescale Semiconductor Inc P2020E [1957:0070] (rev 21)
>> !!! Invalid class 0b20 for header type 01
>> Capabilities: [4c] Express Root Port (Slot-), MSI 00
>>
>> Fix this issue by programming correct PCI Class Code 0x0604 for PCIe Root
>> Port to the Freescale specific PCIe register 0x474.
>>
>> With this change lspci -b output is:
>>
>> $ lspci -bvnn
>> 00:00.0 PCI bridge [0604]: Freescale Semiconductor Inc P2020E [1957:0070] (rev 21) (prog-if 00 [Normal decode])
>> Capabilities: [4c] Express Root Port (Slot-), MSI 00
>>
>> Without any "Invalid class" error. So class code was properly reflected
>> into standard (read-only) PCI register 0x08.
>>
>> Same fix is already implemented in U-Boot pcie_fsl.c driver in commit:
>> http://source.denx.de/u-boot/u-boot/-/commit/d18d06ac35229345a0af80977a408cfbe1d1015b
>>
>> Fix activated by U-Boot stay active also after booting Linux kernel.
>> But boards which use older U-Boot version without that fix are affected and
>> still require this fix.
>>
>> So implement this class code fix also in kernel fsl_pci.c driver.
>>
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Pali Rohár <pali@kernel.org>
>
> I assume the powerpc folks will take care of this.
Will do.
cheers
next prev parent reply other threads:[~2022-07-25 12:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-06 10:10 [PATCH] powerpc/fsl-pci: Fix Class Code of PCIe Root Port Pali Rohár
2022-07-06 10:10 ` Pali Rohár
2022-07-21 22:18 ` Pali Rohár
2022-07-21 22:18 ` Pali Rohár
2022-07-22 19:42 ` Bjorn Helgaas
2022-07-22 19:42 ` Bjorn Helgaas
2022-07-25 12:24 ` Michael Ellerman [this message]
2022-07-25 12:24 ` Michael Ellerman
2022-07-29 13:02 ` Michael Ellerman
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=87r129bcs8.fsf@mpe.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=benh@kernel.crashing.org \
--cc=bhelgaas@google.com \
--cc=helgaas@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=pali@kernel.org \
--cc=paulus@samba.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.