]> err.no Git - linux-2.6/commit
IB/srp: Use a fake scatterlist for non-SG SCSI commands
authorRoland Dreier <rolandd@cisco.com>
Fri, 24 Mar 2006 23:47:26 +0000 (15:47 -0800)
committerRoland Dreier <rolandd@cisco.com>
Fri, 24 Mar 2006 23:47:26 +0000 (15:47 -0800)
commitcf368713a3f3b2eb737a92d1b7186dedcc51167c
tree450791a25611cf98bde1540a3c366d0e2a6ba117
parent6f633c8d69415aabbccfcc494008e8e1300a98c1
IB/srp: Use a fake scatterlist for non-SG SCSI commands

Since the SCSI midlayer is moving towards entirely getting rid of
commands with use_sg == 0, we should treat this case as an exception.
Therefore, change the IB SRP initiator to create a fake scatterlist
for these commands with sg_init_one().  This simplifies the flow of
DMA mapping and unmapping, since SRP can just use dma_map_sg() and
dma_unmap_sg() unconditionally, rather than having to choose between
the dma_{map,unmap}_sg() and dma_{map,unmap}_single() variants.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/ulp/srp/ib_srp.c
drivers/infiniband/ulp/srp/ib_srp.h