aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2012-04-04 19:10:41 -0400
committerDan Williams <dan.j.williams@intel.com>2012-04-05 18:24:35 -0400
commitf26df1a1a9452573af7b6cea9a4723593e838568 (patch)
tree5f45acfa1010edb9a1a481a9ad40e82322a75837 /drivers/dma
parent21b764e075e74f8af90da9f623aa3e2167484687 (diff)
ioatdma: DMA copy alignment needed to address IOAT DMA silicon errata
Silicon errata where when RAID and legacy descriptors are mixed, the legacy (memcpy and friends) operation must have alignment of 64 bytes to avoid hanging. This effects Intel Xeon C55xx, C35xx, E5-2600. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/ioat/dma_v3.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c
index 2dbf32b02735..dfe925fa57ab 100644
--- a/drivers/dma/ioat/dma_v3.c
+++ b/drivers/dma/ioat/dma_v3.c
@@ -1147,6 +1147,44 @@ static int ioat3_reset_hw(struct ioat_chan_common *chan)
1147 return ioat2_reset_sync(chan, msecs_to_jiffies(200)); 1147 return ioat2_reset_sync(chan, msecs_to_jiffies(200));
1148} 1148}
1149 1149
1150static bool is_jf_ioat(struct pci_dev *pdev)
1151{
1152 switch (pdev->device) {
1153 case PCI_DEVICE_ID_INTEL_IOAT_JSF0:
1154 case PCI_DEVICE_ID_INTEL_IOAT_JSF1:
1155 case PCI_DEVICE_ID_INTEL_IOAT_JSF2:
1156 case PCI_DEVICE_ID_INTEL_IOAT_JSF3:
1157 case PCI_DEVICE_ID_INTEL_IOAT_JSF4:
1158 case PCI_DEVICE_ID_INTEL_IOAT_JSF5:
1159 case PCI_DEVICE_ID_INTEL_IOAT_JSF6:
1160 case PCI_DEVICE_ID_INTEL_IOAT_JSF7:
1161 case PCI_DEVICE_ID_INTEL_IOAT_JSF8:
1162 case PCI_DEVICE_ID_INTEL_IOAT_JSF9:
1163 return true;
1164 default:
1165 return false;
1166 }
1167}
1168
1169static bool is_snb_ioat(struct pci_dev *pdev)
1170{
1171 switch (pdev->device) {
1172 case PCI_DEVICE_ID_INTEL_IOAT_SNB0:
1173 case PCI_DEVICE_ID_INTEL_IOAT_SNB1:
1174 case PCI_DEVICE_ID_INTEL_IOAT_SNB2:
1175 case PCI_DEVICE_ID_INTEL_IOAT_SNB3:
1176 case PCI_DEVICE_ID_INTEL_IOAT_SNB4:
1177 case PCI_DEVICE_ID_INTEL_IOAT_SNB5:
1178 case PCI_DEVICE_ID_INTEL_IOAT_SNB6:
1179 case PCI_DEVICE_ID_INTEL_IOAT_SNB7:
1180 case PCI_DEVICE_ID_INTEL_IOAT_SNB8:
1181 case PCI_DEVICE_ID_INTEL_IOAT_SNB9:
1182 return true;
1183 default:
1184 return false;
1185 }
1186}
1187
1150int __devinit ioat3_dma_probe(struct ioatdma_device *device, int dca) 1188int __devinit ioat3_dma_probe(struct ioatdma_device *device, int dca)
1151{ 1189{
1152 struct pci_dev *pdev = device->pdev; 1190 struct pci_dev *pdev = device->pdev;
@@ -1167,6 +1205,9 @@ int __devinit ioat3_dma_probe(struct ioatdma_device *device, int dca)
1167 dma->device_alloc_chan_resources = ioat2_alloc_chan_resources; 1205 dma->device_alloc_chan_resources = ioat2_alloc_chan_resources;
1168 dma->device_free_chan_resources = ioat2_free_chan_resources; 1206 dma->device_free_chan_resources = ioat2_free_chan_resources;
1169 1207
1208 if (is_jf_ioat(pdev) || is_snb_ioat(pdev))
1209 dma->copy_align = 6;
1210
1170 dma_cap_set(DMA_INTERRUPT, dma->cap_mask); 1211 dma_cap_set(DMA_INTERRUPT, dma->cap_mask);
1171 dma->device_prep_dma_interrupt = ioat3_prep_interrupt_lock; 1212 dma->device_prep_dma_interrupt = ioat3_prep_interrupt_lock;
1172 1213