From patchwork Mon Oct 17 10:34:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 9378913 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 627D3607D4 for ; Mon, 17 Oct 2016 10:34:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 525D028D53 for ; Mon, 17 Oct 2016 10:34:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 455C529094; Mon, 17 Oct 2016 10:34:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C0D0228D53 for ; Mon, 17 Oct 2016 10:34:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934450AbcJQKep (ORCPT ); Mon, 17 Oct 2016 06:34:45 -0400 Received: from verein.lst.de ([213.95.11.211]:58085 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932335AbcJQKeo (ORCPT ); Mon, 17 Oct 2016 06:34:44 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id B5C1268DCC; Mon, 17 Oct 2016 12:34:42 +0200 (CEST) Date: Mon, 17 Oct 2016 12:34:42 +0200 From: Christoph Hellwig To: Emmanuel Benisty Cc: Christoph Hellwig , tj@kernel.org, linux-ide@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: use pci_alloc_irq_vectors issues Message-ID: <20161017103442.GA12240@lst.de> References: <20161017080103.GA8732@lst.de> <20161017092621.GA11124@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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? --- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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)