diff options
Diffstat (limited to 'drivers/infiniband/hw/cxgb3/iwch_cm.c')
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch_cm.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c index 0a5008fbebac..17bf9d95463c 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_cm.c +++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c | |||
@@ -1328,6 +1328,7 @@ static int pass_accept_req(struct t3cdev *tdev, struct sk_buff *skb, void *ctx) | |||
1328 | struct iwch_ep *child_ep, *parent_ep = ctx; | 1328 | struct iwch_ep *child_ep, *parent_ep = ctx; |
1329 | struct cpl_pass_accept_req *req = cplhdr(skb); | 1329 | struct cpl_pass_accept_req *req = cplhdr(skb); |
1330 | unsigned int hwtid = GET_TID(req); | 1330 | unsigned int hwtid = GET_TID(req); |
1331 | struct neighbour *neigh; | ||
1331 | struct dst_entry *dst; | 1332 | struct dst_entry *dst; |
1332 | struct l2t_entry *l2t; | 1333 | struct l2t_entry *l2t; |
1333 | struct rtable *rt; | 1334 | struct rtable *rt; |
@@ -1364,7 +1365,8 @@ static int pass_accept_req(struct t3cdev *tdev, struct sk_buff *skb, void *ctx) | |||
1364 | goto reject; | 1365 | goto reject; |
1365 | } | 1366 | } |
1366 | dst = &rt->dst; | 1367 | dst = &rt->dst; |
1367 | l2t = t3_l2t_get(tdev, dst->neighbour, dst->neighbour->dev); | 1368 | neigh = dst_get_neighbour(dst); |
1369 | l2t = t3_l2t_get(tdev, neigh, neigh->dev); | ||
1368 | if (!l2t) { | 1370 | if (!l2t) { |
1369 | printk(KERN_ERR MOD "%s - failed to allocate l2t entry!\n", | 1371 | printk(KERN_ERR MOD "%s - failed to allocate l2t entry!\n", |
1370 | __func__); | 1372 | __func__); |
@@ -1874,10 +1876,11 @@ static int is_loopback_dst(struct iw_cm_id *cm_id) | |||
1874 | 1876 | ||
1875 | int iwch_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) | 1877 | int iwch_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) |
1876 | { | 1878 | { |
1877 | int err = 0; | ||
1878 | struct iwch_dev *h = to_iwch_dev(cm_id->device); | 1879 | struct iwch_dev *h = to_iwch_dev(cm_id->device); |
1880 | struct neighbour *neigh; | ||
1879 | struct iwch_ep *ep; | 1881 | struct iwch_ep *ep; |
1880 | struct rtable *rt; | 1882 | struct rtable *rt; |
1883 | int err = 0; | ||
1881 | 1884 | ||
1882 | if (is_loopback_dst(cm_id)) { | 1885 | if (is_loopback_dst(cm_id)) { |
1883 | err = -ENOSYS; | 1886 | err = -ENOSYS; |
@@ -1933,9 +1936,10 @@ int iwch_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) | |||
1933 | } | 1936 | } |
1934 | ep->dst = &rt->dst; | 1937 | ep->dst = &rt->dst; |
1935 | 1938 | ||
1939 | neigh = dst_get_neighbour(ep->dst); | ||
1940 | |||
1936 | /* get a l2t entry */ | 1941 | /* get a l2t entry */ |
1937 | ep->l2t = t3_l2t_get(ep->com.tdev, ep->dst->neighbour, | 1942 | ep->l2t = t3_l2t_get(ep->com.tdev, neigh, neigh->dev); |
1938 | ep->dst->neighbour->dev); | ||
1939 | if (!ep->l2t) { | 1943 | if (!ep->l2t) { |
1940 | printk(KERN_ERR MOD "%s - cannot alloc l2e.\n", __func__); | 1944 | printk(KERN_ERR MOD "%s - cannot alloc l2e.\n", __func__); |
1941 | err = -ENOMEM; | 1945 | err = -ENOMEM; |