diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-11-20 01:07:10 +0100 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-11-20 01:07:10 +0100 |
commit | 228c4f5cfbf1cda411d9aa7204a612a63c89b1e8 (patch) | |
tree | 0920f900732ce598fef2cdc0c4899860534e837d /drivers/dma/ioat | |
parent | ioat: silence "dca disabled" messages (diff) | |
download | linux-228c4f5cfbf1cda411d9aa7204a612a63c89b1e8.tar.xz linux-228c4f5cfbf1cda411d9aa7204a612a63c89b1e8.zip |
ioat3: dca and raid operations are incompatible
RAID operations cause a system hang on platforms with DCA
(Direct-Cache-Access) enabled. So turn off RAID capabilities in this
case.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/ioat')
-rw-r--r-- | drivers/dma/ioat/dca.c | 2 | ||||
-rw-r--r-- | drivers/dma/ioat/dma_v3.c | 6 | ||||
-rw-r--r-- | drivers/dma/ioat/hw.h | 2 |
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) return res; } -static int system_has_dca_enabled(struct pci_dev *pdev) +int system_has_dca_enabled(struct pci_dev *pdev) { if (boot_cpu_has(X86_FEATURE_DCA)) 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) int __devinit ioat3_dma_probe(struct ioatdma_device *device, int dca) { struct pci_dev *pdev = device->pdev; + int dca_en = system_has_dca_enabled(pdev); struct dma_device *dma; struct dma_chan *c; struct ioat_chan_common *chan; @@ -1137,6 +1138,11 @@ int __devinit ioat3_dma_probe(struct ioatdma_device *device, int dca) dma->device_prep_dma_interrupt = ioat3_prep_interrupt_lock; cap = readl(device->reg_base + IOAT_DMA_CAP_OFFSET); + + /* dca is incompatible with raid operations */ + if (dca_en && (cap & (IOAT_CAP_XOR|IOAT_CAP_PQ))) + cap &= ~(IOAT_CAP_XOR|IOAT_CAP_PQ); + if (cap & IOAT_CAP_XOR) { is_raid_device = true; 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 @@ #define IOAT_VER_3_0 0x30 /* Version 3.0 */ #define IOAT_VER_3_2 0x32 /* Version 3.2 */ +int system_has_dca_enabled(struct pci_dev *pdev); + struct ioat_dma_descriptor { uint32_t size; union { |