aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ehca/ehca_av.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-12 19:45:40 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-12 19:45:40 -0400
commit0cdf6990e992902ae59cbc625d28cb41390f378e (patch)
tree0c01cf792be5f36ea34064036005f424ab95a571 /drivers/infiniband/hw/ehca/ehca_av.c
parentde081fa517fed81b0369f2e90ca87c30182879c8 (diff)
parentcec7c893d8654723028f09d33341e42673558057 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (76 commits) IB: Update MAINTAINERS with Hal's new email address IB/mlx4: Implement query SRQ IB/mlx4: Implement query QP IB/cm: Send no match if a SIDR REQ does not match a listen IB/cm: Fix handling of duplicate SIDR REQs IB/cm: cm_msgs.h should include ib_cm.h IB/cm: Include HCA ACK delay in local ACK timeout IB/cm: Use spin_lock_irq() instead of spin_lock_irqsave() when possible IB/sa: Make sure SA queries use default P_Key IPoIB: Recycle loopback skbs instead of freeing and reallocating IB/mthca: Replace memset(<addr>, 0, PAGE_SIZE) with clear_page(<addr>) IPoIB/cm: Fix warning if IPV6 is not enabled IB/core: Take sizeof the correct pointer when calling kmalloc() IB/ehca: Improve latency by unlocking after triggering the hardware IB/ehca: Notify consumers of LID/PKEY/SM changes after nondisruptive events IB/ehca: Return QP pointer in poll_cq() IB/ehca: Change idr spinlocks into rwlocks IB/ehca: Refactor sync between completions and destroy_cq using atomic_t IB/ehca: Lock renaming, static initializers IB/ehca: Report RDMA atomic attributes in query_qp() ...
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_av.c')
-rw-r--r--drivers/infiniband/hw/ehca/ehca_av.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_av.c b/drivers/infiniband/hw/ehca/ehca_av.c
index 0d6e2c4bb245..3cd6bf3402d1 100644
--- a/drivers/infiniband/hw/ehca/ehca_av.c
+++ b/drivers/infiniband/hw/ehca/ehca_av.c
@@ -118,7 +118,7 @@ struct ib_ah *ehca_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr)
118 } 118 }
119 memcpy(&av->av.grh.word_1, &gid, sizeof(gid)); 119 memcpy(&av->av.grh.word_1, &gid, sizeof(gid));
120 } 120 }
121 av->av.pmtu = EHCA_MAX_MTU; 121 av->av.pmtu = shca->max_mtu;
122 122
123 /* dgid comes in grh.word_3 */ 123 /* dgid comes in grh.word_3 */
124 memcpy(&av->av.grh.word_3, &ah_attr->grh.dgid, 124 memcpy(&av->av.grh.word_3, &ah_attr->grh.dgid,
@@ -137,6 +137,8 @@ int ehca_modify_ah(struct ib_ah *ah, struct ib_ah_attr *ah_attr)
137 struct ehca_av *av; 137 struct ehca_av *av;
138 struct ehca_ud_av new_ehca_av; 138 struct ehca_ud_av new_ehca_av;
139 struct ehca_pd *my_pd = container_of(ah->pd, struct ehca_pd, ib_pd); 139 struct ehca_pd *my_pd = container_of(ah->pd, struct ehca_pd, ib_pd);
140 struct ehca_shca *shca = container_of(ah->pd->device, struct ehca_shca,
141 ib_device);
140 u32 cur_pid = current->tgid; 142 u32 cur_pid = current->tgid;
141 143
142 if (my_pd->ib_pd.uobject && my_pd->ib_pd.uobject->context && 144 if (my_pd->ib_pd.uobject && my_pd->ib_pd.uobject->context &&
@@ -192,7 +194,7 @@ int ehca_modify_ah(struct ib_ah *ah, struct ib_ah_attr *ah_attr)
192 memcpy(&new_ehca_av.grh.word_1, &gid, sizeof(gid)); 194 memcpy(&new_ehca_av.grh.word_1, &gid, sizeof(gid));
193 } 195 }
194 196
195 new_ehca_av.pmtu = EHCA_MAX_MTU; 197 new_ehca_av.pmtu = shca->max_mtu;
196 198
197 memcpy(&new_ehca_av.grh.word_3, &ah_attr->grh.dgid, 199 memcpy(&new_ehca_av.grh.word_3, &ah_attr->grh.dgid,
198 sizeof(ah_attr->grh.dgid)); 200 sizeof(ah_attr->grh.dgid));