aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/ioat
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2012-12-03 18:08:37 -0500
committerVinod Koul <vinod.koul@intel.com>2013-01-08 01:05:13 -0500
commit1a363068dcc2269931daef360ed14d2a262f19f7 (patch)
tree63893a7519328cd7312ba8d14251f5a9e3ceb605 /drivers/dma/ioat
parent7d283397ade3c9e51de644676a6593e1f724ac00 (diff)
ioat: Add alignment workaround for IVB platforms
The PCI IDs for IvyBridge IOAT DMA needs to go into a header file since dma_v3.c looks them up for certain hardware workarounds. Need to add to the alignment workaround for IOAT 3.2 since it wasn't fixed in IVB. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <djbw@fb.com>
Diffstat (limited to 'drivers/dma/ioat')
-rw-r--r--drivers/dma/ioat/dma_v3.c22
-rw-r--r--drivers/dma/ioat/hw.h11
-rw-r--r--drivers/dma/ioat/pci.c11
3 files changed, 32 insertions, 12 deletions
diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c
index 6456f7d38e13..9d6f3bbf0e53 100644
--- a/drivers/dma/ioat/dma_v3.c
+++ b/drivers/dma/ioat/dma_v3.c
@@ -1229,6 +1229,26 @@ static bool is_snb_ioat(struct pci_dev *pdev)
1229 } 1229 }
1230} 1230}
1231 1231
1232static bool is_ivb_ioat(struct pci_dev *pdev)
1233{
1234 switch (pdev->device) {
1235 case PCI_DEVICE_ID_INTEL_IOAT_IVB0:
1236 case PCI_DEVICE_ID_INTEL_IOAT_IVB1:
1237 case PCI_DEVICE_ID_INTEL_IOAT_IVB2:
1238 case PCI_DEVICE_ID_INTEL_IOAT_IVB3:
1239 case PCI_DEVICE_ID_INTEL_IOAT_IVB4:
1240 case PCI_DEVICE_ID_INTEL_IOAT_IVB5:
1241 case PCI_DEVICE_ID_INTEL_IOAT_IVB6:
1242 case PCI_DEVICE_ID_INTEL_IOAT_IVB7:
1243 case PCI_DEVICE_ID_INTEL_IOAT_IVB8:
1244 case PCI_DEVICE_ID_INTEL_IOAT_IVB9:
1245 return true;
1246 default:
1247 return false;
1248 }
1249
1250}
1251
1232int __devinit ioat3_dma_probe(struct ioatdma_device *device, int dca) 1252int __devinit ioat3_dma_probe(struct ioatdma_device *device, int dca)
1233{ 1253{
1234 struct pci_dev *pdev = device->pdev; 1254 struct pci_dev *pdev = device->pdev;
@@ -1249,7 +1269,7 @@ int __devinit ioat3_dma_probe(struct ioatdma_device *device, int dca)
1249 dma->device_alloc_chan_resources = ioat2_alloc_chan_resources; 1269 dma->device_alloc_chan_resources = ioat2_alloc_chan_resources;
1250 dma->device_free_chan_resources = ioat2_free_chan_resources; 1270 dma->device_free_chan_resources = ioat2_free_chan_resources;
1251 1271
1252 if (is_jf_ioat(pdev) || is_snb_ioat(pdev)) 1272 if (is_jf_ioat(pdev) || is_snb_ioat(pdev) || is_ivb_ioat(pdev))
1253 dma->copy_align = 6; 1273 dma->copy_align = 6;
1254 1274
1255 dma_cap_set(DMA_INTERRUPT, dma->cap_mask); 1275 dma_cap_set(DMA_INTERRUPT, dma->cap_mask);
diff --git a/drivers/dma/ioat/hw.h b/drivers/dma/ioat/hw.h
index d2ff3fda0b18..7cb74c62c719 100644
--- a/drivers/dma/ioat/hw.h
+++ b/drivers/dma/ioat/hw.h
@@ -35,6 +35,17 @@
35#define IOAT_VER_3_0 0x30 /* Version 3.0 */ 35#define IOAT_VER_3_0 0x30 /* Version 3.0 */
36#define IOAT_VER_3_2 0x32 /* Version 3.2 */ 36#define IOAT_VER_3_2 0x32 /* Version 3.2 */
37 37
38#define PCI_DEVICE_ID_INTEL_IOAT_IVB0 0x0e20
39#define PCI_DEVICE_ID_INTEL_IOAT_IVB1 0x0e21
40#define PCI_DEVICE_ID_INTEL_IOAT_IVB2 0x0e22
41#define PCI_DEVICE_ID_INTEL_IOAT_IVB3 0x0e23
42#define PCI_DEVICE_ID_INTEL_IOAT_IVB4 0x0e24
43#define PCI_DEVICE_ID_INTEL_IOAT_IVB5 0x0e25
44#define PCI_DEVICE_ID_INTEL_IOAT_IVB6 0x0e26
45#define PCI_DEVICE_ID_INTEL_IOAT_IVB7 0x0e27
46#define PCI_DEVICE_ID_INTEL_IOAT_IVB8 0x0e2e
47#define PCI_DEVICE_ID_INTEL_IOAT_IVB9 0x0e2f
48
38int system_has_dca_enabled(struct pci_dev *pdev); 49int system_has_dca_enabled(struct pci_dev *pdev);
39 50
40struct ioat_dma_descriptor { 51struct ioat_dma_descriptor {
diff --git a/drivers/dma/ioat/pci.c b/drivers/dma/ioat/pci.c
index bfa9a3536e09..f4e6163a1e73 100644
--- a/drivers/dma/ioat/pci.c
+++ b/drivers/dma/ioat/pci.c
@@ -40,17 +40,6 @@ MODULE_VERSION(IOAT_DMA_VERSION);
40MODULE_LICENSE("Dual BSD/GPL"); 40MODULE_LICENSE("Dual BSD/GPL");
41MODULE_AUTHOR("Intel Corporation"); 41MODULE_AUTHOR("Intel Corporation");
42 42
43#define PCI_DEVICE_ID_INTEL_IOAT_IVB0 0x0e20
44#define PCI_DEVICE_ID_INTEL_IOAT_IVB1 0x0e21
45#define PCI_DEVICE_ID_INTEL_IOAT_IVB2 0x0e22
46#define PCI_DEVICE_ID_INTEL_IOAT_IVB3 0x0e23
47#define PCI_DEVICE_ID_INTEL_IOAT_IVB4 0x0e24
48#define PCI_DEVICE_ID_INTEL_IOAT_IVB5 0x0e25
49#define PCI_DEVICE_ID_INTEL_IOAT_IVB6 0x0e26
50#define PCI_DEVICE_ID_INTEL_IOAT_IVB7 0x0e27
51#define PCI_DEVICE_ID_INTEL_IOAT_IVB8 0x0e2e
52#define PCI_DEVICE_ID_INTEL_IOAT_IVB9 0x0e2f
53
54static struct pci_device_id ioat_pci_tbl[] = { 43static struct pci_device_id ioat_pci_tbl[] = {
55 /* I/OAT v1 platforms */ 44 /* I/OAT v1 platforms */
56 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT) }, 45 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT) },