diff options
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_verbs.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_verbs.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c index 2aaacdb7e52a..18c6df2052c2 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs.c | |||
@@ -438,6 +438,10 @@ void ipath_ib_rcv(struct ipath_ibdev *dev, void *rhdr, void *data, | |||
438 | struct ipath_mcast *mcast; | 438 | struct ipath_mcast *mcast; |
439 | struct ipath_mcast_qp *p; | 439 | struct ipath_mcast_qp *p; |
440 | 440 | ||
441 | if (lnh != IPATH_LRH_GRH) { | ||
442 | dev->n_pkt_drops++; | ||
443 | goto bail; | ||
444 | } | ||
441 | mcast = ipath_mcast_find(&hdr->u.l.grh.dgid); | 445 | mcast = ipath_mcast_find(&hdr->u.l.grh.dgid); |
442 | if (mcast == NULL) { | 446 | if (mcast == NULL) { |
443 | dev->n_pkt_drops++; | 447 | dev->n_pkt_drops++; |
@@ -445,8 +449,7 @@ void ipath_ib_rcv(struct ipath_ibdev *dev, void *rhdr, void *data, | |||
445 | } | 449 | } |
446 | dev->n_multicast_rcv++; | 450 | dev->n_multicast_rcv++; |
447 | list_for_each_entry_rcu(p, &mcast->qp_list, list) | 451 | list_for_each_entry_rcu(p, &mcast->qp_list, list) |
448 | ipath_qp_rcv(dev, hdr, lnh == IPATH_LRH_GRH, data, | 452 | ipath_qp_rcv(dev, hdr, 1, data, tlen, p->qp); |
449 | tlen, p->qp); | ||
450 | /* | 453 | /* |
451 | * Notify ipath_multicast_detach() if it is waiting for us | 454 | * Notify ipath_multicast_detach() if it is waiting for us |
452 | * to finish. | 455 | * to finish. |
@@ -773,7 +776,6 @@ int ipath_verbs_send(struct ipath_devdata *dd, u32 hdrwords, | |||
773 | /* +1 is for the qword padding of pbc */ | 776 | /* +1 is for the qword padding of pbc */ |
774 | plen = hdrwords + ((len + 3) >> 2) + 1; | 777 | plen = hdrwords + ((len + 3) >> 2) + 1; |
775 | if (unlikely((plen << 2) > dd->ipath_ibmaxlen)) { | 778 | if (unlikely((plen << 2) > dd->ipath_ibmaxlen)) { |
776 | ipath_dbg("packet len 0x%x too long, failing\n", plen); | ||
777 | ret = -EINVAL; | 779 | ret = -EINVAL; |
778 | goto bail; | 780 | goto bail; |
779 | } | 781 | } |
@@ -980,14 +982,14 @@ static int ipath_query_device(struct ib_device *ibdev, | |||
980 | props->max_cqe = ib_ipath_max_cqes; | 982 | props->max_cqe = ib_ipath_max_cqes; |
981 | props->max_mr = dev->lk_table.max; | 983 | props->max_mr = dev->lk_table.max; |
982 | props->max_pd = ib_ipath_max_pds; | 984 | props->max_pd = ib_ipath_max_pds; |
983 | props->max_qp_rd_atom = 1; | 985 | props->max_qp_rd_atom = IPATH_MAX_RDMA_ATOMIC; |
984 | props->max_qp_init_rd_atom = 1; | 986 | props->max_qp_init_rd_atom = 255; |
985 | /* props->max_res_rd_atom */ | 987 | /* props->max_res_rd_atom */ |
986 | props->max_srq = ib_ipath_max_srqs; | 988 | props->max_srq = ib_ipath_max_srqs; |
987 | props->max_srq_wr = ib_ipath_max_srq_wrs; | 989 | props->max_srq_wr = ib_ipath_max_srq_wrs; |
988 | props->max_srq_sge = ib_ipath_max_srq_sges; | 990 | props->max_srq_sge = ib_ipath_max_srq_sges; |
989 | /* props->local_ca_ack_delay */ | 991 | /* props->local_ca_ack_delay */ |
990 | props->atomic_cap = IB_ATOMIC_HCA; | 992 | props->atomic_cap = IB_ATOMIC_GLOB; |
991 | props->max_pkeys = ipath_get_npkeys(dev->dd); | 993 | props->max_pkeys = ipath_get_npkeys(dev->dd); |
992 | props->max_mcast_grp = ib_ipath_max_mcast_grps; | 994 | props->max_mcast_grp = ib_ipath_max_mcast_grps; |
993 | props->max_mcast_qp_attach = ib_ipath_max_mcast_qp_attached; | 995 | props->max_mcast_qp_attach = ib_ipath_max_mcast_qp_attached; |
@@ -1557,7 +1559,6 @@ int ipath_register_ib_device(struct ipath_devdata *dd) | |||
1557 | dev->node_type = RDMA_NODE_IB_CA; | 1559 | dev->node_type = RDMA_NODE_IB_CA; |
1558 | dev->phys_port_cnt = 1; | 1560 | dev->phys_port_cnt = 1; |
1559 | dev->dma_device = &dd->pcidev->dev; | 1561 | dev->dma_device = &dd->pcidev->dev; |
1560 | dev->class_dev.dev = dev->dma_device; | ||
1561 | dev->query_device = ipath_query_device; | 1562 | dev->query_device = ipath_query_device; |
1562 | dev->modify_device = ipath_modify_device; | 1563 | dev->modify_device = ipath_modify_device; |
1563 | dev->query_port = ipath_query_port; | 1564 | dev->query_port = ipath_query_port; |