Loading drivers/infiniband/core/cma.c +2 −1 Original line number Diff line number Diff line Loading @@ -2851,7 +2851,8 @@ static int cma_bind_addr(struct rdma_cm_id *id, struct sockaddr *src_addr, if (!src_addr || !src_addr->sa_family) { src_addr = (struct sockaddr *) &id->route.addr.src_addr; src_addr->sa_family = dst_addr->sa_family; if (dst_addr->sa_family == AF_INET6) { if (IS_ENABLED(CONFIG_IPV6) && dst_addr->sa_family == AF_INET6) { struct sockaddr_in6 *src_addr6 = (struct sockaddr_in6 *) src_addr; struct sockaddr_in6 *dst_addr6 = (struct sockaddr_in6 *) dst_addr; src_addr6->sin6_scope_id = dst_addr6->sin6_scope_id; Loading drivers/infiniband/core/umem.c +2 −0 Original line number Diff line number Diff line Loading @@ -134,6 +134,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr, IB_ACCESS_REMOTE_ATOMIC | IB_ACCESS_MW_BIND)); if (access & IB_ACCESS_ON_DEMAND) { put_pid(umem->pid); ret = ib_umem_odp_get(context, umem); if (ret) { kfree(umem); Loading @@ -149,6 +150,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr, page_list = (struct page **) __get_free_page(GFP_KERNEL); if (!page_list) { put_pid(umem->pid); kfree(umem); return ERR_PTR(-ENOMEM); } Loading drivers/infiniband/hw/cxgb3/iwch_provider.c +1 −10 Original line number Diff line number Diff line Loading @@ -1135,16 +1135,7 @@ static int iwch_query_port(struct ib_device *ibdev, memset(props, 0, sizeof(struct ib_port_attr)); props->max_mtu = IB_MTU_4096; if (netdev->mtu >= 4096) props->active_mtu = IB_MTU_4096; else if (netdev->mtu >= 2048) props->active_mtu = IB_MTU_2048; else if (netdev->mtu >= 1024) props->active_mtu = IB_MTU_1024; else if (netdev->mtu >= 512) props->active_mtu = IB_MTU_512; else props->active_mtu = IB_MTU_256; props->active_mtu = ib_mtu_int_to_enum(netdev->mtu); if (!netif_carrier_ok(netdev)) props->state = IB_PORT_DOWN; Loading drivers/infiniband/hw/cxgb4/cm.c +4 −3 Original line number Diff line number Diff line Loading @@ -1804,20 +1804,21 @@ static int rx_data(struct c4iw_dev *dev, struct sk_buff *skb) skb_trim(skb, dlen); mutex_lock(&ep->com.mutex); /* update RX credits */ update_rx_credits(ep, dlen); switch (ep->com.state) { case MPA_REQ_SENT: update_rx_credits(ep, dlen); ep->rcv_seq += dlen; disconnect = process_mpa_reply(ep, skb); break; case MPA_REQ_WAIT: update_rx_credits(ep, dlen); ep->rcv_seq += dlen; disconnect = process_mpa_request(ep, skb); break; case FPDU_MODE: { struct c4iw_qp_attributes attrs; update_rx_credits(ep, dlen); BUG_ON(!ep->com.qp); if (status) pr_err("%s Unexpected streaming data." \ Loading drivers/infiniband/hw/cxgb4/cq.c +13 −8 Original line number Diff line number Diff line Loading @@ -504,6 +504,15 @@ static int poll_cq(struct t4_wq *wq, struct t4_cq *cq, struct t4_cqe *cqe, goto skip_cqe; } /* * Special cqe for drain WR completions... */ if (CQE_OPCODE(hw_cqe) == C4IW_DRAIN_OPCODE) { *cookie = CQE_DRAIN_COOKIE(hw_cqe); *cqe = *hw_cqe; goto skip_cqe; } /* * Gotta tweak READ completions: * 1) the cqe doesn't contain the sq_wptr from the wr. Loading Loading @@ -753,6 +762,9 @@ static int c4iw_poll_cq_one(struct c4iw_cq *chp, struct ib_wc *wc) c4iw_invalidate_mr(qhp->rhp, CQE_WRID_FR_STAG(&cqe)); break; case C4IW_DRAIN_OPCODE: wc->opcode = IB_WC_SEND; break; default: printk(KERN_ERR MOD "Unexpected opcode %d " "in the CQE received for QPID=0x%0x\n", Loading Loading @@ -817,15 +829,8 @@ static int c4iw_poll_cq_one(struct c4iw_cq *chp, struct ib_wc *wc) } } out: if (wq) { if (unlikely(qhp->attr.state != C4IW_QP_STATE_RTS)) { if (t4_sq_empty(wq)) complete(&qhp->sq_drained); if (t4_rq_empty(wq)) complete(&qhp->rq_drained); } if (wq) spin_unlock(&qhp->lock); } return ret; } Loading Loading
drivers/infiniband/core/cma.c +2 −1 Original line number Diff line number Diff line Loading @@ -2851,7 +2851,8 @@ static int cma_bind_addr(struct rdma_cm_id *id, struct sockaddr *src_addr, if (!src_addr || !src_addr->sa_family) { src_addr = (struct sockaddr *) &id->route.addr.src_addr; src_addr->sa_family = dst_addr->sa_family; if (dst_addr->sa_family == AF_INET6) { if (IS_ENABLED(CONFIG_IPV6) && dst_addr->sa_family == AF_INET6) { struct sockaddr_in6 *src_addr6 = (struct sockaddr_in6 *) src_addr; struct sockaddr_in6 *dst_addr6 = (struct sockaddr_in6 *) dst_addr; src_addr6->sin6_scope_id = dst_addr6->sin6_scope_id; Loading
drivers/infiniband/core/umem.c +2 −0 Original line number Diff line number Diff line Loading @@ -134,6 +134,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr, IB_ACCESS_REMOTE_ATOMIC | IB_ACCESS_MW_BIND)); if (access & IB_ACCESS_ON_DEMAND) { put_pid(umem->pid); ret = ib_umem_odp_get(context, umem); if (ret) { kfree(umem); Loading @@ -149,6 +150,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr, page_list = (struct page **) __get_free_page(GFP_KERNEL); if (!page_list) { put_pid(umem->pid); kfree(umem); return ERR_PTR(-ENOMEM); } Loading
drivers/infiniband/hw/cxgb3/iwch_provider.c +1 −10 Original line number Diff line number Diff line Loading @@ -1135,16 +1135,7 @@ static int iwch_query_port(struct ib_device *ibdev, memset(props, 0, sizeof(struct ib_port_attr)); props->max_mtu = IB_MTU_4096; if (netdev->mtu >= 4096) props->active_mtu = IB_MTU_4096; else if (netdev->mtu >= 2048) props->active_mtu = IB_MTU_2048; else if (netdev->mtu >= 1024) props->active_mtu = IB_MTU_1024; else if (netdev->mtu >= 512) props->active_mtu = IB_MTU_512; else props->active_mtu = IB_MTU_256; props->active_mtu = ib_mtu_int_to_enum(netdev->mtu); if (!netif_carrier_ok(netdev)) props->state = IB_PORT_DOWN; Loading
drivers/infiniband/hw/cxgb4/cm.c +4 −3 Original line number Diff line number Diff line Loading @@ -1804,20 +1804,21 @@ static int rx_data(struct c4iw_dev *dev, struct sk_buff *skb) skb_trim(skb, dlen); mutex_lock(&ep->com.mutex); /* update RX credits */ update_rx_credits(ep, dlen); switch (ep->com.state) { case MPA_REQ_SENT: update_rx_credits(ep, dlen); ep->rcv_seq += dlen; disconnect = process_mpa_reply(ep, skb); break; case MPA_REQ_WAIT: update_rx_credits(ep, dlen); ep->rcv_seq += dlen; disconnect = process_mpa_request(ep, skb); break; case FPDU_MODE: { struct c4iw_qp_attributes attrs; update_rx_credits(ep, dlen); BUG_ON(!ep->com.qp); if (status) pr_err("%s Unexpected streaming data." \ Loading
drivers/infiniband/hw/cxgb4/cq.c +13 −8 Original line number Diff line number Diff line Loading @@ -504,6 +504,15 @@ static int poll_cq(struct t4_wq *wq, struct t4_cq *cq, struct t4_cqe *cqe, goto skip_cqe; } /* * Special cqe for drain WR completions... */ if (CQE_OPCODE(hw_cqe) == C4IW_DRAIN_OPCODE) { *cookie = CQE_DRAIN_COOKIE(hw_cqe); *cqe = *hw_cqe; goto skip_cqe; } /* * Gotta tweak READ completions: * 1) the cqe doesn't contain the sq_wptr from the wr. Loading Loading @@ -753,6 +762,9 @@ static int c4iw_poll_cq_one(struct c4iw_cq *chp, struct ib_wc *wc) c4iw_invalidate_mr(qhp->rhp, CQE_WRID_FR_STAG(&cqe)); break; case C4IW_DRAIN_OPCODE: wc->opcode = IB_WC_SEND; break; default: printk(KERN_ERR MOD "Unexpected opcode %d " "in the CQE received for QPID=0x%0x\n", Loading Loading @@ -817,15 +829,8 @@ static int c4iw_poll_cq_one(struct c4iw_cq *chp, struct ib_wc *wc) } } out: if (wq) { if (unlikely(qhp->attr.state != C4IW_QP_STATE_RTS)) { if (t4_sq_empty(wq)) complete(&qhp->sq_drained); if (t4_rq_empty(wq)) complete(&qhp->rq_drained); } if (wq) spin_unlock(&qhp->lock); } return ret; } Loading