Skip to content

Commit f1d6d6c

Browse files
committed
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: (42 commits) IB/qib: Fix refcount leak in lkey/rkey validation IB/qib: Improve SERDES tunning on QMH boards IB/qib: Unnecessary delayed completions on RC connection IB/qib: Issue pre-emptive NAKs on eager buffer overflow IB/qib: RDMA lkey/rkey validation is inefficient for large MRs IB/qib: Change QPN increment IB/qib: Add fix missing from earlier patch IB/qib: Change receive queue/QPN selection IB/qib: Fix interrupt mitigation IB/qib: Avoid duplicate writes to the rcv head register IB/qib: Add a few new SERDES tunings IB/qib: Reset packet list after freeing IB/qib: New SERDES init routine and improvements to SI quality IB/qib: Clear WAIT_SEND flags when setting QP to error state IB/qib: Fix context allocation with multiple HCAs IB/qib: Fix multi-Florida HCA host panic on reboot IB/qib: Handle transitions from ACTIVE_DEFERRED to ACTIVE better IB/qib: UD send with immediate receive completion has wrong size IB/qib: Set port physical state even if other fields are invalid IB/qib: Generate completion callback on errors ...
2 parents b9d919a + 2b76c05 commit f1d6d6c

37 files changed

+889
-622
lines changed

drivers/infiniband/hw/cxgb3/cxio_hal.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ int cxio_create_cq(struct cxio_rdev *rdev_p, struct t3_cq *cq, int kernel)
189189
return (rdev_p->t3cdev_p->ctl(rdev_p->t3cdev_p, RDMA_CQ_SETUP, &setup));
190190
}
191191

192+
#ifdef notyet
192193
int cxio_resize_cq(struct cxio_rdev *rdev_p, struct t3_cq *cq)
193194
{
194195
struct rdma_cq_setup setup;
@@ -200,6 +201,7 @@ int cxio_resize_cq(struct cxio_rdev *rdev_p, struct t3_cq *cq)
200201
setup.ovfl_mode = 1;
201202
return (rdev_p->t3cdev_p->ctl(rdev_p->t3cdev_p, RDMA_CQ_SETUP, &setup));
202203
}
204+
#endif
203205

204206
static u32 get_qpid(struct cxio_rdev *rdev_p, struct cxio_ucontext *uctx)
205207
{

drivers/infiniband/hw/cxgb3/iwch_provider.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,6 @@ int iwch_post_terminate(struct iwch_qp *qhp, struct respQ_msg_t *rsp_msg);
335335
int iwch_post_zb_read(struct iwch_qp *qhp);
336336
int iwch_register_device(struct iwch_dev *dev);
337337
void iwch_unregister_device(struct iwch_dev *dev);
338-
int iwch_quiesce_qps(struct iwch_cq *chp);
339-
int iwch_resume_qps(struct iwch_cq *chp);
340338
void stop_read_rep_timer(struct iwch_qp *qhp);
341339
int iwch_register_mem(struct iwch_dev *rhp, struct iwch_pd *php,
342340
struct iwch_mr *mhp, int shift);

drivers/infiniband/hw/cxgb3/iwch_qp.c

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,59 +1149,3 @@ int iwch_modify_qp(struct iwch_dev *rhp, struct iwch_qp *qhp,
11491149
PDBG("%s exit state %d\n", __func__, qhp->attr.state);
11501150
return ret;
11511151
}
1152-
1153-
static int quiesce_qp(struct iwch_qp *qhp)
1154-
{
1155-
spin_lock_irq(&qhp->lock);
1156-
iwch_quiesce_tid(qhp->ep);
1157-
qhp->flags |= QP_QUIESCED;
1158-
spin_unlock_irq(&qhp->lock);
1159-
return 0;
1160-
}
1161-
1162-
static int resume_qp(struct iwch_qp *qhp)
1163-
{
1164-
spin_lock_irq(&qhp->lock);
1165-
iwch_resume_tid(qhp->ep);
1166-
qhp->flags &= ~QP_QUIESCED;
1167-
spin_unlock_irq(&qhp->lock);
1168-
return 0;
1169-
}
1170-
1171-
int iwch_quiesce_qps(struct iwch_cq *chp)
1172-
{
1173-
int i;
1174-
struct iwch_qp *qhp;
1175-
1176-
for (i=0; i < T3_MAX_NUM_QP; i++) {
1177-
qhp = get_qhp(chp->rhp, i);
1178-
if (!qhp)
1179-
continue;
1180-
if ((qhp->attr.rcq == chp->cq.cqid) && !qp_quiesced(qhp)) {
1181-
quiesce_qp(qhp);
1182-
continue;
1183-
}
1184-
if ((qhp->attr.scq == chp->cq.cqid) && !qp_quiesced(qhp))
1185-
quiesce_qp(qhp);
1186-
}
1187-
return 0;
1188-
}
1189-
1190-
int iwch_resume_qps(struct iwch_cq *chp)
1191-
{
1192-
int i;
1193-
struct iwch_qp *qhp;
1194-
1195-
for (i=0; i < T3_MAX_NUM_QP; i++) {
1196-
qhp = get_qhp(chp->rhp, i);
1197-
if (!qhp)
1198-
continue;
1199-
if ((qhp->attr.rcq == chp->cq.cqid) && qp_quiesced(qhp)) {
1200-
resume_qp(qhp);
1201-
continue;
1202-
}
1203-
if ((qhp->attr.scq == chp->cq.cqid) && qp_quiesced(qhp))
1204-
resume_qp(qhp);
1205-
}
1206-
return 0;
1207-
}

drivers/infiniband/hw/cxgb4/iw_cxgb4.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,6 @@ int c4iw_flush_rq(struct t4_wq *wq, struct t4_cq *cq, int count);
760760
int c4iw_flush_sq(struct t4_wq *wq, struct t4_cq *cq, int count);
761761
int c4iw_ev_handler(struct c4iw_dev *rnicp, u32 qid);
762762
u16 c4iw_rqes_posted(struct c4iw_qp *qhp);
763-
int c4iw_post_zb_read(struct c4iw_qp *qhp);
764763
int c4iw_post_terminate(struct c4iw_qp *qhp, struct t4_cqe *err_cqe);
765764
u32 c4iw_get_cqid(struct c4iw_rdev *rdev, struct c4iw_dev_ucontext *uctx);
766765
void c4iw_put_cqid(struct c4iw_rdev *rdev, u32 qid,

drivers/infiniband/hw/cxgb4/qp.c

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -892,36 +892,6 @@ static inline void build_term_codes(struct t4_cqe *err_cqe, u8 *layer_type,
892892
}
893893
}
894894

895-
int c4iw_post_zb_read(struct c4iw_qp *qhp)
896-
{
897-
union t4_wr *wqe;
898-
struct sk_buff *skb;
899-
u8 len16;
900-
901-
PDBG("%s enter\n", __func__);
902-
skb = alloc_skb(40, GFP_KERNEL);
903-
if (!skb) {
904-
printk(KERN_ERR "%s cannot send zb_read!!\n", __func__);
905-
return -ENOMEM;
906-
}
907-
set_wr_txq(skb, CPL_PRIORITY_DATA, qhp->ep->txq_idx);
908-
909-
wqe = (union t4_wr *)skb_put(skb, sizeof wqe->read);
910-
memset(wqe, 0, sizeof wqe->read);
911-
wqe->read.r2 = cpu_to_be64(0);
912-
wqe->read.stag_sink = cpu_to_be32(1);
913-
wqe->read.to_sink_hi = cpu_to_be32(0);
914-
wqe->read.to_sink_lo = cpu_to_be32(1);
915-
wqe->read.stag_src = cpu_to_be32(1);
916-
wqe->read.plen = cpu_to_be32(0);
917-
wqe->read.to_src_hi = cpu_to_be32(0);
918-
wqe->read.to_src_lo = cpu_to_be32(1);
919-
len16 = DIV_ROUND_UP(sizeof wqe->read, 16);
920-
init_wr_hdr(wqe, 0, FW_RI_RDMA_READ_WR, FW_RI_COMPLETION_FLAG, len16);
921-
922-
return c4iw_ofld_send(&qhp->rhp->rdev, skb);
923-
}
924-
925895
static void post_terminate(struct c4iw_qp *qhp, struct t4_cqe *err_cqe,
926896
gfp_t gfp)
927897
{
@@ -1029,7 +999,6 @@ static int rdma_fini(struct c4iw_dev *rhp, struct c4iw_qp *qhp,
1029999
wqe->cookie = (unsigned long) &ep->com.wr_wait;
10301000

10311001
wqe->u.fini.type = FW_RI_TYPE_FINI;
1032-
c4iw_init_wr_wait(&ep->com.wr_wait);
10331002
ret = c4iw_ofld_send(&rhp->rdev, skb);
10341003
if (ret)
10351004
goto out;
@@ -1125,7 +1094,6 @@ static int rdma_init(struct c4iw_dev *rhp, struct c4iw_qp *qhp)
11251094
if (qhp->attr.mpa_attr.initiator)
11261095
build_rtr_msg(qhp->attr.mpa_attr.p2p_type, &wqe->u.init);
11271096

1128-
c4iw_init_wr_wait(&qhp->ep->com.wr_wait);
11291097
ret = c4iw_ofld_send(&rhp->rdev, skb);
11301098
if (ret)
11311099
goto out;

drivers/infiniband/hw/ipath/ipath_driver.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -530,9 +530,8 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
530530
for (j = 0; j < 6; j++) {
531531
if (!pdev->resource[j].start)
532532
continue;
533-
ipath_cdbg(VERBOSE, "BAR %d start %llx, end %llx, len %llx\n",
534-
j, (unsigned long long)pdev->resource[j].start,
535-
(unsigned long long)pdev->resource[j].end,
533+
ipath_cdbg(VERBOSE, "BAR %d %pR, len %llx\n",
534+
j, &pdev->resource[j],
536535
(unsigned long long)pci_resource_len(pdev, j));
537536
}
538537

drivers/infiniband/hw/mlx4/cq.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,17 +397,24 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata)
397397
cq->resize_buf = NULL;
398398
cq->resize_umem = NULL;
399399
} else {
400+
struct mlx4_ib_cq_buf tmp_buf;
401+
int tmp_cqe = 0;
402+
400403
spin_lock_irq(&cq->lock);
401404
if (cq->resize_buf) {
402405
mlx4_ib_cq_resize_copy_cqes(cq);
403-
mlx4_ib_free_cq_buf(dev, &cq->buf, cq->ibcq.cqe);
406+
tmp_buf = cq->buf;
407+
tmp_cqe = cq->ibcq.cqe;
404408
cq->buf = cq->resize_buf->buf;
405409
cq->ibcq.cqe = cq->resize_buf->cqe;
406410

407411
kfree(cq->resize_buf);
408412
cq->resize_buf = NULL;
409413
}
410414
spin_unlock_irq(&cq->lock);
415+
416+
if (tmp_cqe)
417+
mlx4_ib_free_cq_buf(dev, &tmp_buf, tmp_cqe);
411418
}
412419

413420
goto out;

drivers/infiniband/hw/mlx4/mad.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ static void forward_trap(struct mlx4_ib_dev *dev, u8 port_num, struct ib_mad *ma
211211
if (agent) {
212212
send_buf = ib_create_send_mad(agent, qpn, 0, 0, IB_MGMT_MAD_HDR,
213213
IB_MGMT_MAD_DATA, GFP_ATOMIC);
214+
if (IS_ERR(send_buf))
215+
return;
214216
/*
215217
* We rely here on the fact that MLX QPs don't use the
216218
* address handle after the send is posted (this is

drivers/infiniband/hw/mthca/mthca_mad.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ static void forward_trap(struct mthca_dev *dev,
171171
if (agent) {
172172
send_buf = ib_create_send_mad(agent, qpn, 0, 0, IB_MGMT_MAD_HDR,
173173
IB_MGMT_MAD_DATA, GFP_ATOMIC);
174+
if (IS_ERR(send_buf))
175+
return;
174176
/*
175177
* We rely here on the fact that MLX QPs don't use the
176178
* address handle after the send is posted (this is

drivers/infiniband/hw/nes/nes_nic.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -908,8 +908,8 @@ static void nes_netdev_set_multicast_list(struct net_device *netdev)
908908
nesvnic->nic_index &&
909909
mc_index < max_pft_entries_avaiable) {
910910
nes_debug(NES_DBG_NIC_RX,
911-
"mc_index=%d skipping nic_index=%d,\
912-
used for=%d \n", mc_index,
911+
"mc_index=%d skipping nic_index=%d, "
912+
"used for=%d \n", mc_index,
913913
nesvnic->nic_index,
914914
nesadapter->pft_mcast_map[mc_index]);
915915
mc_index++;

0 commit comments

Comments
 (0)