diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-11-19 19:07:10 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-11-19 19:07:10 -0500 |
commit | 228c4f5cfbf1cda411d9aa7204a612a63c89b1e8 (patch) | |
tree | 0920f900732ce598fef2cdc0c4899860534e837d /drivers/dma | |
parent | e22dde9904c2d26a522f1a2b89854a8238bf0933 (diff) |
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')
-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) | |||
103 | return res; | 103 | return res; |
104 | } | 104 | } |
105 | 105 | ||
106 | static int system_has_dca_enabled(struct pci_dev *pdev) | 106 | int 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) | |||
1117 | int __devinit ioat3_dma_probe(struct ioatdma_device *device, int dca) | 1117 | int __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 | ||
42 | int system_has_dca_enabled(struct pci_dev *pdev); | ||
43 | |||
42 | struct ioat_dma_descriptor { | 44 | struct ioat_dma_descriptor { |
43 | uint32_t size; | 45 | uint32_t size; |
44 | union { | 46 | union { |