mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 04:21:09 -04:00
PCI/MSI: Add TODO comment about legacy pcim_enable_device() side-effect
Add a TODO comment in pci/msi/msi.c to document that the automatic IRQ vector management activated by pcim_enable_device() is a dangerous and confusing. Suggested-by: Philipp Stanner <phasta@kernel.org> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/1770798299-202288-4-git-send-email-shawn.lin@rock-chips.com
This commit is contained in:
@@ -77,6 +77,16 @@ static void pcim_msi_release(void *pcidev)
|
||||
/*
|
||||
* Needs to be separate from pcim_release to prevent an ordering problem
|
||||
* vs. msi_device_data_release() in the MSI core code.
|
||||
*
|
||||
* TODO: Remove the legacy side-effect of pcim_enable_device() that
|
||||
* activates automatic IRQ vector management. This design is dangerous
|
||||
* and confusing because it switches normally un-managed functions
|
||||
* into managed mode. Drivers should explicitly manage their IRQ vectors
|
||||
* without this implicit behavior.
|
||||
*
|
||||
* The current implementation uses both pdev->is_managed and
|
||||
* pdev->is_msi_managed flags, which adds unnecessary complexity.
|
||||
* This should be simplified in a future kernel version.
|
||||
*/
|
||||
static int pcim_setup_msi_release(struct pci_dev *dev)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user