aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2013-04-10 19:44:32 -0400
committerVinod Koul <vinod.koul@intel.com>2013-04-15 13:16:15 -0400
commitd302398da99956a329c467f195b50d5aaf38fb75 (patch)
tree325c58f7731b580dead0ef3dc1f862be9b363a58 /drivers/dma
parent7727eaa4490b7244934fe31f05e7329f30715267 (diff)
ioatdma: S1200 platforms ioatdma channel 2 and 3 falsely advertise RAID cap
This workaround checks for channel 2&3 and remove RAID cap. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Acked-by: Dan Williams <djbw@fb.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/ioat/dma_v3.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c
index 71e113dfc8cc..b00b000f238b 100644
--- a/drivers/dma/ioat/dma_v3.c
+++ b/drivers/dma/ioat/dma_v3.c
@@ -238,6 +238,18 @@ static bool is_bwd_ioat(struct pci_dev *pdev)
238 } 238 }
239} 239}
240 240
241static bool is_bwd_noraid(struct pci_dev *pdev)
242{
243 switch (pdev->device) {
244 case PCI_DEVICE_ID_INTEL_IOAT_BWD2:
245 case PCI_DEVICE_ID_INTEL_IOAT_BWD3:
246 return true;
247 default:
248 return false;
249 }
250
251}
252
241static void pq16_set_src(struct ioat_raw_descriptor *desc[3], 253static void pq16_set_src(struct ioat_raw_descriptor *desc[3],
242 dma_addr_t addr, u32 offset, u8 coef, int idx) 254 dma_addr_t addr, u32 offset, u8 coef, int idx)
243{ 255{
@@ -1808,6 +1820,9 @@ int ioat3_dma_probe(struct ioatdma_device *device, int dca)
1808 1820
1809 cap = readl(device->reg_base + IOAT_DMA_CAP_OFFSET); 1821 cap = readl(device->reg_base + IOAT_DMA_CAP_OFFSET);
1810 1822
1823 if (is_bwd_noraid(pdev))
1824 cap &= ~(IOAT_CAP_XOR | IOAT_CAP_PQ | IOAT_CAP_RAID16SS);
1825
1811 /* dca is incompatible with raid operations */ 1826 /* dca is incompatible with raid operations */
1812 if (dca_en && (cap & (IOAT_CAP_XOR|IOAT_CAP_PQ))) 1827 if (dca_en && (cap & (IOAT_CAP_XOR|IOAT_CAP_PQ)))
1813 cap &= ~(IOAT_CAP_XOR|IOAT_CAP_PQ); 1828 cap &= ~(IOAT_CAP_XOR|IOAT_CAP_PQ);