aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2006-02-01 16:38:24 -0500
committerRoland Dreier <rolandd@cisco.com>2006-03-20 13:08:09 -0500
commit2fa5e2ebbe2d81f741ba7bed9e07dc38cc734625 (patch)
tree6cb2693d8e10a903d78e236e90645fc6df28c9b3 /drivers/infiniband
parent4885bf64bc2eb242ebebe67077cfe3688283b586 (diff)
IB/mthca: Whitespace cleanups
Remove trailing whitespace and fix indentation that with spaces instead of tabs. Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_av.c2
-rw-r--r--drivers/infiniband/hw/mthca/mthca_cmd.c2
-rw-r--r--drivers/infiniband/hw/mthca/mthca_cmd.h4
-rw-r--r--drivers/infiniband/hw/mthca/mthca_eq.c2
-rw-r--r--drivers/infiniband/hw/mthca/mthca_mcg.c2
-rw-r--r--drivers/infiniband/hw/mthca/mthca_mr.c6
-rw-r--r--drivers/infiniband/hw/mthca/mthca_provider.c4
-rw-r--r--drivers/infiniband/hw/mthca/mthca_qp.c28
-rw-r--r--drivers/infiniband/hw/mthca/mthca_srq.c2
9 files changed, 26 insertions, 26 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_av.c b/drivers/infiniband/hw/mthca/mthca_av.c
index a19e0ed03d7c..198f1267e984 100644
--- a/drivers/infiniband/hw/mthca/mthca_av.c
+++ b/drivers/infiniband/hw/mthca/mthca_av.c
@@ -147,7 +147,7 @@ int mthca_destroy_ah(struct mthca_dev *dev, struct mthca_ah *ah)
147 switch (ah->type) { 147 switch (ah->type) {
148 case MTHCA_AH_ON_HCA: 148 case MTHCA_AH_ON_HCA:
149 mthca_free(&dev->av_table.alloc, 149 mthca_free(&dev->av_table.alloc,
150 (ah->avdma - dev->av_table.ddr_av_base) / 150 (ah->avdma - dev->av_table.ddr_av_base) /
151 MTHCA_AV_SIZE); 151 MTHCA_AV_SIZE);
152 break; 152 break;
153 153
diff --git a/drivers/infiniband/hw/mthca/mthca_cmd.c b/drivers/infiniband/hw/mthca/mthca_cmd.c
index 7780e974cfb5..7150fd143bff 100644
--- a/drivers/infiniband/hw/mthca/mthca_cmd.c
+++ b/drivers/infiniband/hw/mthca/mthca_cmd.c
@@ -275,7 +275,7 @@ static int mthca_cmd_poll(struct mthca_dev *dev,
275 } 275 }
276 276
277 if (out_is_imm) 277 if (out_is_imm)
278 *out_param = 278 *out_param =
279 (u64) be32_to_cpu((__force __be32) 279 (u64) be32_to_cpu((__force __be32)
280 __raw_readl(dev->hcr + HCR_OUT_PARAM_OFFSET)) << 32 | 280 __raw_readl(dev->hcr + HCR_OUT_PARAM_OFFSET)) << 32 |
281 (u64) be32_to_cpu((__force __be32) 281 (u64) be32_to_cpu((__force __be32)
diff --git a/drivers/infiniband/hw/mthca/mthca_cmd.h b/drivers/infiniband/hw/mthca/mthca_cmd.h
index 3473b8235ee0..a8da84b0a0f1 100644
--- a/drivers/infiniband/hw/mthca/mthca_cmd.h
+++ b/drivers/infiniband/hw/mthca/mthca_cmd.h
@@ -74,9 +74,9 @@ enum {
74 MTHCA_CMD_STAT_REG_BOUND = 0x21, 74 MTHCA_CMD_STAT_REG_BOUND = 0x21,
75 /* HCA local attached memory not present: */ 75 /* HCA local attached memory not present: */
76 MTHCA_CMD_STAT_LAM_NOT_PRE = 0x22, 76 MTHCA_CMD_STAT_LAM_NOT_PRE = 0x22,
77 /* Bad management packet (silently discarded): */ 77 /* Bad management packet (silently discarded): */
78 MTHCA_CMD_STAT_BAD_PKT = 0x30, 78 MTHCA_CMD_STAT_BAD_PKT = 0x30,
79 /* More outstanding CQEs in CQ than new CQ size: */ 79 /* More outstanding CQEs in CQ than new CQ size: */
80 MTHCA_CMD_STAT_BAD_SIZE = 0x40 80 MTHCA_CMD_STAT_BAD_SIZE = 0x40
81}; 81};
82 82
diff --git a/drivers/infiniband/hw/mthca/mthca_eq.c b/drivers/infiniband/hw/mthca/mthca_eq.c
index 2eabb27804cd..cf43a5388397 100644
--- a/drivers/infiniband/hw/mthca/mthca_eq.c
+++ b/drivers/infiniband/hw/mthca/mthca_eq.c
@@ -497,7 +497,7 @@ static int __devinit mthca_create_eq(struct mthca_dev *dev,
497 497
498 eq->dev = dev; 498 eq->dev = dev;
499 eq->nent = roundup_pow_of_two(max(nent, 2)); 499 eq->nent = roundup_pow_of_two(max(nent, 2));
500 npages = ALIGN(eq->nent * MTHCA_EQ_ENTRY_SIZE, PAGE_SIZE) / PAGE_SIZE; 500 npages = ALIGN(eq->nent * MTHCA_EQ_ENTRY_SIZE, PAGE_SIZE) / PAGE_SIZE;
501 501
502 eq->page_list = kmalloc(npages * sizeof *eq->page_list, 502 eq->page_list = kmalloc(npages * sizeof *eq->page_list,
503 GFP_KERNEL); 503 GFP_KERNEL);
diff --git a/drivers/infiniband/hw/mthca/mthca_mcg.c b/drivers/infiniband/hw/mthca/mthca_mcg.c
index 321f11e707f2..9965bda9afed 100644
--- a/drivers/infiniband/hw/mthca/mthca_mcg.c
+++ b/drivers/infiniband/hw/mthca/mthca_mcg.c
@@ -187,7 +187,7 @@ int mthca_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
187 187
188 for (i = 0; i < MTHCA_QP_PER_MGM; ++i) 188 for (i = 0; i < MTHCA_QP_PER_MGM; ++i)
189 if (mgm->qp[i] == cpu_to_be32(ibqp->qp_num | (1 << 31))) { 189 if (mgm->qp[i] == cpu_to_be32(ibqp->qp_num | (1 << 31))) {
190 mthca_dbg(dev, "QP %06x already a member of MGM\n", 190 mthca_dbg(dev, "QP %06x already a member of MGM\n",
191 ibqp->qp_num); 191 ibqp->qp_num);
192 err = 0; 192 err = 0;
193 goto out; 193 goto out;
diff --git a/drivers/infiniband/hw/mthca/mthca_mr.c b/drivers/infiniband/hw/mthca/mthca_mr.c
index 551320fdc9c5..653f1321a13f 100644
--- a/drivers/infiniband/hw/mthca/mthca_mr.c
+++ b/drivers/infiniband/hw/mthca/mthca_mr.c
@@ -517,7 +517,7 @@ int mthca_fmr_alloc(struct mthca_dev *dev, u32 pd,
517 BUG_ON(!mr->mem.arbel.mpt); 517 BUG_ON(!mr->mem.arbel.mpt);
518 } else 518 } else
519 mr->mem.tavor.mpt = dev->mr_table.tavor_fmr.mpt_base + 519 mr->mem.tavor.mpt = dev->mr_table.tavor_fmr.mpt_base +
520 sizeof *(mr->mem.tavor.mpt) * idx; 520 sizeof *(mr->mem.tavor.mpt) * idx;
521 521
522 mr->mtt = __mthca_alloc_mtt(dev, list_len, dev->mr_table.fmr_mtt_buddy); 522 mr->mtt = __mthca_alloc_mtt(dev, list_len, dev->mr_table.fmr_mtt_buddy);
523 if (IS_ERR(mr->mtt)) 523 if (IS_ERR(mr->mtt))
@@ -779,7 +779,7 @@ int __devinit mthca_init_mr_table(struct mthca_dev *dev)
779 } 779 }
780 780
781 dev->mr_table.tavor_fmr.mpt_base = 781 dev->mr_table.tavor_fmr.mpt_base =
782 ioremap(dev->mr_table.mpt_base, 782 ioremap(dev->mr_table.mpt_base,
783 (1 << i) * sizeof (struct mthca_mpt_entry)); 783 (1 << i) * sizeof (struct mthca_mpt_entry));
784 784
785 if (!dev->mr_table.tavor_fmr.mpt_base) { 785 if (!dev->mr_table.tavor_fmr.mpt_base) {
@@ -807,7 +807,7 @@ int __devinit mthca_init_mr_table(struct mthca_dev *dev)
807 goto err_reserve_fmr; 807 goto err_reserve_fmr;
808 808
809 dev->mr_table.fmr_mtt_buddy = 809 dev->mr_table.fmr_mtt_buddy =
810 &dev->mr_table.tavor_fmr.mtt_buddy; 810 &dev->mr_table.tavor_fmr.mtt_buddy;
811 } else 811 } else
812 dev->mr_table.fmr_mtt_buddy = &dev->mr_table.mtt_buddy; 812 dev->mr_table.fmr_mtt_buddy = &dev->mr_table.mtt_buddy;
813 813
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c
index cd2038bdd1ac..76321f0ef019 100644
--- a/drivers/infiniband/hw/mthca/mthca_provider.c
+++ b/drivers/infiniband/hw/mthca/mthca_provider.c
@@ -108,12 +108,12 @@ static int mthca_query_device(struct ib_device *ibdev,
108 props->max_srq_wr = mdev->limits.max_srq_wqes; 108 props->max_srq_wr = mdev->limits.max_srq_wqes;
109 props->max_srq_sge = mdev->limits.max_sg; 109 props->max_srq_sge = mdev->limits.max_sg;
110 props->local_ca_ack_delay = mdev->limits.local_ca_ack_delay; 110 props->local_ca_ack_delay = mdev->limits.local_ca_ack_delay;
111 props->atomic_cap = mdev->limits.flags & DEV_LIM_FLAG_ATOMIC ? 111 props->atomic_cap = mdev->limits.flags & DEV_LIM_FLAG_ATOMIC ?
112 IB_ATOMIC_HCA : IB_ATOMIC_NONE; 112 IB_ATOMIC_HCA : IB_ATOMIC_NONE;
113 props->max_pkeys = mdev->limits.pkey_table_len; 113 props->max_pkeys = mdev->limits.pkey_table_len;
114 props->max_mcast_grp = mdev->limits.num_mgms + mdev->limits.num_amgms; 114 props->max_mcast_grp = mdev->limits.num_mgms + mdev->limits.num_amgms;
115 props->max_mcast_qp_attach = MTHCA_QP_PER_MGM; 115 props->max_mcast_qp_attach = MTHCA_QP_PER_MGM;
116 props->max_total_mcast_qp_attach = props->max_mcast_qp_attach * 116 props->max_total_mcast_qp_attach = props->max_mcast_qp_attach *
117 props->max_mcast_grp; 117 props->max_mcast_grp;
118 118
119 err = 0; 119 err = 0;
diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c
index 79245717e98f..bdba39a8d9f9 100644
--- a/drivers/infiniband/hw/mthca/mthca_qp.c
+++ b/drivers/infiniband/hw/mthca/mthca_qp.c
@@ -2,7 +2,7 @@
2 * Copyright (c) 2004 Topspin Communications. All rights reserved. 2 * Copyright (c) 2004 Topspin Communications. All rights reserved.
3 * Copyright (c) 2005 Cisco Systems. All rights reserved. 3 * Copyright (c) 2005 Cisco Systems. All rights reserved.
4 * Copyright (c) 2005 Mellanox Technologies. All rights reserved. 4 * Copyright (c) 2005 Mellanox Technologies. All rights reserved.
5 * Copyright (c) 2004 Voltaire, Inc. All rights reserved. 5 * Copyright (c) 2004 Voltaire, Inc. All rights reserved.
6 * 6 *
7 * This software is available to you under a choice of one of two 7 * This software is available to you under a choice of one of two
8 * licenses. You may choose to be licensed under the terms of the GNU 8 * licenses. You may choose to be licensed under the terms of the GNU
@@ -559,9 +559,9 @@ static void mthca_path_set(struct ib_ah_attr *ah, struct mthca_qp_path *path)
559 path->g_mylmc |= 1 << 7; 559 path->g_mylmc |= 1 << 7;
560 path->mgid_index = ah->grh.sgid_index; 560 path->mgid_index = ah->grh.sgid_index;
561 path->hop_limit = ah->grh.hop_limit; 561 path->hop_limit = ah->grh.hop_limit;
562 path->sl_tclass_flowlabel = 562 path->sl_tclass_flowlabel =
563 cpu_to_be32((ah->sl << 28) | 563 cpu_to_be32((ah->sl << 28) |
564 (ah->grh.traffic_class << 20) | 564 (ah->grh.traffic_class << 20) |
565 (ah->grh.flow_label)); 565 (ah->grh.flow_label));
566 memcpy(path->rgid, ah->grh.dgid.raw, 16); 566 memcpy(path->rgid, ah->grh.dgid.raw, 16);
567 } else 567 } else
@@ -597,7 +597,7 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask)
597 } 597 }
598 598
599 if (attr_mask & IB_QP_STATE) { 599 if (attr_mask & IB_QP_STATE) {
600 if (attr->qp_state < 0 || attr->qp_state > IB_QPS_ERR) 600 if (attr->qp_state < 0 || attr->qp_state > IB_QPS_ERR)
601 return -EINVAL; 601 return -EINVAL;
602 new_state = attr->qp_state; 602 new_state = attr->qp_state;
603 } else 603 } else
@@ -630,10 +630,10 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask)
630 return -EINVAL; 630 return -EINVAL;
631 } 631 }
632 632
633 if ((attr_mask & IB_QP_PKEY_INDEX) && 633 if ((attr_mask & IB_QP_PKEY_INDEX) &&
634 attr->pkey_index >= dev->limits.pkey_table_len) { 634 attr->pkey_index >= dev->limits.pkey_table_len) {
635 mthca_dbg(dev, "PKey index (%u) too large. max is %d\n", 635 mthca_dbg(dev, "PKey index (%u) too large. max is %d\n",
636 attr->pkey_index,dev->limits.pkey_table_len-1); 636 attr->pkey_index,dev->limits.pkey_table_len-1);
637 return -EINVAL; 637 return -EINVAL;
638 } 638 }
639 639
@@ -733,7 +733,7 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask)
733 if (attr_mask & IB_QP_RNR_RETRY) { 733 if (attr_mask & IB_QP_RNR_RETRY) {
734 qp_context->alt_path.rnr_retry = qp_context->pri_path.rnr_retry = 734 qp_context->alt_path.rnr_retry = qp_context->pri_path.rnr_retry =
735 attr->rnr_retry << 5; 735 attr->rnr_retry << 5;
736 qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_RNR_RETRY | 736 qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_RNR_RETRY |
737 MTHCA_QP_OPTPAR_ALT_RNR_RETRY); 737 MTHCA_QP_OPTPAR_ALT_RNR_RETRY);
738 } 738 }
739 739
@@ -749,13 +749,13 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask)
749 749
750 if (attr_mask & IB_QP_ALT_PATH) { 750 if (attr_mask & IB_QP_ALT_PATH) {
751 if (attr->alt_port_num == 0 || attr->alt_port_num > dev->limits.num_ports) { 751 if (attr->alt_port_num == 0 || attr->alt_port_num > dev->limits.num_ports) {
752 mthca_dbg(dev, "Alternate port number (%u) is invalid\n", 752 mthca_dbg(dev, "Alternate port number (%u) is invalid\n",
753 attr->alt_port_num); 753 attr->alt_port_num);
754 return -EINVAL; 754 return -EINVAL;
755 } 755 }
756 756
757 mthca_path_set(&attr->alt_ah_attr, &qp_context->alt_path); 757 mthca_path_set(&attr->alt_ah_attr, &qp_context->alt_path);
758 qp_context->alt_path.port_pkey |= cpu_to_be32(attr->alt_pkey_index | 758 qp_context->alt_path.port_pkey |= cpu_to_be32(attr->alt_pkey_index |
759 attr->alt_port_num << 24); 759 attr->alt_port_num << 24);
760 qp_context->alt_path.ackto = attr->alt_timeout << 3; 760 qp_context->alt_path.ackto = attr->alt_timeout << 3;
761 qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_ALT_ADDR_PATH); 761 qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_ALT_ADDR_PATH);
@@ -1078,10 +1078,10 @@ static int mthca_map_memfree(struct mthca_dev *dev,
1078 if (ret) 1078 if (ret)
1079 goto err_qpc; 1079 goto err_qpc;
1080 1080
1081 ret = mthca_table_get(dev, dev->qp_table.rdb_table, 1081 ret = mthca_table_get(dev, dev->qp_table.rdb_table,
1082 qp->qpn << dev->qp_table.rdb_shift); 1082 qp->qpn << dev->qp_table.rdb_shift);
1083 if (ret) 1083 if (ret)
1084 goto err_eqpc; 1084 goto err_eqpc;
1085 1085
1086 } 1086 }
1087 1087
@@ -2115,7 +2115,7 @@ int mthca_arbel_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr,
2115 int i; 2115 int i;
2116 void *wqe; 2116 void *wqe;
2117 2117
2118 spin_lock_irqsave(&qp->rq.lock, flags); 2118 spin_lock_irqsave(&qp->rq.lock, flags);
2119 2119
2120 /* XXX check that state is OK to post receive */ 2120 /* XXX check that state is OK to post receive */
2121 2121
diff --git a/drivers/infiniband/hw/mthca/mthca_srq.c b/drivers/infiniband/hw/mthca/mthca_srq.c
index e7e153d9c4c6..f1a1da147d0b 100644
--- a/drivers/infiniband/hw/mthca/mthca_srq.c
+++ b/drivers/infiniband/hw/mthca/mthca_srq.c
@@ -339,7 +339,7 @@ void mthca_free_srq(struct mthca_dev *dev, struct mthca_srq *srq)
339 339
340int mthca_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr, 340int mthca_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr,
341 enum ib_srq_attr_mask attr_mask) 341 enum ib_srq_attr_mask attr_mask)
342{ 342{
343 struct mthca_dev *dev = to_mdev(ibsrq->device); 343 struct mthca_dev *dev = to_mdev(ibsrq->device);
344 struct mthca_srq *srq = to_msrq(ibsrq); 344 struct mthca_srq *srq = to_msrq(ibsrq);
345 int ret; 345 int ret;