Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276122
b: refs/heads/master
c: 3874397
h: refs/heads/master
v: v3
  • Loading branch information
Mike Marciniszyn authored and Roland Dreier committed Nov 29, 2011
1 parent 8ba811a commit fa1442c
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 01b225e18fcb540c5d615ca79ef832473451f118
refs/heads/master: 3874397c0bdec3c21ce071711cd105165179b8eb
4 changes: 1 addition & 3 deletions trunk/drivers/infiniband/hw/cxgb4/cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,10 +542,8 @@ static void send_mpa_req(struct c4iw_ep *ep, struct sk_buff *skb,
(mpa_rev_to_use == 2 ? MPA_ENHANCED_RDMA_CONN : 0);
mpa->private_data_size = htons(ep->plen);
mpa->revision = mpa_rev_to_use;
if (mpa_rev_to_use == 1) {
if (mpa_rev_to_use == 1)
ep->tried_with_mpa_v1 = 1;
ep->retry_with_mpa_v1 = 0;
}

if (mpa_rev_to_use == 2) {
mpa->private_data_size +=
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/infiniband/hw/cxgb4/cq.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ void c4iw_count_rcqes(struct t4_cq *cq, struct t4_wq *wq, int *count)
while (ptr != cq->sw_pidx) {
cqe = &cq->sw_queue[ptr];
if (RQ_TYPE(cqe) && (CQE_OPCODE(cqe) != FW_RI_READ_RESP) &&
(CQE_QPID(cqe) == wq->sq.qid) && cqe_completes_wr(cqe, wq))
(CQE_QPID(cqe) == wq->rq.qid) && cqe_completes_wr(cqe, wq))
(*count)++;
if (++ptr == cq->size)
ptr = 0;
Expand Down
13 changes: 8 additions & 5 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_ib.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,24 @@ struct ipoib_ah *ipoib_create_ah(struct net_device *dev,
struct ib_pd *pd, struct ib_ah_attr *attr)
{
struct ipoib_ah *ah;
struct ib_ah *vah;

ah = kmalloc(sizeof *ah, GFP_KERNEL);
if (!ah)
return NULL;
return ERR_PTR(-ENOMEM);

ah->dev = dev;
ah->last_send = 0;
kref_init(&ah->ref);

ah->ah = ib_create_ah(pd, attr);
if (IS_ERR(ah->ah)) {
vah = ib_create_ah(pd, attr);
if (IS_ERR(vah)) {
kfree(ah);
ah = NULL;
} else
ah = (struct ipoib_ah *)vah;
} else {
ah->ah = vah;
ipoib_dbg(netdev_priv(dev), "Created ah %p\n", ah->ah);
}

return ah;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/infiniband/ulp/ipoib/ipoib_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ static void path_rec_completion(int status,

spin_lock_irqsave(&priv->lock, flags);

if (ah) {
if (!IS_ERR_OR_NULL(ah)) {
path->pathrec = *pathrec;

old_ah = path->ah;
Expand Down
7 changes: 5 additions & 2 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,11 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast,
av.grh.dgid = mcast->mcmember.mgid;

ah = ipoib_create_ah(dev, priv->pd, &av);
if (!ah) {
ipoib_warn(priv, "ib_address_create failed\n");
if (IS_ERR(ah)) {
ipoib_warn(priv, "ib_address_create failed %ld\n",
-PTR_ERR(ah));
/* use original error */
return PTR_ERR(ah);
} else {
spin_lock_irq(&priv->lock);
mcast->ah = ah;
Expand Down

0 comments on commit fa1442c

Please sign in to comment.