ioat: Add alignment workaround for IVB platforms
PATCH 1/1 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 <[email protected]>
---
drivers/dma/ioat/dma_v3.c | 22 +++++++++++++++++++++- drivers/dma/ioat/hw.h | 11 +++++++++++ drivers/dma/ioat/pci.c | 11 ----------- 3 files changed, 32 insertions(+), 12 deletions(-)
drivers/dma/ioat/dma_v3.c +21 -1
@@ -1187,6 +1187,26 @@ static bool is_snb_ioat(struct pci_dev *pdev) } } +static bool is_ivb_ioat (struct pci_dev *pdev) +{ +switch (pdev->device) { +case PCI_DEVICE_ID_INTEL_IOAT_IVB0 : +case PCI_DEVICE_ID_INTEL_IOAT_IVB1 : +case PCI_DEVICE_ID_INTEL_IOAT_IVB2 : +case PCI_DEVICE_ID_INTEL_IOAT_IVB3 : +case PCI_DEVICE_ID_INTEL_IOAT_IVB4 : +case PCI_DEVICE_ID_INTEL_IOAT_IVB5 : +case PCI_DEVICE_ID_INTEL_IOAT_IVB6 : +case PCI_DEVICE_ID_INTEL_IOAT_IVB7 : +case PCI_DEVICE_ID_INTEL_IOAT_IVB8 : +case PCI_DEVICE_ID_INTEL_IOAT_IVB9 : +return true; +default : +return false; + } + +} +int __devinit ioat3_dma_probe (struct ioatdma_device *device,int dca) {struct pci_dev *pdev = device->pdev;
@@ -1207,7 +1227,7 @@ int __devinit ioat3_dma_probe(struct ioatdma_device *device, int dca) dma->device_alloc_chan_resources = ioat2_alloc_chan_resources; dma->device_free_chan_resources = ioat2_free_chan_resources; -if (is_jf_ioat (pdev) ||is_snb_ioat (pdev)) +if (is_jf_ioat (pdev) ||is_snb_ioat (pdev) ||is_ivb_ioat (pdev)) dma->copy_align =6 ;dma_cap_set (DMA_INTERRUPT , dma->cap_mask);
drivers/dma/ioat/hw.h +11 -0
@@ -31,6 +31,17 @@#define IOAT_PCI_DID_SCNB 0x65FF#define IOAT_PCI_DID_SNB 0x402F +#define PCI_DEVICE_ID_INTEL_IOAT_IVB0 0x0e20 +#define PCI_DEVICE_ID_INTEL_IOAT_IVB1 0x0e21 +#define PCI_DEVICE_ID_INTEL_IOAT_IVB2 0x0e22 +#define PCI_DEVICE_ID_INTEL_IOAT_IVB3 0x0e23 +#define PCI_DEVICE_ID_INTEL_IOAT_IVB4 0x0e24 +#define PCI_DEVICE_ID_INTEL_IOAT_IVB5 0x0e25 +#define PCI_DEVICE_ID_INTEL_IOAT_IVB6 0x0e26 +#define PCI_DEVICE_ID_INTEL_IOAT_IVB7 0x0e27 +#define PCI_DEVICE_ID_INTEL_IOAT_IVB8 0x0e2e +#define PCI_DEVICE_ID_INTEL_IOAT_IVB9 0x0e2f +#define IOAT_PCI_RID 0x00#define IOAT_PCI_SVID 0x8086#define IOAT_PCI_SID 0x8086
drivers/dma/ioat/pci.c +0 -11
@@ -40,17 +40,6 @@ MODULE_VERSION(IOAT_DMA_VERSION);MODULE_LICENSE ("Dual BSD/GPL" );MODULE_AUTHOR ("Intel Corporation" ); -#define PCI_DEVICE_ID_INTEL_IOAT_IVB0 0x0e20 -#define PCI_DEVICE_ID_INTEL_IOAT_IVB1 0x0e21 -#define PCI_DEVICE_ID_INTEL_IOAT_IVB2 0x0e22 -#define PCI_DEVICE_ID_INTEL_IOAT_IVB3 0x0e23 -#define PCI_DEVICE_ID_INTEL_IOAT_IVB4 0x0e24 -#define PCI_DEVICE_ID_INTEL_IOAT_IVB5 0x0e25 -#define PCI_DEVICE_ID_INTEL_IOAT_IVB6 0x0e26 -#define PCI_DEVICE_ID_INTEL_IOAT_IVB7 0x0e27 -#define PCI_DEVICE_ID_INTEL_IOAT_IVB8 0x0e2e -#define PCI_DEVICE_ID_INTEL_IOAT_IVB9 0x0e2f -static struct pci_device_id ioat_pci_tbl[] = {/* I/OAT v1 platforms */ {PCI_VDEVICE (INTEL ,PCI_DEVICE_ID_INTEL_IOAT ) },