diff options
author | Jing Huang <huangj@brocade.com> | 2010-10-18 20:10:50 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-10-25 17:17:14 -0400 |
commit | ba816ea8e2eacbf3d198ad1859f413c2d6213434 (patch) | |
tree | 92399b02434b350fe4c767c0cb4f1790b7fee763 /drivers/scsi/bfa/bfa_core.c | |
parent | 6a18b1675fdf08a6dc861e39c3f94309a03e7f16 (diff) |
[SCSI] bfa: replace endian swap macros with the ones provided by linux
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/bfa_core.c')
-rw-r--r-- | drivers/scsi/bfa/bfa_core.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/scsi/bfa/bfa_core.c b/drivers/scsi/bfa/bfa_core.c index 4d0530b9633..73669245c2c 100644 --- a/drivers/scsi/bfa/bfa_core.c +++ b/drivers/scsi/bfa/bfa_core.c | |||
@@ -400,14 +400,14 @@ bfa_iocfc_send_cfg(void *bfa_arg) | |||
400 | bfa_dma_be_addr_set(cfg_info->req_shadow_ci[i], | 400 | bfa_dma_be_addr_set(cfg_info->req_shadow_ci[i], |
401 | iocfc->req_cq_shadow_ci[i].pa); | 401 | iocfc->req_cq_shadow_ci[i].pa); |
402 | cfg_info->req_cq_elems[i] = | 402 | cfg_info->req_cq_elems[i] = |
403 | bfa_os_htons(cfg->drvcfg.num_reqq_elems); | 403 | cpu_to_be16(cfg->drvcfg.num_reqq_elems); |
404 | 404 | ||
405 | bfa_dma_be_addr_set(cfg_info->rsp_cq_ba[i], | 405 | bfa_dma_be_addr_set(cfg_info->rsp_cq_ba[i], |
406 | iocfc->rsp_cq_ba[i].pa); | 406 | iocfc->rsp_cq_ba[i].pa); |
407 | bfa_dma_be_addr_set(cfg_info->rsp_shadow_pi[i], | 407 | bfa_dma_be_addr_set(cfg_info->rsp_shadow_pi[i], |
408 | iocfc->rsp_cq_shadow_pi[i].pa); | 408 | iocfc->rsp_cq_shadow_pi[i].pa); |
409 | cfg_info->rsp_cq_elems[i] = | 409 | cfg_info->rsp_cq_elems[i] = |
410 | bfa_os_htons(cfg->drvcfg.num_rspq_elems); | 410 | cpu_to_be16(cfg->drvcfg.num_rspq_elems); |
411 | } | 411 | } |
412 | 412 | ||
413 | /** | 413 | /** |
@@ -634,11 +634,11 @@ bfa_iocfc_cfgrsp(struct bfa_s *bfa) | |||
634 | struct bfa_iocfc_fwcfg_s *fwcfg = &cfgrsp->fwcfg; | 634 | struct bfa_iocfc_fwcfg_s *fwcfg = &cfgrsp->fwcfg; |
635 | 635 | ||
636 | fwcfg->num_cqs = fwcfg->num_cqs; | 636 | fwcfg->num_cqs = fwcfg->num_cqs; |
637 | fwcfg->num_ioim_reqs = bfa_os_ntohs(fwcfg->num_ioim_reqs); | 637 | fwcfg->num_ioim_reqs = be16_to_cpu(fwcfg->num_ioim_reqs); |
638 | fwcfg->num_tskim_reqs = bfa_os_ntohs(fwcfg->num_tskim_reqs); | 638 | fwcfg->num_tskim_reqs = be16_to_cpu(fwcfg->num_tskim_reqs); |
639 | fwcfg->num_fcxp_reqs = bfa_os_ntohs(fwcfg->num_fcxp_reqs); | 639 | fwcfg->num_fcxp_reqs = be16_to_cpu(fwcfg->num_fcxp_reqs); |
640 | fwcfg->num_uf_bufs = bfa_os_ntohs(fwcfg->num_uf_bufs); | 640 | fwcfg->num_uf_bufs = be16_to_cpu(fwcfg->num_uf_bufs); |
641 | fwcfg->num_rports = bfa_os_ntohs(fwcfg->num_rports); | 641 | fwcfg->num_rports = be16_to_cpu(fwcfg->num_rports); |
642 | 642 | ||
643 | iocfc->cfgdone = BFA_TRUE; | 643 | iocfc->cfgdone = BFA_TRUE; |
644 | 644 | ||
@@ -876,12 +876,12 @@ bfa_iocfc_get_attr(struct bfa_s *bfa, struct bfa_iocfc_attr_s *attr) | |||
876 | attr->intr_attr.coalesce = iocfc->cfginfo->intr_attr.coalesce; | 876 | attr->intr_attr.coalesce = iocfc->cfginfo->intr_attr.coalesce; |
877 | 877 | ||
878 | attr->intr_attr.delay = iocfc->cfginfo->intr_attr.delay ? | 878 | attr->intr_attr.delay = iocfc->cfginfo->intr_attr.delay ? |
879 | bfa_os_ntohs(iocfc->cfginfo->intr_attr.delay) : | 879 | be16_to_cpu(iocfc->cfginfo->intr_attr.delay) : |
880 | bfa_os_ntohs(iocfc->cfgrsp->intr_attr.delay); | 880 | be16_to_cpu(iocfc->cfgrsp->intr_attr.delay); |
881 | 881 | ||
882 | attr->intr_attr.latency = iocfc->cfginfo->intr_attr.latency ? | 882 | attr->intr_attr.latency = iocfc->cfginfo->intr_attr.latency ? |
883 | bfa_os_ntohs(iocfc->cfginfo->intr_attr.latency) : | 883 | be16_to_cpu(iocfc->cfginfo->intr_attr.latency) : |
884 | bfa_os_ntohs(iocfc->cfgrsp->intr_attr.latency); | 884 | be16_to_cpu(iocfc->cfgrsp->intr_attr.latency); |
885 | 885 | ||
886 | attr->config = iocfc->cfg; | 886 | attr->config = iocfc->cfg; |
887 | } | 887 | } |
@@ -893,8 +893,8 @@ bfa_iocfc_israttr_set(struct bfa_s *bfa, struct bfa_iocfc_intr_attr_s *attr) | |||
893 | struct bfi_iocfc_set_intr_req_s *m; | 893 | struct bfi_iocfc_set_intr_req_s *m; |
894 | 894 | ||
895 | iocfc->cfginfo->intr_attr.coalesce = attr->coalesce; | 895 | iocfc->cfginfo->intr_attr.coalesce = attr->coalesce; |
896 | iocfc->cfginfo->intr_attr.delay = bfa_os_htons(attr->delay); | 896 | iocfc->cfginfo->intr_attr.delay = cpu_to_be16(attr->delay); |
897 | iocfc->cfginfo->intr_attr.latency = bfa_os_htons(attr->latency); | 897 | iocfc->cfginfo->intr_attr.latency = cpu_to_be16(attr->latency); |
898 | 898 | ||
899 | if (!bfa_iocfc_is_operational(bfa)) | 899 | if (!bfa_iocfc_is_operational(bfa)) |
900 | return BFA_STATUS_OK; | 900 | return BFA_STATUS_OK; |