aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/ioat
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2013-03-25 17:37:31 -0400
committerVinod Koul <vinod.koul@intel.com>2013-04-15 00:21:19 -0400
commit570727b5520878d1263e33f118463d77d7fd92d1 (patch)
treeb0ddc90665c2e60a8dec07bbc05eb2d58a4c9c7d /drivers/dma/ioat
parent8d30662aac256eb61bc2f1d9cf1191825ef96328 (diff)
ioatdma: Adding Haswell devid for ioatdma
Adding Haswell PCI device IDs for ioatdma and simplify the detection of certain Xeon CPUs that has alignment bugs so that modifications can be changed at a single place going forward. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Acked-by: Dan Williams <djbw@fb.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/ioat')
-rw-r--r--drivers/dma/ioat/dma_v3.c28
-rw-r--r--drivers/dma/ioat/hw.h22
-rw-r--r--drivers/dma/ioat/pci.c11
3 files changed, 55 insertions, 6 deletions
diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c
index a1dcfb2670f7..ab5655eb0602 100644
--- a/drivers/dma/ioat/dma_v3.c
+++ b/drivers/dma/ioat/dma_v3.c
@@ -1260,6 +1260,32 @@ static bool is_ivb_ioat(struct pci_dev *pdev)
1260 1260
1261} 1261}
1262 1262
1263static bool is_hsw_ioat(struct pci_dev *pdev)
1264{
1265 switch (pdev->device) {
1266 case PCI_DEVICE_ID_INTEL_IOAT_HSW0:
1267 case PCI_DEVICE_ID_INTEL_IOAT_HSW1:
1268 case PCI_DEVICE_ID_INTEL_IOAT_HSW2:
1269 case PCI_DEVICE_ID_INTEL_IOAT_HSW3:
1270 case PCI_DEVICE_ID_INTEL_IOAT_HSW4:
1271 case PCI_DEVICE_ID_INTEL_IOAT_HSW5:
1272 case PCI_DEVICE_ID_INTEL_IOAT_HSW6:
1273 case PCI_DEVICE_ID_INTEL_IOAT_HSW7:
1274 case PCI_DEVICE_ID_INTEL_IOAT_HSW8:
1275 case PCI_DEVICE_ID_INTEL_IOAT_HSW9:
1276 return true;
1277 default:
1278 return false;
1279 }
1280
1281}
1282
1283static bool is_xeon_cb32(struct pci_dev *pdev)
1284{
1285 return is_jf_ioat(pdev) || is_snb_ioat(pdev) || is_ivb_ioat(pdev) ||
1286 is_hsw_ioat(pdev);
1287}
1288
1263int ioat3_dma_probe(struct ioatdma_device *device, int dca) 1289int ioat3_dma_probe(struct ioatdma_device *device, int dca)
1264{ 1290{
1265 struct pci_dev *pdev = device->pdev; 1291 struct pci_dev *pdev = device->pdev;
@@ -1280,7 +1306,7 @@ int ioat3_dma_probe(struct ioatdma_device *device, int dca)
1280 dma->device_alloc_chan_resources = ioat2_alloc_chan_resources; 1306 dma->device_alloc_chan_resources = ioat2_alloc_chan_resources;
1281 dma->device_free_chan_resources = ioat2_free_chan_resources; 1307 dma->device_free_chan_resources = ioat2_free_chan_resources;
1282 1308
1283 if (is_jf_ioat(pdev) || is_snb_ioat(pdev) || is_ivb_ioat(pdev)) 1309 if (is_xeon_cb32(pdev))
1284 dma->copy_align = 6; 1310 dma->copy_align = 6;
1285 1311
1286 dma_cap_set(DMA_INTERRUPT, dma->cap_mask); 1312 dma_cap_set(DMA_INTERRUPT, dma->cap_mask);
diff --git a/drivers/dma/ioat/hw.h b/drivers/dma/ioat/hw.h
index 7cb74c62c719..8cfa07789888 100644
--- a/drivers/dma/ioat/hw.h
+++ b/drivers/dma/ioat/hw.h
@@ -30,11 +30,6 @@
30#define IOAT_PCI_DID_SCNB 0x65FF 30#define IOAT_PCI_DID_SCNB 0x65FF
31#define IOAT_PCI_DID_SNB 0x402F 31#define IOAT_PCI_DID_SNB 0x402F
32 32
33#define IOAT_VER_1_2 0x12 /* Version 1.2 */
34#define IOAT_VER_2_0 0x20 /* Version 2.0 */
35#define IOAT_VER_3_0 0x30 /* Version 3.0 */
36#define IOAT_VER_3_2 0x32 /* Version 3.2 */
37
38#define PCI_DEVICE_ID_INTEL_IOAT_IVB0 0x0e20 33#define PCI_DEVICE_ID_INTEL_IOAT_IVB0 0x0e20
39#define PCI_DEVICE_ID_INTEL_IOAT_IVB1 0x0e21 34#define PCI_DEVICE_ID_INTEL_IOAT_IVB1 0x0e21
40#define PCI_DEVICE_ID_INTEL_IOAT_IVB2 0x0e22 35#define PCI_DEVICE_ID_INTEL_IOAT_IVB2 0x0e22
@@ -46,6 +41,23 @@
46#define PCI_DEVICE_ID_INTEL_IOAT_IVB8 0x0e2e 41#define PCI_DEVICE_ID_INTEL_IOAT_IVB8 0x0e2e
47#define PCI_DEVICE_ID_INTEL_IOAT_IVB9 0x0e2f 42#define PCI_DEVICE_ID_INTEL_IOAT_IVB9 0x0e2f
48 43
44#define PCI_DEVICE_ID_INTEL_IOAT_HSW0 0x2f20
45#define PCI_DEVICE_ID_INTEL_IOAT_HSW1 0x2f21
46#define PCI_DEVICE_ID_INTEL_IOAT_HSW2 0x2f22
47#define PCI_DEVICE_ID_INTEL_IOAT_HSW3 0x2f23
48#define PCI_DEVICE_ID_INTEL_IOAT_HSW4 0x2f24
49#define PCI_DEVICE_ID_INTEL_IOAT_HSW5 0x2f25
50#define PCI_DEVICE_ID_INTEL_IOAT_HSW6 0x2f26
51#define PCI_DEVICE_ID_INTEL_IOAT_HSW7 0x2f27
52#define PCI_DEVICE_ID_INTEL_IOAT_HSW8 0x2f2e
53#define PCI_DEVICE_ID_INTEL_IOAT_HSW9 0x2f2f
54
55#define IOAT_VER_1_2 0x12 /* Version 1.2 */
56#define IOAT_VER_2_0 0x20 /* Version 2.0 */
57#define IOAT_VER_3_0 0x30 /* Version 3.0 */
58#define IOAT_VER_3_2 0x32 /* Version 3.2 */
59
60
49int system_has_dca_enabled(struct pci_dev *pdev); 61int system_has_dca_enabled(struct pci_dev *pdev);
50 62
51struct ioat_dma_descriptor { 63struct ioat_dma_descriptor {
diff --git a/drivers/dma/ioat/pci.c b/drivers/dma/ioat/pci.c
index 71c7ecd80fac..67c8e83bd90b 100644
--- a/drivers/dma/ioat/pci.c
+++ b/drivers/dma/ioat/pci.c
@@ -94,6 +94,17 @@ static struct pci_device_id ioat_pci_tbl[] = {
94 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_IVB8) }, 94 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_IVB8) },
95 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_IVB9) }, 95 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_IVB9) },
96 96
97 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_HSW0) },
98 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_HSW1) },
99 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_HSW2) },
100 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_HSW3) },
101 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_HSW4) },
102 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_HSW5) },
103 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_HSW6) },
104 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_HSW7) },
105 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_HSW8) },
106 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_HSW9) },
107
97 { 0, } 108 { 0, }
98}; 109};
99MODULE_DEVICE_TABLE(pci, ioat_pci_tbl); 110MODULE_DEVICE_TABLE(pci, ioat_pci_tbl);