IB/iser: fix a check of SG alignment for RDMA
authorErez Zilber <erezz@voltaire.com>
Mon, 11 Sep 2006 09:19:17 +0000 (12:19 +0300)
committerRoland Dreier <rolandd@cisco.com>
Fri, 22 Sep 2006 22:22:49 +0000 (15:22 -0700)
commit777a71dd4d901f055967ddbd038d2a74ffce0eb8
tree88c05b9d52619a4881c12c752b55ed124f782fc0
parent61a73c708f37295892176bc911b178278df6a091
IB/iser: fix a check of SG alignment for RDMA

dma mapping may include a "compaction" of the sg associated with scsi command.
Hence, the size of the maximal prefix of the SG which is aligned for rdma must be
compared against the length of the dma mapped sg (mem->dma_nents) and not against
the size of it before it was mapped (mem->size).

Signed-off-by: Erez Zilber <erezz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/ulp/iser/iser_memory.c