···1259 */1260 ipath_cdbg(ERRPKT, "Error Pkt, but no eflags! egrbuf"1261 " %x, len %x hdrq+%x rhf: %Lx\n",1262- etail, tlen, l,1263 le64_to_cpu(*(__le64 *) rhf_addr));1264 if (ipath_debug & __IPATH_ERRPKTDBG) {1265 u32 j, *d, dw = rsize-2;···1457 0xaaaaaaaaaaaaaaaaULL); /* All BUSY bits in qword */1458 if (oldval != dd->ipath_pioavailshadow[i])1459 ipath_dbg("shadow[%d] was %Lx, now %lx\n",1460- i, oldval, dd->ipath_pioavailshadow[i]);01461 }1462 spin_unlock_irqrestore(&ipath_pioavail_lock, flags);1463}
···1259 */1260 ipath_cdbg(ERRPKT, "Error Pkt, but no eflags! egrbuf"1261 " %x, len %x hdrq+%x rhf: %Lx\n",1262+ etail, tlen, l, (unsigned long long)1263 le64_to_cpu(*(__le64 *) rhf_addr));1264 if (ipath_debug & __IPATH_ERRPKTDBG) {1265 u32 j, *d, dw = rsize-2;···1457 0xaaaaaaaaaaaaaaaaULL); /* All BUSY bits in qword */1458 if (oldval != dd->ipath_pioavailshadow[i])1459 ipath_dbg("shadow[%d] was %Lx, now %lx\n",1460+ i, (unsigned long long) oldval,1461+ dd->ipath_pioavailshadow[i]);1462 }1463 spin_unlock_irqrestore(&ipath_pioavail_lock, flags);1464}
+4-3
drivers/infiniband/hw/ipath/ipath_iba7220.c
···1032 ipath_cdbg(VERBOSE, "done: xgxs=%llx from %llx\n",1033 (unsigned long long)1034 ipath_read_kreg64(dd, dd->ipath_kregs->kr_xgxsconfig),1035- prev_val);10361037 guid = be64_to_cpu(dd->ipath_guid);1038···1042 ipath_dbg("No GUID for heartbeat, faking %llx\n",1043 (unsigned long long)guid);1044 } else1045- ipath_cdbg(VERBOSE, "Wrote %llX to HRTBT_GUID\n", guid);01046 ipath_write_kreg(dd, dd->ipath_kregs->kr_hrtbt_guid, guid);1047 return ret;1048}···2506 if (dd->ipath_flags & IPATH_IB_AUTONEG_INPROG) {2507 ipath_dbg("Did not get to DDR INIT (%x) after %Lu msecs\n",2508 ipath_ib_state(dd, dd->ipath_lastibcstat),2509- jiffies_to_msecs(jiffies)-startms);2510 dd->ipath_flags &= ~IPATH_IB_AUTONEG_INPROG;2511 if (dd->ipath_autoneg_tries == IPATH_AUTONEG_TRIES) {2512 dd->ipath_flags |= IPATH_IB_AUTONEG_FAILED;
···1032 ipath_cdbg(VERBOSE, "done: xgxs=%llx from %llx\n",1033 (unsigned long long)1034 ipath_read_kreg64(dd, dd->ipath_kregs->kr_xgxsconfig),1035+ (unsigned long long) prev_val);10361037 guid = be64_to_cpu(dd->ipath_guid);1038···1042 ipath_dbg("No GUID for heartbeat, faking %llx\n",1043 (unsigned long long)guid);1044 } else1045+ ipath_cdbg(VERBOSE, "Wrote %llX to HRTBT_GUID\n",1046+ (unsigned long long) guid);1047 ipath_write_kreg(dd, dd->ipath_kregs->kr_hrtbt_guid, guid);1048 return ret;1049}···2505 if (dd->ipath_flags & IPATH_IB_AUTONEG_INPROG) {2506 ipath_dbg("Did not get to DDR INIT (%x) after %Lu msecs\n",2507 ipath_ib_state(dd, dd->ipath_lastibcstat),2508+ (unsigned long long) jiffies_to_msecs(jiffies)-startms);2509 dd->ipath_flags &= ~IPATH_IB_AUTONEG_INPROG;2510 if (dd->ipath_autoneg_tries == IPATH_AUTONEG_TRIES) {2511 dd->ipath_flags |= IPATH_IB_AUTONEG_FAILED;
+8-4
drivers/infiniband/hw/ipath/ipath_intr.c
···356 dd->ipath_cregs->cr_iblinkerrrecovcnt);357 if (linkrecov != dd->ipath_lastlinkrecov) {358 ipath_dbg("IB linkrecov up %Lx (%s %s) recov %Lu\n",359- ibcs, ib_linkstate(dd, ibcs),0360 ipath_ibcstatus_str[ltstate],361- linkrecov);362 /* and no more until active again */363 dd->ipath_lastlinkrecov = 0;364 ipath_set_linkstate(dd, IPATH_IB_LINKDOWN);···1119 if (unlikely(istat & ~dd->ipath_i_bitsextant))1120 ipath_dev_err(dd,1121 "interrupt with unknown interrupts %Lx set\n",01122 istat & ~dd->ipath_i_bitsextant);1123 else if (istat & ~INFINIPATH_I_ERROR) /* errors do own printing */1124- ipath_cdbg(VERBOSE, "intr stat=0x%Lx\n", istat);011251126 if (istat & INFINIPATH_I_ERROR) {1127 ipath_stats.sps_errints++;···1131 dd->ipath_kregs->kr_errorstatus);1132 if (!estat)1133 dev_info(&dd->pcidev->dev, "error interrupt (%Lx), "1134- "but no error bits set!\n", istat);01135 else if (estat == -1LL)1136 /*1137 * should we try clearing all, or hope next read
···356 dd->ipath_cregs->cr_iblinkerrrecovcnt);357 if (linkrecov != dd->ipath_lastlinkrecov) {358 ipath_dbg("IB linkrecov up %Lx (%s %s) recov %Lu\n",359+ (unsigned long long) ibcs,360+ ib_linkstate(dd, ibcs),361 ipath_ibcstatus_str[ltstate],362+ (unsigned long long) linkrecov);363 /* and no more until active again */364 dd->ipath_lastlinkrecov = 0;365 ipath_set_linkstate(dd, IPATH_IB_LINKDOWN);···1118 if (unlikely(istat & ~dd->ipath_i_bitsextant))1119 ipath_dev_err(dd,1120 "interrupt with unknown interrupts %Lx set\n",1121+ (unsigned long long)1122 istat & ~dd->ipath_i_bitsextant);1123 else if (istat & ~INFINIPATH_I_ERROR) /* errors do own printing */1124+ ipath_cdbg(VERBOSE, "intr stat=0x%Lx\n",1125+ (unsigned long long) istat);11261127 if (istat & INFINIPATH_I_ERROR) {1128 ipath_stats.sps_errints++;···1128 dd->ipath_kregs->kr_errorstatus);1129 if (!estat)1130 dev_info(&dd->pcidev->dev, "error interrupt (%Lx), "1131+ "but no error bits set!\n",1132+ (unsigned long long) istat);1133 else if (estat == -1LL)1134 /*1135 * should we try clearing all, or hope next read
+3-3
drivers/infiniband/hw/ipath/ipath_verbs.c
···1021 struct ipath_verbs_txreq *tx = cookie;1022 struct ipath_qp *qp = tx->qp;1023 struct ipath_ibdev *dev = to_idev(qp->ibqp.device);1024- unsigned int flags;1025 enum ib_wc_status ibs = status == IPATH_SDMA_TXREQ_S_OK ?1026 IB_WC_SUCCESS : IB_WC_WR_FLUSH_ERR;1027···10511052static void decrement_dma_busy(struct ipath_qp *qp)1053{1054- unsigned int flags;10551056 if (atomic_dec_and_test(&qp->s_dma_busy)) {1057 spin_lock_irqsave(&qp->s_lock, flags);···1221 unsigned flush_wc;1222 u32 control;1223 int ret;1224- unsigned int flags;12251226 piobuf = ipath_getpiobuf(dd, plen, NULL);1227 if (unlikely(piobuf == NULL)) {
···1021 struct ipath_verbs_txreq *tx = cookie;1022 struct ipath_qp *qp = tx->qp;1023 struct ipath_ibdev *dev = to_idev(qp->ibqp.device);1024+ unsigned long flags;1025 enum ib_wc_status ibs = status == IPATH_SDMA_TXREQ_S_OK ?1026 IB_WC_SUCCESS : IB_WC_WR_FLUSH_ERR;1027···10511052static void decrement_dma_busy(struct ipath_qp *qp)1053{1054+ unsigned long flags;10551056 if (atomic_dec_and_test(&qp->s_dma_busy)) {1057 spin_lock_irqsave(&qp->s_lock, flags);···1221 unsigned flush_wc;1222 u32 control;1223 int ret;1224+ unsigned long flags;12251226 piobuf = ipath_getpiobuf(dd, plen, NULL);1227 if (unlikely(piobuf == NULL)) {
+16-17
drivers/infiniband/hw/mlx4/cq.c
···515 wc->vendor_err = cqe->vendor_err_syndrome;516}517518-static int mlx4_ib_ipoib_csum_ok(__be32 status, __be16 checksum)519{520- return ((status & cpu_to_be32(MLX4_CQE_IPOIB_STATUS_IPV4 |521- MLX4_CQE_IPOIB_STATUS_IPV4F |522- MLX4_CQE_IPOIB_STATUS_IPV4OPT |523- MLX4_CQE_IPOIB_STATUS_IPV6 |524- MLX4_CQE_IPOIB_STATUS_IPOK)) ==525- cpu_to_be32(MLX4_CQE_IPOIB_STATUS_IPV4 |526- MLX4_CQE_IPOIB_STATUS_IPOK)) &&527- (status & cpu_to_be32(MLX4_CQE_IPOIB_STATUS_UDP |528- MLX4_CQE_IPOIB_STATUS_TCP)) &&529 checksum == cpu_to_be16(0xffff);530}531···582 }583584 if (!*cur_qp ||585- (be32_to_cpu(cqe->my_qpn) & 0xffffff) != (*cur_qp)->mqp.qpn) {586 /*587 * We do not have to take the QP table lock here,588 * because CQs will be locked while QPs are removed589 * from the table.590 */591 mqp = __mlx4_qp_lookup(to_mdev(cq->ibcq.device)->dev,592- be32_to_cpu(cqe->my_qpn));593 if (unlikely(!mqp)) {594 printk(KERN_WARNING "CQ %06x with entry for unknown QPN %06x\n",595- cq->mcq.cqn, be32_to_cpu(cqe->my_qpn) & 0xffffff);596 return -EINVAL;597 }598···692 }693694 wc->slid = be16_to_cpu(cqe->rlid);695- wc->sl = cqe->sl >> 4;696 g_mlpath_rqpn = be32_to_cpu(cqe->g_mlpath_rqpn);697 wc->src_qp = g_mlpath_rqpn & 0xffffff;698 wc->dlid_path_bits = (g_mlpath_rqpn >> 24) & 0x7f;699 wc->wc_flags |= g_mlpath_rqpn & 0x80000000 ? IB_WC_GRH : 0;700 wc->pkey_index = be32_to_cpu(cqe->immed_rss_invalid) & 0x7f;701- wc->csum_ok = mlx4_ib_ipoib_csum_ok(cqe->ipoib_status,702- cqe->checksum);703 }704705 return 0;···766 */767 while ((int) --prod_index - (int) cq->mcq.cons_index >= 0) {768 cqe = get_cqe(cq, prod_index & cq->ibcq.cqe);769- if ((be32_to_cpu(cqe->my_qpn) & 0xffffff) == qpn) {770 if (srq && !(cqe->owner_sr_opcode & MLX4_CQE_IS_SEND_MASK))771 mlx4_ib_free_srq_wqe(srq, be16_to_cpu(cqe->wqe_index));772 ++nfreed;
···515 wc->vendor_err = cqe->vendor_err_syndrome;516}517518+static int mlx4_ib_ipoib_csum_ok(__be16 status, __be16 checksum)519{520+ return ((status & cpu_to_be16(MLX4_CQE_STATUS_IPV4 |521+ MLX4_CQE_STATUS_IPV4F |522+ MLX4_CQE_STATUS_IPV4OPT |523+ MLX4_CQE_STATUS_IPV6 |524+ MLX4_CQE_STATUS_IPOK)) ==525+ cpu_to_be16(MLX4_CQE_STATUS_IPV4 |526+ MLX4_CQE_STATUS_IPOK)) &&527+ (status & cpu_to_be16(MLX4_CQE_STATUS_UDP |528+ MLX4_CQE_STATUS_TCP)) &&529 checksum == cpu_to_be16(0xffff);530}531···582 }583584 if (!*cur_qp ||585+ (be32_to_cpu(cqe->vlan_my_qpn) & MLX4_CQE_QPN_MASK) != (*cur_qp)->mqp.qpn) {586 /*587 * We do not have to take the QP table lock here,588 * because CQs will be locked while QPs are removed589 * from the table.590 */591 mqp = __mlx4_qp_lookup(to_mdev(cq->ibcq.device)->dev,592+ be32_to_cpu(cqe->vlan_my_qpn));593 if (unlikely(!mqp)) {594 printk(KERN_WARNING "CQ %06x with entry for unknown QPN %06x\n",595+ cq->mcq.cqn, be32_to_cpu(cqe->vlan_my_qpn) & MLX4_CQE_QPN_MASK);596 return -EINVAL;597 }598···692 }693694 wc->slid = be16_to_cpu(cqe->rlid);695+ wc->sl = be16_to_cpu(cqe->sl_vid >> 12);696 g_mlpath_rqpn = be32_to_cpu(cqe->g_mlpath_rqpn);697 wc->src_qp = g_mlpath_rqpn & 0xffffff;698 wc->dlid_path_bits = (g_mlpath_rqpn >> 24) & 0x7f;699 wc->wc_flags |= g_mlpath_rqpn & 0x80000000 ? IB_WC_GRH : 0;700 wc->pkey_index = be32_to_cpu(cqe->immed_rss_invalid) & 0x7f;701+ wc->csum_ok = mlx4_ib_ipoib_csum_ok(cqe->status, cqe->checksum);0702 }703704 return 0;···767 */768 while ((int) --prod_index - (int) cq->mcq.cons_index >= 0) {769 cqe = get_cqe(cq, prod_index & cq->ibcq.cqe);770+ if ((be32_to_cpu(cqe->vlan_my_qpn) & MLX4_CQE_QPN_MASK) == qpn) {771 if (srq && !(cqe->owner_sr_opcode & MLX4_CQE_IS_SEND_MASK))772 mlx4_ib_free_srq_wqe(srq, be16_to_cpu(cqe->wqe_index));773 ++nfreed;
+1-1
drivers/infiniband/hw/mlx4/qp.c
···902 context->mtu_msgmax = (IB_MTU_4096 << 5) |903 ilog2(dev->dev->caps.max_gso_sz);904 else905- context->mtu_msgmax = (IB_MTU_4096 << 5) | 11;906 } else if (attr_mask & IB_QP_PATH_MTU) {907 if (attr->path_mtu < IB_MTU_256 || attr->path_mtu > IB_MTU_4096) {908 printk(KERN_ERR "path MTU (%u) is invalid\n",
···902 context->mtu_msgmax = (IB_MTU_4096 << 5) |903 ilog2(dev->dev->caps.max_gso_sz);904 else905+ context->mtu_msgmax = (IB_MTU_4096 << 5) | 12;906 } else if (attr_mask & IB_QP_PATH_MTU) {907 if (attr->path_mtu < IB_MTU_256 || attr->path_mtu > IB_MTU_4096) {908 printk(KERN_ERR "path MTU (%u) is invalid\n",