[PATCH v2 3/5] ioatdma: S1200 platforms ioatdma channel 2 and 3falsely advertise RAID cap

From: Dave Jiang
Date: Wed Apr 10 2013 - 19:44:39 EST


This workaround checks for channel 2&3 and remove RAID cap.

Signed-off-by: Dave Jiang <dave.jiang@xxxxxxxxx>
Acked-by: Dan Williams <djbw@xxxxxx>
---
drivers/dma/ioat/dma_v3.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)

diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c
index 02afdb5..343320c 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)
}
}

+static bool is_bwd_noraid(struct pci_dev *pdev)
+{
+ switch (pdev->device) {
+ case PCI_DEVICE_ID_INTEL_IOAT_BWD2:
+ case PCI_DEVICE_ID_INTEL_IOAT_BWD3:
+ return true;
+ default:
+ return false;
+ }
+
+}
+
static void pq16_set_src(struct ioat_raw_descriptor *desc[3],
dma_addr_t addr, u32 offset, u8 coef, int idx)
{
@@ -1813,6 +1825,9 @@ int ioat3_dma_probe(struct ioatdma_device *device, int dca)

cap = readl(device->reg_base + IOAT_DMA_CAP_OFFSET);

+ if (is_bwd_noraid(pdev))
+ cap &= ~(IOAT_CAP_XOR | IOAT_CAP_PQ | IOAT_CAP_RAID16SS);
+
/* dca is incompatible with raid operations */
if (dca_en && (cap & (IOAT_CAP_XOR|IOAT_CAP_PQ)))
cap &= ~(IOAT_CAP_XOR|IOAT_CAP_PQ);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/