Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>

authored by

Maciej Sosnowski and committed by
Dan Williams
8b794b14 ea9c717d

+7
+7
drivers/dma/ioat_dma.c
··· 1659 1659 " %d channels, device version 0x%02x, driver version %s\n", 1660 1660 device->common.chancnt, device->version, IOAT_DMA_VERSION); 1661 1661 1662 + if (!device->common.chancnt) { 1663 + dev_err(&device->pdev->dev, 1664 + "Intel(R) I/OAT DMA Engine problem found: " 1665 + "zero channels detected\n"); 1666 + goto err_setup_interrupts; 1667 + } 1668 + 1662 1669 err = ioat_dma_setup_interrupts(device); 1663 1670 if (err) 1664 1671 goto err_setup_interrupts;