lkml.org 
[lkml]   [2014]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] ahci: Use pci_enable_msi_exact() instead of pci_enable_msi_range()
Date
The driver calls pci_enable_msi_range() function with the
range of [nvec..nvec] which what pci_enable_msi_exact()
function is for.

Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: linux-ide@vger.kernel.org
---
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 838d97e..01c5541 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1174,7 +1174,7 @@ static int ahci_is_mrsm(struct ahci_host_priv *hpriv)
static int ahci_init_interrupts(struct pci_dev *pdev, unsigned int n_ports,
struct ahci_host_priv *hpriv)
{
- int nvec;
+ int rc, nvec;

if (hpriv->flags & AHCI_HFLAG_NO_MSI)
goto intx;
@@ -1191,10 +1191,10 @@ static int ahci_init_interrupts(struct pci_dev *pdev, unsigned int n_ports,
if (nvec < n_ports)
goto single_msi;

- nvec = pci_enable_msi_range(pdev, nvec, nvec);
- if (nvec == -ENOSPC)
+ rc = pci_enable_msi_exact(pdev, nvec);
+ if (rc == -ENOSPC)
goto single_msi;
- else if (nvec < 0)
+ else if (rc < 0)
goto intx;

/*
--
1.7.7.6


\
 
 \ /
  Last update: 2014-04-02 11:01    [W:0.083 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site