Re: [PATCH 2/2] PCI/MSI: Update MSI-X irq domain hwsize
From: Guixin Liu
Date: Wed Mar 25 2026 - 04:41:29 EST
在 2026/3/25 15:42, Thomas Gleixner 写道:
On Wed, Mar 25 2026 at 09:34, Guixin Liu wrote:Sorry, My description is not very accurate, yes, it's device driver.
在 2026/3/24 21:59, Thomas Gleixner 写道:What's an upper-layer driver? Please be precise.
On Tue, Mar 24 2026 at 09:47, Guixin Liu wrote:Hi, My description was a bit ambiguous. The msi_device_data_release()
After the upper-layer driver removes the device and before the nextWhen a device is removed then the corresponding struct device is torn
probe, events such as firmware updates may increase the number of
interrupts supported by the device. However, the irq_domain still
retains the old hwsize, which causes subsequent interrupt allocation
failures. Update hwsize during MSI-X device domain setup to fix this
issue.
down, which implies that the device domain is freed as well. So how can
this end up with the old state on the next probe?
path to remove the irq_domain is only triggered when the device is
removed at the PCI layer. If only the upper-layer driver unbinds,
this path will not be reached.
I assume you are talking about the device driver itself.
Right, theYes, I had also considered this aspect before, I will change the scheme to this,
unbind of the driver won't remove the domain. But there is no real good
reason for keeping it around at that point.
So the straight forward solution is to free the MSI domain when the
driver shuts down and tears the MSI interrupts down.
and send another patch, thanks.
Best Regards,
Guixin Liu
Thanks,
tglx