|
@@ -32,7 +32,6 @@
|
|
#include <linux/aer.h>
|
|
#include <linux/aer.h>
|
|
#include <linux/wait.h>
|
|
#include <linux/wait.h>
|
|
#include <linux/stringify.h>
|
|
#include <linux/stringify.h>
|
|
-#include <linux/slab_def.h>
|
|
|
|
#include <scsi/scsi.h>
|
|
#include <scsi/scsi.h>
|
|
#include <scsi/sg.h>
|
|
#include <scsi/sg.h>
|
|
#include <linux/io.h>
|
|
#include <linux/io.h>
|
|
@@ -2603,7 +2602,8 @@ static void *skd_alloc_dma(struct skd_device *skdev, struct kmem_cache *s,
|
|
buf = kmem_cache_alloc(s, gfp);
|
|
buf = kmem_cache_alloc(s, gfp);
|
|
if (!buf)
|
|
if (!buf)
|
|
return NULL;
|
|
return NULL;
|
|
- *dma_handle = dma_map_single(dev, buf, s->size, dir);
|
|
|
|
|
|
+ *dma_handle = dma_map_single(dev, buf,
|
|
|
|
+ kmem_cache_size(s), dir);
|
|
if (dma_mapping_error(dev, *dma_handle)) {
|
|
if (dma_mapping_error(dev, *dma_handle)) {
|
|
kmem_cache_free(s, buf);
|
|
kmem_cache_free(s, buf);
|
|
buf = NULL;
|
|
buf = NULL;
|
|
@@ -2618,7 +2618,8 @@ static void skd_free_dma(struct skd_device *skdev, struct kmem_cache *s,
|
|
if (!vaddr)
|
|
if (!vaddr)
|
|
return;
|
|
return;
|
|
|
|
|
|
- dma_unmap_single(&skdev->pdev->dev, dma_handle, s->size, dir);
|
|
|
|
|
|
+ dma_unmap_single(&skdev->pdev->dev, dma_handle,
|
|
|
|
+ kmem_cache_size(s), dir);
|
|
kmem_cache_free(s, vaddr);
|
|
kmem_cache_free(s, vaddr);
|
|
}
|
|
}
|
|
|
|
|