linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Emmanuel Benisty <benisty.e@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>,
	tj@kernel.org, linux-ide@vger.kernel.org,
	linux-pci@vger.kernel.org
Subject: Re: use pci_alloc_irq_vectors issues
Date: Mon, 17 Oct 2016 14:02:34 +0200	[thread overview]
Message-ID: <20161017120234.GA14105@lst.de> (raw)
In-Reply-To: <CA+i8gKJkhTjBAPbuceToHD3YJuPHkLhs-joso-vuJzuHRF5OLg@mail.gmail.com>

Thanks a lot!  I think the current check on when to fall back from
the multi-MSI to the single-MSI case is too narrow and we should
just always fall back.

Can you see if the patch below fixes your issue (revert the debug patch
first, please)?

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index ba5f11c..b4b8004 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1436,13 +1436,6 @@ static int ahci_init_msi(struct pci_dev *pdev, unsigned int n_ports,
 	}
 
 	/*
-	 * -ENOSPC indicated we don't have enough vectors.  Don't bother trying
-	 * a single vectors for any other error:
-	 */
-	if (nvec < 0 && nvec != -ENOSPC)
-		return nvec;
-
-	/*
 	 * If the host is not capable of supporting per-port vectors, fall
 	 * back to single MSI before finally attempting single MSI-X.
 	 */

  reply	other threads:[~2016-10-17 12:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CA+i8gKJ1BnOE8tOzxfbFJcG1qa9XchiDBQSGZUHUOch6byi+tQ@mail.gmail.com>
2016-10-17  8:01 ` use pci_alloc_irq_vectors issues Christoph Hellwig
2016-10-17  8:10   ` Emmanuel Benisty
2016-10-17  9:26     ` Christoph Hellwig
2016-10-17  9:33       ` Emmanuel Benisty
2016-10-17 10:34         ` Christoph Hellwig
2016-10-17 11:12           ` Emmanuel Benisty
2016-10-17 12:02             ` Christoph Hellwig [this message]
2016-10-17 12:48               ` Emmanuel Benisty
2016-10-17 19:28                 ` Christoph Hellwig
2016-10-17 20:51                   ` Emmanuel Benisty
2016-10-17 20:55                     ` Christoph Hellwig

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=20161017120234.GA14105@lst.de \
    --to=hch@lst.de \
    --cc=benisty.e@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=tj@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).