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 12:34:42 +0200 [thread overview]
Message-ID: <20161017103442.GA12240@lst.de> (raw)
In-Reply-To: <CA+i8gKK55YWL0SsB0UL89TL1XAgySvFwhmU=c+fTpkGo_s4XTA@mail.gmail.com>
On Mon, Oct 17, 2016 at 11:33:03AM +0200, Emmanuel Benisty wrote:
> Hi Christoph,
>
> On Mon, Oct 17, 2016 at 11:26 AM, Christoph Hellwig <hch@lst.de> wrote:
> > can you run the lspci -vv command as again, but this time as root
> > user?
>
> Please find attached the new file.
>
> > Also just to make sure I interpret your report correctly:
> > The ata3 devices that's creating the problems is the SK-Hynix device,
> > probably a SSD that shows up as ahci controller?
>
> Yep, it's the only drive on this machine, which is indeed a SSD drive.
Thanks. Still can't make sense of the issue, can you apply the debug
patch below, and try to caputure the screen output when the ata
device is beeing probed?
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index ba5f11c..458d139 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1422,6 +1422,7 @@ static int ahci_init_msi(struct pci_dev *pdev, unsigned int n_ports,
PCI_IRQ_MSIX | PCI_IRQ_MSI);
if (nvec > 0) {
if (!(readl(hpriv->mmio + HOST_CTL) & HOST_MRSM)) {
+ printk(KERN_INFO "ahci: using %d MSI(-X) vectors)\n", nvec);
hpriv->get_irq_vector = ahci_get_irq_vector;
hpriv->flags |= AHCI_HFLAG_MULTI_MSI;
return nvec;
@@ -1439,17 +1440,22 @@ 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)
+ if (nvec < 0 && nvec != -ENOSPC) {
+ printk("ahci: pci_alloc_irq_vectors (multi) returned %d\n", nvec);
return nvec;
+ }
/*
* If the host is not capable of supporting per-port vectors, fall
* back to single MSI before finally attempting single MSI-X.
*/
nvec = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSI);
+ printk("ahci: pci_alloc_irq_vectors (MSI) returned %d\n", nvec);
if (nvec == 1)
return nvec;
- return pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSIX);
+ nvec = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSIX);
+ printk("ahci: pci_alloc_irq_vectors (MSI-X) returned %d\n", nvec);
+ return nvec;
}
static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
next prev parent reply other threads:[~2016-10-17 10:34 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 [this message]
2016-10-17 11:12 ` Emmanuel Benisty
2016-10-17 12:02 ` Christoph Hellwig
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=20161017103442.GA12240@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).