From patchwork Mon Oct 17 19:28:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 9380335 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 D44E6607D4 for ; Mon, 17 Oct 2016 19:29:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A2112290D4 for ; Mon, 17 Oct 2016 19:29:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F1A3290E4; Mon, 17 Oct 2016 19:29:12 +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 32CB3290D4 for ; Mon, 17 Oct 2016 19:29:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965079AbcJQT3A (ORCPT ); Mon, 17 Oct 2016 15:29:00 -0400 Received: from verein.lst.de ([213.95.11.211]:60627 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965005AbcJQT3A (ORCPT ); Mon, 17 Oct 2016 15:29:00 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 3E2A668D8E; Mon, 17 Oct 2016 21:28:58 +0200 (CEST) Date: Mon, 17 Oct 2016 21:28:58 +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: <20161017192858.GA25429@lst.de> References: <20161017080103.GA8732@lst.de> <20161017092621.GA11124@lst.de> <20161017103442.GA12240@lst.de> <20161017120234.GA14105@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 Hi Emmanuel, I think I have an idea now - we are accidentally hitting the per-port MSI vector case because your SSD only has one AHCI "port". Can you try the below patch: --- 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..3c2f92b 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1413,6 +1413,7 @@ static int ahci_init_msi(struct pci_dev *pdev, unsigned int n_ports, if (hpriv->flags & AHCI_HFLAG_NO_MSI) return -ENODEV; + if (n_ports > 1) { /* * If number of MSIs is less than number of ports then Sharing Last * Message mode could be enforced. In this case assume that advantage @@ -1434,6 +1435,7 @@ static int ahci_init_msi(struct pci_dev *pdev, unsigned int n_ports, printk(KERN_INFO "ahci: MRSM is on, fallback to single MSI\n"); pci_free_irq_vectors(pdev); } + } /* * -ENOSPC indicated we don't have enough vectors. Don't bother trying