On Wed, Aug 27, 2025 at 01:32:02PM -0500, Bjorn Helgaas wrote: > On Wed, Aug 27, 2025 at 02:29:07PM +0800, Inochi Amaoto wrote: > > For msi controller that only supports MSI_FLAG_PCI_MSI_MASK_PARENT, > > the newly added callback irq_startup() and irq_shutdown() for > > pci_msi[x]_templete will not unmask/mask the interrupt when startup/ > > shutdown the interrupt. This will prevent the interrupt from being > > enabled/disabled normally. > > s/templete/template/ > > AFAICS cond_startup_parent() is used by pci_irq_startup_msi() and > pci_irq_startup_msix() in pci_msi_template; cond_shutdown_parent() is > used by pci_irq_shutdown_msi() and pci_irq_shutdown_msix() in > pci_msix_template. > cond_startup_parent() is used by pci_irq_startup_msi() in pci_msi_template and pci_irq_startup_msix() in pci_msix_template; cond_shutdown_parent() is used by pci_irq_shutdown_msi() in pci_msi_template and pci_irq_shutdown_msix() in pci_msix_template. > > Add the missing check for MSI_FLAG_PCI_MSI_MASK_PARENT in the > > cond_[startup|shutdown]_parent(). So the interrupt can be normally > > unmasked/masked if it does not support MSI_FLAG_PCI_MSI_MASK_PARENT. > > > > Fixes: 54f45a30c0d0 ("PCI/MSI: Add startup/shutdown for per device domains") > > Reported-by: Linux Kernel Functional Testing <lkft@xxxxxxxxxx> > > Closes: https://lore.kernel.org/regressions/aK4O7Hl8NCVEMznB@monster/ > > I guess there are several other reporters and reports that could be > added here. Up to you whether to add them. > Yeah, there are some missing tag from the original post, as this patch is already submitted. I will add it in v2. > > Signed-off-by: Inochi Amaoto <inochiama@xxxxxxxxx> > > Tested-by: Nathan Chancellor <nathan@xxxxxxxxxx> > > Acked-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx> > > > --- > > drivers/pci/msi/irqdomain.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/drivers/pci/msi/irqdomain.c b/drivers/pci/msi/irqdomain.c > > index e0a800f918e8..b11b7f63f0d6 100644 > > --- a/drivers/pci/msi/irqdomain.c > > +++ b/drivers/pci/msi/irqdomain.c > > @@ -154,6 +154,8 @@ static void cond_shutdown_parent(struct irq_data *data) > > > > if (unlikely(info->flags & MSI_FLAG_PCI_MSI_STARTUP_PARENT)) > > irq_chip_shutdown_parent(data); > > + else if (unlikely(info->flags & MSI_FLAG_PCI_MSI_MASK_PARENT)) > > + irq_chip_mask_parent(data); > > } > > > > static unsigned int cond_startup_parent(struct irq_data *data) > > @@ -162,6 +164,9 @@ static unsigned int cond_startup_parent(struct irq_data *data) > > > > if (unlikely(info->flags & MSI_FLAG_PCI_MSI_STARTUP_PARENT)) > > return irq_chip_startup_parent(data); > > + else if (unlikely(info->flags & MSI_FLAG_PCI_MSI_MASK_PARENT)) > > + irq_chip_unmask_parent(data); > > + > > return 0; > > } > > > > -- > > 2.51.0 > >