aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/dma/ioat/dca.c2
-rw-r--r--drivers/dma/ioat/dma_v3.c6
-rw-r--r--drivers/dma/ioat/hw.h2
3 files changed, 9 insertions, 1 deletions
diff --git a/drivers/dma/ioat/dca.c b/drivers/dma/ioat/dca.c
index 14f0a782df44..abd9038e06b1 100644
--- a/drivers/dma/ioat/dca.c
+++ b/drivers/dma/ioat/dca.c
@@ -103,7 +103,7 @@ static int dca_enabled_in_bios(struct pci_dev *pdev)
103 return res; 103 return res;
104} 104}
105 105
106static int system_has_dca_enabled(struct pci_dev *pdev) 106int system_has_dca_enabled(struct pci_dev *pdev)
107{ 107{
108 if (boot_cpu_has(X86_FEATURE_DCA)) 108 if (boot_cpu_has(X86_FEATURE_DCA))
109 return dca_enabled_in_bios(pdev); 109 return dca_enabled_in_bios(pdev);
diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c
index 35d1e33afd5b..4f305f61f878 100644
--- a/drivers/dma/ioat/dma_v3.c
+++ b/drivers/dma/ioat/dma_v3.c
@@ -1117,6 +1117,7 @@ static int __devinit ioat3_dma_self_test(struct ioatdma_device *device)
1117int __devinit ioat3_dma_probe(struct ioatdma_device *device, int dca) 1117int __devinit ioat3_dma_probe(struct ioatdma_device *device, int dca)
1118{ 1118{
1119 struct pci_dev *pdev = device->pdev; 1119 struct pci_dev *pdev = device->pdev;
1120 int dca_en = system_has_dca_enabled(pdev);
1120 struct dma_device *dma; 1121 struct dma_device *dma;
1121 struct dma_chan *c; 1122 struct dma_chan *c;
1122 struct ioat_chan_common *chan; 1123 struct ioat_chan_common *chan;
@@ -1137,6 +1138,11 @@ int __devinit ioat3_dma_probe(struct ioatdma_device *device, int dca)
1137 dma->device_prep_dma_interrupt = ioat3_prep_interrupt_lock; 1138 dma->device_prep_dma_interrupt = ioat3_prep_interrupt_lock;
1138 1139
1139 cap = readl(device->reg_base + IOAT_DMA_CAP_OFFSET); 1140 cap = readl(device->reg_base + IOAT_DMA_CAP_OFFSET);
1141
1142 /* dca is incompatible with raid operations */
1143 if (dca_en && (cap & (IOAT_CAP_XOR|IOAT_CAP_PQ)))
1144 cap &= ~(IOAT_CAP_XOR|IOAT_CAP_PQ);
1145
1140 if (cap & IOAT_CAP_XOR) { 1146 if (cap & IOAT_CAP_XOR) {
1141 is_raid_device = true; 1147 is_raid_device = true;
1142 dma->max_xor = 8; 1148 dma->max_xor = 8;
diff --git a/drivers/dma/ioat/hw.h b/drivers/dma/ioat/hw.h
index 99afb12bd409..60e675455b6a 100644
--- a/drivers/dma/ioat/hw.h
+++ b/drivers/dma/ioat/hw.h
@@ -39,6 +39,8 @@
39#define IOAT_VER_3_0 0x30 /* Version 3.0 */ 39#define IOAT_VER_3_0 0x30 /* Version 3.0 */
40#define IOAT_VER_3_2 0x32 /* Version 3.2 */ 40#define IOAT_VER_3_2 0x32 /* Version 3.2 */
41 41
42int system_has_dca_enabled(struct pci_dev *pdev);
43
42struct ioat_dma_descriptor { 44struct ioat_dma_descriptor {
43 uint32_t size; 45 uint32_t size;
44 union { 46 union {