diff options
author | Jing Huang <huangj@brocade.com> | 2010-03-19 21:07:36 +0300 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-04-11 18:24:23 +0400 |
commit | 077424e2e2c97c830d903891dfcd1532068b85b7 (patch) | |
tree | d3e37bbbcc8d5f0d45dc39b95db05b6ddcd1a5a9 /drivers/scsi/bfa/bfa_ioim.c | |
parent | 42b426ecb453cf49c3d16cf1d7a5e5d8cab9869d (diff) | |
download | linux-077424e2e2c97c830d903891dfcd1532068b85b7.tar.xz |
[SCSI] bfa: sg addr big endian fix
sg address in IO request is not set up correctly for big endian platform.
add new macros to properly swap the address.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/bfa_ioim.c')
-rw-r--r-- | drivers/scsi/bfa/bfa_ioim.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/bfa/bfa_ioim.c b/drivers/scsi/bfa/bfa_ioim.c index 8a1be201d29b..687f3d6e252b 100644 --- a/drivers/scsi/bfa/bfa_ioim.c +++ b/drivers/scsi/bfa/bfa_ioim.c @@ -758,7 +758,7 @@ bfa_ioim_send_ioreq(struct bfa_ioim_s *ioim) sge = &m->sges[0]; if (ioim->nsges) { sg = (struct scatterlist *)scsi_sglist(cmnd); - addr = (u64) sg_dma_address(sg); + addr = bfa_os_sgaddr(sg_dma_address(sg)); sge->sga = *(union bfi_addr_u *) &addr; pgdlen = sg_dma_len(sg); sge->sg_len = pgdlen; @@ -891,7 +891,7 @@ bfa_ioim_sgpg_setup(struct bfa_ioim_s *ioim) pgcumsz = 0; for (i = 0; i < nsges; i++, sge++, sgeid++, sg = sg_next(sg)) { - addr = (u64) sg_dma_address(sg); + addr = bfa_os_sgaddr(sg_dma_address(sg)); sge->sga = *(union bfi_addr_u *) &addr; sge->sg_len = sg_dma_len(sg); pgcumsz += sge->sg_len; |