diff options
author | Or Gerlitz <ogerlitz@mellanox.com> | 2013-02-21 18:50:10 +0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2013-02-22 12:22:30 +0400 |
commit | 5525d210fd55952262f30ba45b2acceb4a6a50e9 (patch) | |
tree | 858e10e755213533151c142e919d25a4aac3f0b5 /drivers/infiniband/ulp/iser/iser_memory.c | |
parent | 819a087316a63ef7d60e7b816d18c4e29a05861a (diff) | |
download | linux-5525d210fd55952262f30ba45b2acceb4a6a50e9.tar.xz |
IB/iser: Enable iser when FMRs are not supported
Reuse the "SG unaligned for FMR" driver flow to make the initiator
functional when running over driver instance which doesn't support
FMRs, such as a mlx4 virtual function.
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Alex Tabachnik <alext@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/ulp/iser/iser_memory.c')
-rw-r--r-- | drivers/infiniband/ulp/iser/iser_memory.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/infiniband/ulp/iser/iser_memory.c b/drivers/infiniband/ulp/iser/iser_memory.c index 79c4f35ba0c9..be1edb04b085 100644 --- a/drivers/infiniband/ulp/iser/iser_memory.c +++ b/drivers/infiniband/ulp/iser/iser_memory.c @@ -369,10 +369,11 @@ int iser_reg_rdma_mem(struct iscsi_iser_task *iser_task, regd_buf = &iser_task->rdma_regd[cmd_dir]; aligned_len = iser_data_buf_aligned_len(mem, ibdev); - if (aligned_len != mem->dma_nents) { + if (aligned_len != mem->dma_nents || + (!ib_conn->fmr_pool && mem->dma_nents > 1)) { iscsi_conn->fmr_unalign_cnt++; - iser_warn("rdma alignment violation %d/%d aligned\n", - aligned_len, mem->size); + iser_warn("rdma alignment violation (%d/%d aligned) or FMR not supported\n", + aligned_len, mem->size); iser_data_buf_dump(mem, ibdev); /* unmap the command data before accessing it */ |