[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240504154806.zpZEo__F@linutronix.de>
Date: Sat, 4 May 2024 17:48:06 +0200
From: Nam Cao <namcao@...utronix.de>
To: Lukas Wunner <lukas@...ner.de>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>, Yinghai Lu <yinghai@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Rajesh Shah <rajesh.shah@...el.com>, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH 2/4] PCI: pciehp: bail out if pci_hp_add_bridge() fails
On Sat, May 04, 2024 at 05:02:34PM +0200, Lukas Wunner wrote:
> On Sat, May 04, 2024 at 12:56:30PM +0200, Nam Cao wrote:
> > On Sat, May 04, 2024 at 11:51:54AM +0200, Lukas Wunner wrote:
> > > Could you reproduce with pciehp instead of shpchp please?
> >
> > Same thing for pciehp below. I think the problem is because without
> > pci_stop_and_remove_bus_device(), no one cleans up the device added in
> > pci_scan_slot(). When another device get hot-added, pci_get_slot() wrongly
> > thinks another device is already there, so the hot-plug fails.
>
> pciehp powers down the slot because you're returning a negative errno
> from pciehp_configure_device(). Please return 0 instead if
> pci_hp_add_bridge() fails.
Thanks for the suggestion. This is applicable to shpchp as well.
Best regards,
Nam
Powered by blists - more mailing lists