firewire-fixes-6.8-final

A fix to suppress warning about unreleased IRQ for 1394 OHCI hardware when
 disabling MSI
 
 In Linux kernel v6.5, a PCI driver for 1394 OHCI hardware was optimized
 into the managed device resources. Edmund Raile points out that the change
 brings the warning about unreleased IRQ at the call of pci_disable_msi(),
 since the API expects that the relevant IRQ has already been released in
 advance.
 
 As long as the API is called in .remove callback of PCI device operation,
 it is prohibited to maintain the IRQ as the part of managed device
 resource. As a workaround, the IRQ is explicitly released at .remove
 callback, before the call of pci_disable_msi().
 
 The pci_disable_msi() is legacy API nowadays in PCI MSI implementation. I
 have a plan to replace it with the modern API in the development for the
 future version of Linux kernel. So at present I keep them as is.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQE66IEYNDXNBPeGKSsLtaWM8LwEwUCZevaBAAKCRCsLtaWM8Lw
 Ez5LAP9QEraiOsm2JxyCNMmyjWubMd58wSjdVmWW61yKxEegvwD8DPY1eosKXhDA
 GLWaiRbJ4YbIglEK6zDnmwAz5FYtPw8=
 =PVzs
 -----END PGP SIGNATURE-----

Merge tag 'firewire-fixes-6.8-final' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394

Pull firewire fix from Takashi Sakamoto:
 "A fix to suppress a warning about unreleased IRQ for 1394 OHCI
  hardware when disabling MSI.

  In Linux kernel v6.5, a PCI driver for 1394 OHCI hardware was
  optimized into the managed device resources. Edmund Raile points out
  that the change brings the warning about unreleased IRQ at the call of
  pci_disable_msi(), since the API expects that the relevant IRQ has
  already been released in advance.

  As long as the API is called in .remove callback of PCI device
  operation, it is prohibited to maintain the IRQ as the part of managed
  device resource. As a workaround, the IRQ is explicitly released at
  .remove callback, before the call of pci_disable_msi().

  pci_disable_msi() is legacy API nowadays in PCI MSI implementation. I
  have a plan to replace it with the modern API in the development for
  the future version of Linux kernel. So at present I keep them as is"

* tag 'firewire-fixes-6.8-final' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
  firewire: ohci: prevent leak of left-over IRQ on unbind
This commit is contained in:
Linus Torvalds 2024-03-09 10:25:14 -08:00
commit 66695e7d94

View file

@ -3773,6 +3773,7 @@ static int pci_probe(struct pci_dev *dev,
return 0;
fail_msi:
devm_free_irq(&dev->dev, dev->irq, ohci);
pci_disable_msi(dev);
return err;
@ -3800,6 +3801,7 @@ static void pci_remove(struct pci_dev *dev)
software_reset(ohci);
devm_free_irq(&dev->dev, dev->irq, ohci);
pci_disable_msi(dev);
dev_notice(&dev->dev, "removing fw-ohci device\n");