Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b794b14 authored by Maciej Sosnowski's avatar Maciej Sosnowski Committed by Dan Williams
Browse files

I/OAT: fail initialization on zero channels detection



On some systems with I/OAT ver.2 when DCA is disabled in BIOS
situations have been observed
that zero DMA channels are detected instead of four.
To avoid kernel panic driver should fail gracefully with appropriate message.

Signed-off-by: default avatarMaciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: default avatarShannon Nelson <shannon.nelson@intel.com>
Acked-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent ea9c717d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1659,6 +1659,13 @@ struct ioatdma_device *ioat_dma_probe(struct pci_dev *pdev,
		" %d channels, device version 0x%02x, driver version %s\n",
		device->common.chancnt, device->version, IOAT_DMA_VERSION);

	if (!device->common.chancnt) {
		dev_err(&device->pdev->dev,
			"Intel(R) I/OAT DMA Engine problem found: "
			"zero channels detected\n");
		goto err_setup_interrupts;
	}

	err = ioat_dma_setup_interrupts(device);
	if (err)
		goto err_setup_interrupts;