mlx5: Fix mlx5_ib_map_mr_sg mr length
authorSagi Grimberg <sagi@grimberg.me>
Sun, 23 Apr 2017 11:31:42 +0000 (14:31 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 May 2017 13:44:32 +0000 (15:44 +0200)
commitcb5cf8aaba2ede15fd13b52029bf4e5915e6096f
tree8d8a2d35721e19eba47f4dff4e1bcd971e5b5e60
parentece453e8b0ca45e1b36317042c8aa7f3ef59e440
mlx5: Fix mlx5_ib_map_mr_sg mr length

commit 0a49f2c31c3efbeb0de3e4b5598764887f629be2 upstream.

In case we got an initial sg_offset, we need to
account for it in the mr length.

Fixes: ff2ba9936591 ("IB/core: Add passing an offset into the SG to ib_map_mr_sg")
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Tested-by: Israel Rukshin <israelr@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/mlx5/mr.c