From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Mario Limonciello <mario.limonciello@amd.com>
Cc: linux1394-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, adamg@pobox.com,
stable@vger.kernel.org, Jiri Slaby <jirislaby@kernel.org>,
Tobias Gruetzmacher <tobias-lists@23.gs>
Subject: Re: [PATCH] firewire: ohci: suppress unexpected system reboot in AMD Ryzen machines and ASM108x/VT630x PCIe cards
Date: Tue, 2 Jan 2024 12:55:19 +0900 [thread overview]
Message-ID: <20240102035519.GA46261@workstation.local> (raw)
In-Reply-To: <af04e964-28b9-4c31-a2e2-93d8410b5e8b@amd.com>
Hi Mario,
On Fri, Dec 29, 2023 at 08:30:00PM -0600, Mario Limonciello wrote:
> On 12/28/2023 21:57, Takashi Sakamoto wrote:
> > @@ -3527,6 +3534,45 @@ static const struct fw_card_driver ohci_driver = {
> > .stop_iso = ohci_stop_iso,
> > };
> > +// On PCI Express Root Complex in any type of AMD Ryzen machine, VIA VT6306/6307/6308 with Asmedia
> > +// ASM1083/1085 brings an inconvenience that read accesses to 'Isochronous Cycle Timer' register
> > +// (at offset 0xf0 in PCI I/O space) often causes unexpected system reboot. The mechanism is not
> > +// clear, since the read access to the other registers is enough safe; e.g. 'Node ID' register,
> > +// while it is probable due to detection of any type of PCIe error.
> > +#if IS_ENABLED(CONFIG_X86)
> > +
> > +#define PCI_DEVICE_ID_ASMEDIA_ASM108X 0x1080
> > +
> > +static bool detect_vt630x_with_asm1083_on_amd_ryzen_machine(const struct pci_dev *pdev,
> > + struct fw_ohci *ohci)
> > +{
> > + const struct pci_dev *pcie_to_pci_bridge;
> > + const struct cpuinfo_x86 *cinfo = &cpu_data(0);
> > +
> > + // Detect any type of AMD Ryzen machine.
> > + if (cinfo->x86_vendor != X86_VENDOR_AMD || cinfo->x86 < 0x17)
> > + return false;
>
> Maybe it's better to use X86_FEATURE_ZEN?
Indeed. We can use it under the condition branch for CONFIG_X86, like:
+ // Detect any type of AMD Ryzen machine.
+ if (!static_cpu_has(X86_FEATURE_ZEN))
+ return false;
Thanks
Takashi Sakamoto
next prev parent reply other threads:[~2024-01-02 3:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-29 3:57 [PATCH] firewire: ohci: suppress unexpected system reboot in AMD Ryzen machines and ASM108x/VT630x PCIe cards Takashi Sakamoto
2023-12-29 22:56 ` kernel test robot
2023-12-30 2:30 ` Mario Limonciello
2024-01-02 3:55 ` Takashi Sakamoto [this message]
2023-12-30 8:43 ` kernel test robot
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=20240102035519.GA46261@workstation.local \
--to=o-takashi@sakamocchi.jp \
--cc=adamg@pobox.com \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=mario.limonciello@amd.com \
--cc=stable@vger.kernel.org \
--cc=tobias-lists@23.gs \
/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