Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Huacai Chen <chenhuacai@gmail.com>
Cc: "Huacai Chen" <chenhuacai@loongson.cn>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	linux-pci@vger.kernel.org, "Jianmin Lv" <lvjianmin@loongson.cn>,
	"Xuefeng Li" <lixuefeng@loongson.cn>,
	"Jiaxun Yang" <jiaxun.yang@flygoat.com>
Subject: Re: [PATCH 2/2] PCI: Add quirk for LS7A to avoid reboot failure
Date: Wed, 4 Jan 2023 22:01:14 -0600	[thread overview]
Message-ID: <20230105040114.GA1115282@bhelgaas> (raw)
In-Reply-To: <CAAhV-H5muGHQ=awDckP2Fv6kg_-Mrcpre2ng52yKrTnhpqrVOA@mail.gmail.com>

On Thu, Jan 05, 2023 at 10:49:53AM +0800, Huacai Chen wrote:
> On Thu, Jan 5, 2023 at 2:37 AM Bjorn Helgaas <helgaas@kernel.org> wrote:
> > On Tue, Jan 03, 2023 at 03:34:01PM +0800, Huacai Chen wrote:
> > > cc27b735ad3a7557 ("PCI/portdrv: Turn off PCIe services during shutdown")
> > > causes poweroff/reboot failure on systems with LS7A chipset. We found
> > > that if we remove "pci_command &= ~PCI_COMMAND_MASTER" in do_pci_disable
> > > _device(), it can work well. The hardware engineer says that the root
> > > cause is that CPU is still accessing PCIe devices while poweroff/reboot,
> >
> > Did you ever figure out what these CPU accesses are?  If we call the
> > Root Port .shutdown() method, and later access a downstream device,
> > that seems like a problem in itself.  At least, we should understand
> > exactly *why* we access that downstream device.
>
> Maybe I failed to get the key point, but from my point of view, the
> root cause is clear in previous discussions:
> https://lore.kernel.org/linux-pci/CAAhV-H5uT+wDRkVbW_o1hG2u0rtv6FFABTymL1VdjMMD_UEN+Q@mail.gmail.com/
> https://lore.kernel.org/linux-pci/20220617113708.GA1177054@bhelgaas/
> https://lore.kernel.org/linux-pci/CAAhV-H6raQnXZ4ZZRq19cugew26wXYONctcFO0392gZ00LC6bw@mail.gmail.com/

That's great, but the root cause should be summarized here in the
commit log.

> > To be clear, cc27b735ad3a does not cause the failure.  IIUC, the cause
> > is:
>
> cc27b735ad3a is not a bug, we refer to it just because we observe
> problems after it.

Right.  But you said "cc27b735ad3a ... causes failure," which is not
quite true.  cc27b735ad3a may *expose* an LS7A hardware defect that
previously didn't cause a problem, but I don't want to blame
cc27b735ad3a for that hardware issue.

Bjorn

  reply	other threads:[~2023-01-05  4:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-03  7:33 [PATCH 0/2] PCI: Add two Loongson's LS7A quirks Huacai Chen
2023-01-03  7:34 ` [PATCH 1/2] PCI: loongson: Improve the MRRS quirk for LS7A Huacai Chen
2023-01-03  7:34 ` [PATCH 2/2] PCI: Add quirk for LS7A to avoid reboot failure Huacai Chen
2023-01-04 18:37   ` Bjorn Helgaas
2023-01-05  2:49     ` Huacai Chen
2023-01-05  4:01       ` Bjorn Helgaas [this message]
2023-01-06  7:13         ` Huacai Chen

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=20230105040114.GA1115282@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=chenhuacai@gmail.com \
    --cc=chenhuacai@loongson.cn \
    --cc=jiaxun.yang@flygoat.com \
    --cc=kw@linux.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=lixuefeng@loongson.cn \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=lvjianmin@loongson.cn \
    --cc=robh@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox