linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Gordeev <agordeev@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Jens Axboe <axboe@kernel.dk>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	linux-pci@vger.kernel.org
Subject: [PATCH 10/9] skd: Use pci_enable_msix_exact() instead of pci_enable_msix_range()
Date: Tue, 25 Feb 2014 22:31:10 +0100	[thread overview]
Message-ID: <20140225213109.GA20652@dhcp-26-207.brq.redhat.com> (raw)
In-Reply-To: <cover.1392799751.git.agordeev@redhat.com>

Function pci_enable_msix_exact() is a variation of
pci_enable_msix_range() that allows a device driver
to request a particular number of MSI-X interrupts,
rather than any number within a specified range.

Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: linux-pci@vger.kernel.org
---
 drivers/block/skd_main.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index a69dd93..c244c5bc 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -3945,15 +3945,14 @@ static int skd_acquire_msix(struct skd_device *skdev)
 	for (i = 0; i < SKD_MAX_MSIX_COUNT; i++)
 		entries[i].entry = i;
 
-	rc = pci_enable_msix_range(pdev, entries,
-				   SKD_MIN_MSIX_COUNT, SKD_MAX_MSIX_COUNT);
-	if (rc < 0) {
+	rc = pci_enable_msix_exact(pdev, entries, SKD_MAX_MSIX_COUNT);
+	if (rc) {
 		pr_err("(%s): failed to enable MSI-X %d\n",
 		       skd_name(skdev), rc);
 		goto msix_out;
 	}
 
-	skdev->msix_count = rc;
+	skdev->msix_count = SKD_MAX_MSIX_COUNT;
 	skdev->msix_entries = kzalloc(sizeof(struct skd_msix_entry) *
 				      skdev->msix_count, GFP_KERNEL);
 	if (!skdev->msix_entries) {
-- 
1.7.7.6

-- 
Regards,
Alexander Gordeev
agordeev@redhat.com

  parent reply	other threads:[~2014-02-25 21:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-19  8:58 [PATCH 0/9] block: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
2014-02-19  8:58 ` [PATCH 1/9] cciss: Fallback to MSI rather than to INTx if MSI-X failed Alexander Gordeev
2014-02-19  8:58 ` [PATCH 2/9] cciss: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
2014-02-19  8:58 ` [PATCH 3/9] mtip32xx: Remove superfluous call to pci_disable_msi() Alexander Gordeev
2014-02-19  8:58 ` [PATCH 4/9] mtip32xx: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
2014-02-19  8:58 ` [PATCH 5/9] rsxx: " Alexander Gordeev
2014-02-19  8:58 ` [PATCH 6/9] skd: Fix out of array boundary access Alexander Gordeev
2014-02-19  8:58 ` [PATCH 7/9] skd: Fix incomplete cleanup of MSI-X interrupt Alexander Gordeev
2014-02-19  8:58 ` [PATCH 8/9] skd: Use unified access to skdev->msix_entries throughout the code Alexander Gordeev
2014-02-19  8:58 ` [PATCH 9/9] skd: Use pci_enable_msix_range() instead of pci_enable_msix() Alexander Gordeev
2014-02-21 23:46 ` [PATCH 0/9] block: " Jens Axboe
2014-02-22  9:38   ` Alexander Gordeev
2014-02-24 17:16     ` Jens Axboe
2014-02-25 21:31 ` Alexander Gordeev [this message]
2014-02-25 22:19   ` [PATCH 10/9] skd: Use pci_enable_msix_exact() instead of pci_enable_msix_range() Jens Axboe
2014-02-25 21:33 ` [PATCH 11/9] mtip32xx: Use pci_enable_msi() instead of pci_enable_msi_range() Alexander Gordeev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140225213109.GA20652@dhcp-26-207.brq.redhat.com \
    --to=agordeev@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=b.zolnierkie@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).