diff options
author | Alexander Gordeev <agordeev@redhat.com> | 2014-04-17 08:13:50 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-04-17 09:59:24 -0400 |
commit | ccf8f53cac7d9321c9af2b14af41e703f44ac198 (patch) | |
tree | eb0978e74fe30e06d3f292756c562bfc1807edc8 /drivers/ata | |
parent | ab0f9e78b97f5193dd38b3757b42b6fbded05fb7 (diff) |
ahci: Use pci_enable_msi_exact() instead of pci_enable_msi_range()
The driver calls pci_enable_msi_range() function with the range of
[nvec..nvec] which is what pci_enable_msi_exact() function is for.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: linux-ide@vger.kernel.org
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/ahci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index f6b3e31f63cd..44d40c746982 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -1166,7 +1166,7 @@ static inline void ahci_gtf_filter_workaround(struct ata_host *host) | |||
1166 | static int ahci_init_interrupts(struct pci_dev *pdev, unsigned int n_ports, | 1166 | static int ahci_init_interrupts(struct pci_dev *pdev, unsigned int n_ports, |
1167 | struct ahci_host_priv *hpriv) | 1167 | struct ahci_host_priv *hpriv) |
1168 | { | 1168 | { |
1169 | int nvec; | 1169 | int rc, nvec; |
1170 | 1170 | ||
1171 | if (hpriv->flags & AHCI_HFLAG_NO_MSI) | 1171 | if (hpriv->flags & AHCI_HFLAG_NO_MSI) |
1172 | goto intx; | 1172 | goto intx; |
@@ -1183,10 +1183,10 @@ static int ahci_init_interrupts(struct pci_dev *pdev, unsigned int n_ports, | |||
1183 | if (nvec < n_ports) | 1183 | if (nvec < n_ports) |
1184 | goto single_msi; | 1184 | goto single_msi; |
1185 | 1185 | ||
1186 | nvec = pci_enable_msi_range(pdev, nvec, nvec); | 1186 | rc = pci_enable_msi_exact(pdev, nvec); |
1187 | if (nvec == -ENOSPC) | 1187 | if (rc == -ENOSPC) |
1188 | goto single_msi; | 1188 | goto single_msi; |
1189 | else if (nvec < 0) | 1189 | else if (rc < 0) |
1190 | goto intx; | 1190 | goto intx; |
1191 | 1191 | ||
1192 | /* fallback to single MSI mode if the controller enforced MRSM mode */ | 1192 | /* fallback to single MSI mode if the controller enforced MRSM mode */ |