diff options
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_ah.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c index ac02ce4e8040..f3cc8c9e65ae 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c | |||
@@ -96,7 +96,6 @@ struct ib_ah *ocrdma_create_ah(struct ib_pd *ibpd, struct ib_ah_attr *attr) | |||
96 | struct ocrdma_pd *pd = get_ocrdma_pd(ibpd); | 96 | struct ocrdma_pd *pd = get_ocrdma_pd(ibpd); |
97 | struct ocrdma_dev *dev = get_ocrdma_dev(ibpd->device); | 97 | struct ocrdma_dev *dev = get_ocrdma_dev(ibpd->device); |
98 | union ib_gid sgid; | 98 | union ib_gid sgid; |
99 | u8 zmac[ETH_ALEN]; | ||
100 | 99 | ||
101 | if (!(attr->ah_flags & IB_AH_GRH)) | 100 | if (!(attr->ah_flags & IB_AH_GRH)) |
102 | return ERR_PTR(-EINVAL); | 101 | return ERR_PTR(-EINVAL); |
@@ -118,9 +117,7 @@ struct ib_ah *ocrdma_create_ah(struct ib_pd *ibpd, struct ib_ah_attr *attr) | |||
118 | goto av_conf_err; | 117 | goto av_conf_err; |
119 | } | 118 | } |
120 | 119 | ||
121 | memset(&zmac, 0, ETH_ALEN); | 120 | if (pd->uctx) { |
122 | if (pd->uctx && | ||
123 | memcmp(attr->dmac, &zmac, ETH_ALEN)) { | ||
124 | status = rdma_addr_find_dmac_by_grh(&sgid, &attr->grh.dgid, | 121 | status = rdma_addr_find_dmac_by_grh(&sgid, &attr->grh.dgid, |
125 | attr->dmac, &attr->vlan_id); | 122 | attr->dmac, &attr->vlan_id); |
126 | if (status) { | 123 | if (status) { |