summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2019-08-06 13:06:03 -0400
committerMark Brown <broonie@kernel.org>2019-08-07 09:19:32 -0400
commitbb67dd1878de5766c24fe7a4002d1a12c14da518 (patch)
tree4134d85c0974357f93188ea48a111b2590f86e90
parent0922c7a51c775b71a297598623debe9cb6ce3a08 (diff)
ASoC: SOF: Intel: hda: fix MSI handling
The addition of a kernel module parameter to optionally disable MSI had the side effect of permanently disabling it. The return value of pci_alloc_irq_vectors() is the number of allocated vectors or a negative number on error, so testing with the ! operator is not quite right. It was one optimization too far. Restore previous behavior to use MSI by default, unless the user selects not to do so or the allocation of irq_vectors fails. Fixes: 672ff5e3596ee ('ASoC: SOF: Intel: hda: add a parameter to disable MSI') Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20190806170603.10815-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/sof/intel/hda.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index 79cce20666b6..53813de7844e 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -537,7 +537,7 @@ int hda_dsp_probe(struct snd_sof_dev *sdev)
537 * if it fails, use legacy interrupt mode 537 * if it fails, use legacy interrupt mode
538 * TODO: support msi multiple vectors 538 * TODO: support msi multiple vectors
539 */ 539 */
540 if (hda_use_msi && !pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_MSI)) { 540 if (hda_use_msi && pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_MSI) > 0) {
541 dev_info(sdev->dev, "use msi interrupt mode\n"); 541 dev_info(sdev->dev, "use msi interrupt mode\n");
542 hdev->irq = pci_irq_vector(pci, 0); 542 hdev->irq = pci_irq_vector(pci, 0);
543 /* ipc irq number is the same of hda irq */ 543 /* ipc irq number is the same of hda irq */