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: 683309 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3syStk3YFGz9ryk for ; Tue, 18 Oct 2016 06:29:02 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965019AbcJQT3A (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-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org 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-ide" 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