[PATCH v3 2/2] PCI/MSI: Implement irq_mask_noflush() for MSI-X

Keith Busch kbusch at kernel.org
Mon Nov 9 08:14:02 PST 2026


On Sat, Nov 07, 2026 at 10:53:47PM +0100, Thomas Gleixner wrote:
> On Sat, Nov 07 2026 at 13:00, Keith Busch wrote:
> > This is done on purpose: pci_msix_write_vector_ctrl() already has the
> > same offline check, so nothing actually gets written, same as before.
> >
> > And regardless of whether it's offline or not, we have to set the
> > PCI_MSIX_ENTRY_CTRL_MASKBIT in the cached msxi_ctrl. That's common to
> > both paths, so it lives in the noflush helper to avoid duplicating it.
> 
> Indeed, but that's an unreadable mess TBH.

No disagreement there! I was just going for a minimal diff, but we can
refactor a bit on the way. I'll take a stab at it.

I also don't really get the rationale for putting the check in
write_vector. The commit message says the checks are to avoid having to
deal with errors, but posted writes don't produce errors, so not sure
what it's actually guarding against.

> Can we please change that to have two functions here?
> 
>     pci_msix_write_vector_ctrl()
> plus    
>     pci_msix_write_vector_ctrl_and_flush()
> 
> and fixup the related call sites?



More information about the Linux-nvme mailing list