Patchwork [2/4] dmaengine: ioatdma: disable DCA enabling on IOATDMA v3.4

login
register
mail settings
Submitter Dave Jiang
Date Feb. 22, 2019, 4:59 p.m.
Message ID <155085479955.47403.10368511128922487771.stgit@djiang5-desk3.ch.intel.com>
Download mbox | patch
Permalink /patch/733885/
State New
Headers show

Comments

Dave Jiang - Feb. 22, 2019, 4:59 p.m.
IOATDMA v3.4 does not support DCA. Disable

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
 drivers/dma/ioat/hw.h   |    1 +
 drivers/dma/ioat/init.c |    2 ++
 2 files changed, 3 insertions(+)

Patch

diff --git a/drivers/dma/ioat/hw.h b/drivers/dma/ioat/hw.h
index 3e38877cae6b..781c94de8e81 100644
--- a/drivers/dma/ioat/hw.h
+++ b/drivers/dma/ioat/hw.h
@@ -73,6 +73,7 @@ 
 #define IOAT_VER_3_0            0x30    /* Version 3.0 */
 #define IOAT_VER_3_2            0x32    /* Version 3.2 */
 #define IOAT_VER_3_3            0x33    /* Version 3.3 */
+#define IOAT_VER_3_4		0x34	/* Version 3.4 */
 
 
 int system_has_dca_enabled(struct pci_dev *pdev);
diff --git a/drivers/dma/ioat/init.c b/drivers/dma/ioat/init.c
index 3161dfbca505..58dd1bfd3edd 100644
--- a/drivers/dma/ioat/init.c
+++ b/drivers/dma/ioat/init.c
@@ -1353,6 +1353,8 @@  static int ioat_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	pci_set_drvdata(pdev, device);
 
 	device->version = readb(device->reg_base + IOAT_VER_OFFSET);
+	if (device->version >= IOAT_VER_3_4)
+		ioat_dca_enabled = 0;
 	if (device->version >= IOAT_VER_3_0) {
 		if (is_skx_ioat(pdev))
 			device->version = IOAT_VER_3_2;