From: Bjorn Helgaas <helgaas@kernel.org>
To: "He, Rui" <Rui.He@windriver.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Chikhalkar, Prashant" <Prashant.Chikhalkar@windriver.com>,
"Xiao, Jiguang" <Jiguang.Xiao@windriver.com>
Subject: Re: [PATCH 1/1] pci: Add subordinate check before pci_add_new_bus()
Date: Fri, 15 Aug 2025 09:22:58 -0500 [thread overview]
Message-ID: <20250815142258.GA377110@bhelgaas> (raw)
In-Reply-To: <DS4PPFD24E991EC6BCD98A674667D0D7AB39634A@DS4PPFD24E991EC.namprd11.prod.outlook.com>
On Fri, Aug 15, 2025 at 02:31:31AM +0000, He, Rui wrote:
> > -----Original Message-----
> > From: Bjorn Helgaas <helgaas@kernel.org>
> > Sent: 2025年8月15日 4:36
> > To: He, Rui <Rui.He@windriver.com>
> > Cc: Bjorn Helgaas <bhelgaas@google.com>; linux-pci@vger.kernel.org;
> > linux-kernel@vger.kernel.org; Chikhalkar, Prashant
> > <Prashant.Chikhalkar@windriver.com>; Xiao, Jiguang
> > <Jiguang.Xiao@windriver.com>
> > Subject: Re: [PATCH 1/1] pci: Add subordinate check before
> > pci_add_new_bus()
> >
> > CAUTION: This email comes from a non Wind River email account!
> > Do not click links or open attachments unless you recognize the sender and
> > know the content is safe.
> >
> > On Thu, Aug 14, 2025 at 05:39:37PM +0800, Rui He wrote:
> > > For preconfigured PCI bridge, child bus created on the first scan.
> > > While for some reasons(e.g register mutation), the secondary, and
> > > subordiante register reset to 0 on the second scan, which caused to
> > > create PCI bus twice for the same PCI device.
> >
> > I don't quite follow this. Do you mean something is changing the
> > bridge configuration between the first and second scans?
>
> I'm not sure what changed the bridge configuration, but the
> secondary and subordinate is indeed 0 on the second scan as [bus
> 0e-10] created for 0000:0b:01.0.
>
> In my opinion, it might be an invalid communication or register
> mutation in PCI bridge.
> > > Following is the related log:
> > > [Wed May 28 20:38:36 CST 2025] pci 0000:0b:01.0: PCI bridge to [bus
> > > 0d] [Wed May 28 20:38:36 CST 2025] pci 0000:0b:05.0: bridge
> > > configuration invalid ([bus 00-00]), reconfiguring [Wed May 28
> > > 20:38:36 CST 2025] pci 0000:0b:01.0: PCI bridge to [bus 0e-10] [Wed
> > > May 28 20:38:36 CST 2025] pci 0000:0b:05.0: PCI bridge to [bus 0f-10]
> > > Here PCI device 000:0b:01.0 assigend to bus 0d and 0e.
> >
> > It looks like the [bus 0f-10] range is assigned to both bridges
> > (0b:01.0 and 0b:05.0), which would definitely be a problem.
> >
> > I'm surprised that we haven't tripped over this before, and I'm
> > curious about how we got here. Can you set
> > CONFIG_DYNAMIC_DEBUG=y, boot with the dyndbg="file drivers/pci/*
> > +p" kernel parameter, and collect the complete dmesg log?
>
> Sorry, as this is a individual issue, and cannot be reproduced, I
> cannot offer more detailed logs.
Do you have the complete dmesg log from this one time you saw the
problem?
As-is, I don't think there's quite enough here to move forward with
this. I think we need some more detailed analysis to figure out how
this happens.
Bjorn
next prev parent reply other threads:[~2025-08-15 14:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-14 9:39 [PATCH 1/1] pci: Add subordinate check before pci_add_new_bus() Rui He
2025-08-14 20:36 ` Bjorn Helgaas
2025-08-15 2:31 ` He, Rui
2025-08-15 14:22 ` Bjorn Helgaas [this message]
2025-08-26 7:01 ` He, Rui
2025-08-17 2:46 ` Ethan Zhao
2025-08-25 8:47 ` He, Rui
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=20250815142258.GA377110@bhelgaas \
--to=helgaas@kernel.org \
--cc=Jiguang.Xiao@windriver.com \
--cc=Prashant.Chikhalkar@windriver.com \
--cc=Rui.He@windriver.com \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.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