Commit d302398d authored by Dave Jiang's avatar Dave Jiang Committed by Vinod Koul

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: default avatarDave Jiang <dave.jiang@intel.com>
Acked-by: default avatarDan Williams <djbw@fb.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 7727eaa4
...@@ -238,6 +238,18 @@ static bool is_bwd_ioat(struct pci_dev *pdev) ...@@ -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], static void pq16_set_src(struct ioat_raw_descriptor *desc[3],
dma_addr_t addr, u32 offset, u8 coef, int idx) dma_addr_t addr, u32 offset, u8 coef, int idx)
{ {
...@@ -1808,6 +1820,9 @@ int ioat3_dma_probe(struct ioatdma_device *device, int dca) ...@@ -1808,6 +1820,9 @@ int ioat3_dma_probe(struct ioatdma_device *device, int dca)
cap = readl(device->reg_base + IOAT_DMA_CAP_OFFSET); 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 */ /* dca is incompatible with raid operations */
if (dca_en && (cap & (IOAT_CAP_XOR|IOAT_CAP_PQ))) if (dca_en && (cap & (IOAT_CAP_XOR|IOAT_CAP_PQ)))
cap &= ~(IOAT_CAP_XOR|IOAT_CAP_PQ); cap &= ~(IOAT_CAP_XOR|IOAT_CAP_PQ);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment