summaryrefslogtreecommitdiffstats
path: root/drivers/dma/ioat/dma.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-09-09 02:42:58 +0200
committerDan Williams <dan.j.williams@intel.com>2009-09-09 02:42:58 +0200
commit9de6fc717bdc574cf5faf9d46ce0f9d6265c7952 (patch)
tree55cb18ecfae85033d61f730b5f32d2ac1fb572bc /drivers/dma/ioat/dma.c
parentioat3: xor support (diff)
downloadlinux-9de6fc717bdc574cf5faf9d46ce0f9d6265c7952.tar.xz
linux-9de6fc717bdc574cf5faf9d46ce0f9d6265c7952.zip
ioat3: xor self test
This adds a hardware specific self test to be called from ioat_probe. In the ioat3 case we will have tests for all the different raid operations, while ioat1 and ioat2 will continue to just test memcpy. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/ioat/dma.c')
-rw-r--r--drivers/dma/ioat/dma.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c
index cb08f8108496..32a757be75c1 100644
--- a/drivers/dma/ioat/dma.c
+++ b/drivers/dma/ioat/dma.c
@@ -799,7 +799,7 @@ static void __devinit ioat_dma_test_callback(void *dma_async_param)
* ioat_dma_self_test - Perform a IOAT transaction to verify the HW works.
* @device: device to be tested
*/
-static int __devinit ioat_dma_self_test(struct ioatdma_device *device)
+int __devinit ioat_dma_self_test(struct ioatdma_device *device)
{
int i;
u8 *src;
@@ -1039,7 +1039,7 @@ int __devinit ioat_probe(struct ioatdma_device *device)
if (err)
goto err_setup_interrupts;
- err = ioat_dma_self_test(device);
+ err = device->self_test(device);
if (err)
goto err_self_test;
@@ -1197,6 +1197,7 @@ int __devinit ioat1_dma_probe(struct ioatdma_device *device, int dca)
device->intr_quirk = ioat1_intr_quirk;
device->enumerate_channels = ioat1_enumerate_channels;
+ device->self_test = ioat_dma_self_test;
dma = &device->common;
dma->device_prep_dma_memcpy = ioat1_dma_prep_memcpy;
dma->device_issue_pending = ioat1_dma_memcpy_issue_pending;