aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_verbs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_verbs.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_verbs.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c
index 13aba3d40543..74f77e7c2c1b 100644
--- a/drivers/infiniband/hw/ipath/ipath_verbs.c
+++ b/drivers/infiniband/hw/ipath/ipath_verbs.c
@@ -948,6 +948,7 @@ bail:
948int ipath_verbs_send(struct ipath_qp *qp, struct ipath_ib_header *hdr, 948int ipath_verbs_send(struct ipath_qp *qp, struct ipath_ib_header *hdr,
949 u32 hdrwords, struct ipath_sge_state *ss, u32 len) 949 u32 hdrwords, struct ipath_sge_state *ss, u32 len)
950{ 950{
951 struct ipath_devdata *dd = to_idev(qp->ibqp.device)->dd;
951 u32 plen; 952 u32 plen;
952 int ret; 953 int ret;
953 u32 dwords = (len + 3) >> 2; 954 u32 dwords = (len + 3) >> 2;
@@ -955,8 +956,15 @@ int ipath_verbs_send(struct ipath_qp *qp, struct ipath_ib_header *hdr,
955 /* +1 is for the qword padding of pbc */ 956 /* +1 is for the qword padding of pbc */
956 plen = hdrwords + dwords + 1; 957 plen = hdrwords + dwords + 1;
957 958
958 ret = ipath_verbs_send_pio(qp, (u32 *) hdr, hdrwords, 959 /* Drop non-VL15 packets if we are not in the active state */
959 ss, len, plen, dwords); 960 if (!(dd->ipath_flags & IPATH_LINKACTIVE) &&
961 qp->ibqp.qp_type != IB_QPT_SMI) {
962 if (qp->s_wqe)
963 ipath_send_complete(qp, qp->s_wqe, IB_WC_SUCCESS);
964 ret = 0;
965 } else
966 ret = ipath_verbs_send_pio(qp, (u32 *) hdr, hdrwords,
967 ss, len, plen, dwords);
960 968
961 return ret; 969 return ret;
962} 970}