{}
#endif
-static struct msi_desc *msix_get_desc(struct pci_dev *dev, u16 entry)
-{
- struct msi_desc *desc;
-
- list_for_each_entry(desc, &dev->msi_list, list) {
- if (desc->msi_attrib.entry_nr == entry)
- return desc;
- }
-
- return NULL;
-}
-
/*
* ahci_init_msix() only implements single MSI-X support, not multiple
* MSI-X per-port interrupts. This is needed for host controllers that only
static int ahci_init_msix(struct pci_dev *pdev, unsigned int n_ports,
struct ahci_host_priv *hpriv)
{
- struct msi_desc *desc;
int rc, nvec;
struct msix_entry entry = {};
if (rc < 0)
goto fail;
- desc = msix_get_desc(pdev, 0); /* first entry */
- if (!desc) {
- rc = -EINVAL;
- goto fail;
- }
-
- hpriv->irq = desc->irq;
+ hpriv->irq = entry.vector;
return 1;
fail: