diff options
author | Oded Gabbay <ogabbay@kernel.org> | 2021-03-08 19:06:57 +0300 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2021-04-09 14:09:23 +0300 |
commit | 12e66a172773320e66df29908d7533f4f4663938 (patch) | |
tree | 0ea9e1f6648994598786f9d84d27bcb67ea36c8a | |
parent | 2ea09537ad7747944c20ff70078be304a71b3e33 (diff) | |
download | linux-12e66a172773320e66df29908d7533f4f4663938.tar.xz |
habanalabs/gaudi: always use single-msi mode
The device can get into deadlock in case it use indirect mode for MSI
interrupts (multi-msi) and have hard-reset during interrupt storm.
To prevent that, always use direct mode which means single-msi mode.
The F/W will prevent the host from writing to the indirect MSI
registers to prevent any malicious user from causing this scenario.
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
-rw-r--r-- | drivers/misc/habanalabs/gaudi/gaudi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/misc/habanalabs/gaudi/gaudi.c b/drivers/misc/habanalabs/gaudi/gaudi.c index 099c51350be6..0bcee675e1db 100644 --- a/drivers/misc/habanalabs/gaudi/gaudi.c +++ b/drivers/misc/habanalabs/gaudi/gaudi.c @@ -1766,8 +1766,7 @@ static int gaudi_enable_msi(struct hl_device *hdev) if (gaudi->hw_cap_initialized & HW_CAP_MSI) return 0; - rc = pci_alloc_irq_vectors(hdev->pdev, 1, GAUDI_MSI_ENTRIES, - PCI_IRQ_MSI); + rc = pci_alloc_irq_vectors(hdev->pdev, 1, 1, PCI_IRQ_MSI); if (rc < 0) { dev_err(hdev->dev, "MSI: Failed to enable support %d\n", rc); return rc; |