]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - drivers/pci/msi.c
[PATCH] kernel-doc: PCI fixes
[mirror_ubuntu-jammy-kernel.git] / drivers / pci / msi.c
index 532f73bb2224af802af190aa0a38ea66242aa188..a2033552423c48a3be1f77c763f463ea38a263c3 100644 (file)
@@ -439,10 +439,7 @@ static void enable_msi_mode(struct pci_dev *dev, int pos, int type)
        }
        if (pci_find_capability(dev, PCI_CAP_ID_EXP)) {
                /* PCI Express Endpoint device detected */
-               u16 cmd;
-               pci_read_config_word(dev, PCI_COMMAND, &cmd);
-               cmd |= PCI_COMMAND_INTX_DISABLE;
-               pci_write_config_word(dev, PCI_COMMAND, cmd);
+               pci_intx(dev, 0);  /* disable intx */
        }
 }
 
@@ -461,10 +458,7 @@ void disable_msi_mode(struct pci_dev *dev, int pos, int type)
        }
        if (pci_find_capability(dev, PCI_CAP_ID_EXP)) {
                /* PCI Express Endpoint device detected */
-               u16 cmd;
-               pci_read_config_word(dev, PCI_COMMAND, &cmd);
-               cmd &= ~PCI_COMMAND_INTX_DISABLE;
-               pci_write_config_word(dev, PCI_COMMAND, cmd);
+               pci_intx(dev, 1);  /* enable intx */
        }
 }
 
@@ -581,6 +575,8 @@ static int msi_capability_init(struct pci_dev *dev)
 /**
  * msix_capability_init - configure device's MSI-X capability
  * @dev: pointer to the pci_dev data structure of MSI-X device function
+ * @entries: pointer to an array of struct msix_entry entries
+ * @nvec: number of @entries
  *
  * Setup the MSI-X capability structure of device function with a
  * single MSI-X vector. A return of zero indicates the successful setup of