All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ahci: always fall back to single-MSI mode
@ 2016-11-18 13:09 Christoph Hellwig
  2016-11-21 16:08 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2016-11-18 13:09 UTC (permalink / raw)
  To: tj; +Cc: michael, linux-ide

Don't try to guess what the errors from pci_irq_alloc_vectors mean, as
that's too fragile.  Instead always try allocating a single vector
when multi-MSI mode fails.  This makes various intel Desktop and
Laptop CPUs use MSI again.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Michael Marley <michael@michaelmarley.com>
Tested-by: Michael Marley <michael@michaelmarley.com>
Fixes: 0b9e2988ab22 ("ahci: use pci_alloc_irq_vectors")
---
 drivers/ata/ahci.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 9669fc7..74f4c66 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,
 				"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 a single vectors for any other error:
-		 */
-		if (nvec < 0 && nvec != -ENOSPC)
-			return nvec;
 	}
 
 	/*
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ahci: always fall back to single-MSI mode
  2016-11-18 13:09 [PATCH] ahci: always fall back to single-MSI mode Christoph Hellwig
@ 2016-11-21 16:08 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2016-11-21 16:08 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: michael, linux-ide

On Fri, Nov 18, 2016 at 02:09:06PM +0100, Christoph Hellwig wrote:
> Don't try to guess what the errors from pci_irq_alloc_vectors mean, as
> that's too fragile.  Instead always try allocating a single vector
> when multi-MSI mode fails.  This makes various intel Desktop and
> Laptop CPUs use MSI again.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reported-by: Michael Marley <michael@michaelmarley.com>
> Tested-by: Michael Marley <michael@michaelmarley.com>
> Fixes: 0b9e2988ab22 ("ahci: use pci_alloc_irq_vectors")

Applied to libata/for-4.9-fixes.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-21 16:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-18 13:09 [PATCH] ahci: always fall back to single-MSI mode Christoph Hellwig
2016-11-21 16:08 ` Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.