infiniband: sg chaining support
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Cette révision appartient à :
@@ -30,6 +30,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <linux/scatterlist.h>
|
||||
#include <rdma/ib_verbs.h>
|
||||
|
||||
#include "ipath_verbs.h"
|
||||
@@ -96,17 +97,18 @@ static void ipath_dma_unmap_page(struct ib_device *dev,
|
||||
BUG_ON(!valid_dma_direction(direction));
|
||||
}
|
||||
|
||||
static int ipath_map_sg(struct ib_device *dev, struct scatterlist *sg, int nents,
|
||||
enum dma_data_direction direction)
|
||||
static int ipath_map_sg(struct ib_device *dev, struct scatterlist *sgl,
|
||||
int nents, enum dma_data_direction direction)
|
||||
{
|
||||
struct scatterlist *sg;
|
||||
u64 addr;
|
||||
int i;
|
||||
int ret = nents;
|
||||
|
||||
BUG_ON(!valid_dma_direction(direction));
|
||||
|
||||
for (i = 0; i < nents; i++) {
|
||||
addr = (u64) page_address(sg[i].page);
|
||||
for_each_sg(sgl, sg, nents, i) {
|
||||
addr = (u64) page_address(sg->page);
|
||||
/* TODO: handle highmem pages */
|
||||
if (!addr) {
|
||||
ret = 0;
|
||||
|
Référencer dans un nouveau ticket
Bloquer un utilisateur