diff options
author | Bhanu Prakash Gollapudi <bprakash@broadcom.com> | 2011-09-19 16:52:12 -0700 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-09-22 15:16:22 +0400 |
commit | 3ce41ea1478e9dcc3a0e47189c443ba3c7670b70 (patch) | |
tree | 16aa7121090d193d3d564654f164014b1de13276 /drivers/scsi/bnx2fc | |
parent | 513382c9a2bb24c606a9027e83af4bc86dbe688b (diff) | |
download | blackbird-op-linux-3ce41ea1478e9dcc3a0e47189c443ba3c7670b70.tar.gz blackbird-op-linux-3ce41ea1478e9dcc3a0e47189c443ba3c7670b70.zip |
[SCSI] bnx2fc: Replace scsi_dma_map() with dma_map_sg().
scsi_dma_map doesn't work for NPIV since vport dev isn't fully initialized.
For more details: http://marc.info/?l=linux-scsi&m=118312448030633&w=2 and
commit - c59fd9ebc46da8d48b76955d4d48e3597f8c8726.
Signed-off-by: Nithin Sujir <nsujir@broadcom.com>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bnx2fc')
-rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc_io.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c index 120618d95349..86da3014d150 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_io.c +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c @@ -1568,6 +1568,8 @@ static int bnx2fc_split_bd(struct bnx2fc_cmd *io_req, u64 addr, int sg_len, static int bnx2fc_map_sg(struct bnx2fc_cmd *io_req) { + struct bnx2fc_interface *interface = io_req->port->priv; + struct bnx2fc_hba *hba = interface->hba; struct scsi_cmnd *sc = io_req->sc_cmd; struct fcoe_bd_ctx *bd = io_req->bd_tbl->bd_tbl; struct scatterlist *sg; @@ -1579,7 +1581,8 @@ static int bnx2fc_map_sg(struct bnx2fc_cmd *io_req) u64 addr; int i; - sg_count = scsi_dma_map(sc); + sg_count = dma_map_sg(&hba->pcidev->dev, scsi_sglist(sc), + scsi_sg_count(sc), sc->sc_data_direction); scsi_for_each_sg(sc, sg, sg_count, i) { sg_len = sg_dma_len(sg); addr = sg_dma_address(sg); |