diff options
author | David S. Miller <davem@davemloft.net> | 2011-12-02 13:49:21 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-02 13:49:21 -0500 |
commit | b3613118eb30a589d971e4eccbbb2a1314f5dfd4 (patch) | |
tree | 868c1ee59e1b5c19a4f2e43716400d0001a994e5 /drivers/infiniband/hw | |
parent | 7505afe28c16a8d386624930a018d0052c75d687 (diff) | |
parent | 5983fe2b29df5885880d7fa3b91aca306c7564ef (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch_cm.c | 4 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb4/cm.c | 10 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb4/cq.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/nes/nes_cm.c | 6 | ||||
-rw-r--r-- | drivers/infiniband/hw/qib/qib_iba7322.c | 18 | ||||
-rw-r--r-- | drivers/infiniband/hw/qib/qib_qsfp.c | 12 |
6 files changed, 27 insertions, 25 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c index de6d0774e609..c88b12beef25 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_cm.c +++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c | |||
@@ -1375,8 +1375,10 @@ static int pass_accept_req(struct t3cdev *tdev, struct sk_buff *skb, void *ctx) | |||
1375 | goto reject; | 1375 | goto reject; |
1376 | } | 1376 | } |
1377 | dst = &rt->dst; | 1377 | dst = &rt->dst; |
1378 | rcu_read_lock(); | ||
1378 | neigh = dst_get_neighbour(dst); | 1379 | neigh = dst_get_neighbour(dst); |
1379 | l2t = t3_l2t_get(tdev, neigh, neigh->dev); | 1380 | l2t = t3_l2t_get(tdev, neigh, neigh->dev); |
1381 | rcu_read_unlock(); | ||
1380 | if (!l2t) { | 1382 | if (!l2t) { |
1381 | printk(KERN_ERR MOD "%s - failed to allocate l2t entry!\n", | 1383 | printk(KERN_ERR MOD "%s - failed to allocate l2t entry!\n", |
1382 | __func__); | 1384 | __func__); |
@@ -1946,10 +1948,12 @@ int iwch_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) | |||
1946 | } | 1948 | } |
1947 | ep->dst = &rt->dst; | 1949 | ep->dst = &rt->dst; |
1948 | 1950 | ||
1951 | rcu_read_lock(); | ||
1949 | neigh = dst_get_neighbour(ep->dst); | 1952 | neigh = dst_get_neighbour(ep->dst); |
1950 | 1953 | ||
1951 | /* get a l2t entry */ | 1954 | /* get a l2t entry */ |
1952 | ep->l2t = t3_l2t_get(ep->com.tdev, neigh, neigh->dev); | 1955 | ep->l2t = t3_l2t_get(ep->com.tdev, neigh, neigh->dev); |
1956 | rcu_read_unlock(); | ||
1953 | if (!ep->l2t) { | 1957 | if (!ep->l2t) { |
1954 | printk(KERN_ERR MOD "%s - cannot alloc l2e.\n", __func__); | 1958 | printk(KERN_ERR MOD "%s - cannot alloc l2e.\n", __func__); |
1955 | err = -ENOMEM; | 1959 | err = -ENOMEM; |
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index b36cdac9c558..0747004313ad 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c | |||
@@ -542,8 +542,10 @@ static void send_mpa_req(struct c4iw_ep *ep, struct sk_buff *skb, | |||
542 | (mpa_rev_to_use == 2 ? MPA_ENHANCED_RDMA_CONN : 0); | 542 | (mpa_rev_to_use == 2 ? MPA_ENHANCED_RDMA_CONN : 0); |
543 | mpa->private_data_size = htons(ep->plen); | 543 | mpa->private_data_size = htons(ep->plen); |
544 | mpa->revision = mpa_rev_to_use; | 544 | mpa->revision = mpa_rev_to_use; |
545 | if (mpa_rev_to_use == 1) | 545 | if (mpa_rev_to_use == 1) { |
546 | ep->tried_with_mpa_v1 = 1; | 546 | ep->tried_with_mpa_v1 = 1; |
547 | ep->retry_with_mpa_v1 = 0; | ||
548 | } | ||
547 | 549 | ||
548 | if (mpa_rev_to_use == 2) { | 550 | if (mpa_rev_to_use == 2) { |
549 | mpa->private_data_size += | 551 | mpa->private_data_size += |
@@ -1594,6 +1596,7 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb) | |||
1594 | goto reject; | 1596 | goto reject; |
1595 | } | 1597 | } |
1596 | dst = &rt->dst; | 1598 | dst = &rt->dst; |
1599 | rcu_read_lock(); | ||
1597 | neigh = dst_get_neighbour(dst); | 1600 | neigh = dst_get_neighbour(dst); |
1598 | if (neigh->dev->flags & IFF_LOOPBACK) { | 1601 | if (neigh->dev->flags & IFF_LOOPBACK) { |
1599 | pdev = ip_dev_find(&init_net, peer_ip); | 1602 | pdev = ip_dev_find(&init_net, peer_ip); |
@@ -1620,6 +1623,7 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb) | |||
1620 | rss_qid = dev->rdev.lldi.rxq_ids[ | 1623 | rss_qid = dev->rdev.lldi.rxq_ids[ |
1621 | cxgb4_port_idx(neigh->dev) * step]; | 1624 | cxgb4_port_idx(neigh->dev) * step]; |
1622 | } | 1625 | } |
1626 | rcu_read_unlock(); | ||
1623 | if (!l2t) { | 1627 | if (!l2t) { |
1624 | printk(KERN_ERR MOD "%s - failed to allocate l2t entry!\n", | 1628 | printk(KERN_ERR MOD "%s - failed to allocate l2t entry!\n", |
1625 | __func__); | 1629 | __func__); |
@@ -1820,6 +1824,7 @@ static int c4iw_reconnect(struct c4iw_ep *ep) | |||
1820 | } | 1824 | } |
1821 | ep->dst = &rt->dst; | 1825 | ep->dst = &rt->dst; |
1822 | 1826 | ||
1827 | rcu_read_lock(); | ||
1823 | neigh = dst_get_neighbour(ep->dst); | 1828 | neigh = dst_get_neighbour(ep->dst); |
1824 | 1829 | ||
1825 | /* get a l2t entry */ | 1830 | /* get a l2t entry */ |
@@ -1856,6 +1861,7 @@ static int c4iw_reconnect(struct c4iw_ep *ep) | |||
1856 | ep->rss_qid = ep->com.dev->rdev.lldi.rxq_ids[ | 1861 | ep->rss_qid = ep->com.dev->rdev.lldi.rxq_ids[ |
1857 | cxgb4_port_idx(neigh->dev) * step]; | 1862 | cxgb4_port_idx(neigh->dev) * step]; |
1858 | } | 1863 | } |
1864 | rcu_read_unlock(); | ||
1859 | if (!ep->l2t) { | 1865 | if (!ep->l2t) { |
1860 | printk(KERN_ERR MOD "%s - cannot alloc l2e.\n", __func__); | 1866 | printk(KERN_ERR MOD "%s - cannot alloc l2e.\n", __func__); |
1861 | err = -ENOMEM; | 1867 | err = -ENOMEM; |
@@ -2301,6 +2307,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) | |||
2301 | } | 2307 | } |
2302 | ep->dst = &rt->dst; | 2308 | ep->dst = &rt->dst; |
2303 | 2309 | ||
2310 | rcu_read_lock(); | ||
2304 | neigh = dst_get_neighbour(ep->dst); | 2311 | neigh = dst_get_neighbour(ep->dst); |
2305 | 2312 | ||
2306 | /* get a l2t entry */ | 2313 | /* get a l2t entry */ |
@@ -2339,6 +2346,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) | |||
2339 | ep->retry_with_mpa_v1 = 0; | 2346 | ep->retry_with_mpa_v1 = 0; |
2340 | ep->tried_with_mpa_v1 = 0; | 2347 | ep->tried_with_mpa_v1 = 0; |
2341 | } | 2348 | } |
2349 | rcu_read_unlock(); | ||
2342 | if (!ep->l2t) { | 2350 | if (!ep->l2t) { |
2343 | printk(KERN_ERR MOD "%s - cannot alloc l2e.\n", __func__); | 2351 | printk(KERN_ERR MOD "%s - cannot alloc l2e.\n", __func__); |
2344 | err = -ENOMEM; | 2352 | err = -ENOMEM; |
diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c index f35a935267e7..0f1607c8325a 100644 --- a/drivers/infiniband/hw/cxgb4/cq.c +++ b/drivers/infiniband/hw/cxgb4/cq.c | |||
@@ -311,7 +311,7 @@ void c4iw_count_rcqes(struct t4_cq *cq, struct t4_wq *wq, int *count) | |||
311 | while (ptr != cq->sw_pidx) { | 311 | while (ptr != cq->sw_pidx) { |
312 | cqe = &cq->sw_queue[ptr]; | 312 | cqe = &cq->sw_queue[ptr]; |
313 | if (RQ_TYPE(cqe) && (CQE_OPCODE(cqe) != FW_RI_READ_RESP) && | 313 | if (RQ_TYPE(cqe) && (CQE_OPCODE(cqe) != FW_RI_READ_RESP) && |
314 | (CQE_QPID(cqe) == wq->rq.qid) && cqe_completes_wr(cqe, wq)) | 314 | (CQE_QPID(cqe) == wq->sq.qid) && cqe_completes_wr(cqe, wq)) |
315 | (*count)++; | 315 | (*count)++; |
316 | if (++ptr == cq->size) | 316 | if (++ptr == cq->size) |
317 | ptr = 0; | 317 | ptr = 0; |
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index dfce9ea98a39..0a52d72371ee 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c | |||
@@ -1377,9 +1377,11 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi | |||
1377 | neigh_release(neigh); | 1377 | neigh_release(neigh); |
1378 | } | 1378 | } |
1379 | 1379 | ||
1380 | if ((neigh == NULL) || (!(neigh->nud_state & NUD_VALID))) | 1380 | if ((neigh == NULL) || (!(neigh->nud_state & NUD_VALID))) { |
1381 | rcu_read_lock(); | ||
1381 | neigh_event_send(dst_get_neighbour(&rt->dst), NULL); | 1382 | neigh_event_send(dst_get_neighbour(&rt->dst), NULL); |
1382 | 1383 | rcu_read_unlock(); | |
1384 | } | ||
1383 | ip_rt_put(rt); | 1385 | ip_rt_put(rt); |
1384 | return rc; | 1386 | return rc; |
1385 | } | 1387 | } |
diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c index 5bd2162b95dc..1d5895941e19 100644 --- a/drivers/infiniband/hw/qib/qib_iba7322.c +++ b/drivers/infiniband/hw/qib/qib_iba7322.c | |||
@@ -2307,19 +2307,11 @@ static int qib_7322_bringup_serdes(struct qib_pportdata *ppd) | |||
2307 | SYM_LSB(IBCCtrlA_0, MaxPktLen); | 2307 | SYM_LSB(IBCCtrlA_0, MaxPktLen); |
2308 | ppd->cpspec->ibcctrl_a = ibc; /* without linkcmd or linkinitcmd! */ | 2308 | ppd->cpspec->ibcctrl_a = ibc; /* without linkcmd or linkinitcmd! */ |
2309 | 2309 | ||
2310 | /* initially come up waiting for TS1, without sending anything. */ | ||
2311 | val = ppd->cpspec->ibcctrl_a | (QLOGIC_IB_IBCC_LINKINITCMD_DISABLE << | ||
2312 | QLOGIC_IB_IBCC_LINKINITCMD_SHIFT); | ||
2313 | |||
2314 | ppd->cpspec->ibcctrl_a = val; | ||
2315 | /* | 2310 | /* |
2316 | * Reset the PCS interface to the serdes (and also ibc, which is still | 2311 | * Reset the PCS interface to the serdes (and also ibc, which is still |
2317 | * in reset from above). Writes new value of ibcctrl_a as last step. | 2312 | * in reset from above). Writes new value of ibcctrl_a as last step. |
2318 | */ | 2313 | */ |
2319 | qib_7322_mini_pcs_reset(ppd); | 2314 | qib_7322_mini_pcs_reset(ppd); |
2320 | qib_write_kreg(dd, kr_scratch, 0ULL); | ||
2321 | /* clear the linkinit cmds */ | ||
2322 | ppd->cpspec->ibcctrl_a &= ~SYM_MASK(IBCCtrlA_0, LinkInitCmd); | ||
2323 | 2315 | ||
2324 | if (!ppd->cpspec->ibcctrl_b) { | 2316 | if (!ppd->cpspec->ibcctrl_b) { |
2325 | unsigned lse = ppd->link_speed_enabled; | 2317 | unsigned lse = ppd->link_speed_enabled; |
@@ -2385,6 +2377,14 @@ static int qib_7322_bringup_serdes(struct qib_pportdata *ppd) | |||
2385 | ppd->cpspec->ibcctrl_a |= SYM_MASK(IBCCtrlA_0, IBLinkEn); | 2377 | ppd->cpspec->ibcctrl_a |= SYM_MASK(IBCCtrlA_0, IBLinkEn); |
2386 | set_vls(ppd); | 2378 | set_vls(ppd); |
2387 | 2379 | ||
2380 | /* initially come up DISABLED, without sending anything. */ | ||
2381 | val = ppd->cpspec->ibcctrl_a | (QLOGIC_IB_IBCC_LINKINITCMD_DISABLE << | ||
2382 | QLOGIC_IB_IBCC_LINKINITCMD_SHIFT); | ||
2383 | qib_write_kreg_port(ppd, krp_ibcctrl_a, val); | ||
2384 | qib_write_kreg(dd, kr_scratch, 0ULL); | ||
2385 | /* clear the linkinit cmds */ | ||
2386 | ppd->cpspec->ibcctrl_a = val & ~SYM_MASK(IBCCtrlA_0, LinkInitCmd); | ||
2387 | |||
2388 | /* be paranoid against later code motion, etc. */ | 2388 | /* be paranoid against later code motion, etc. */ |
2389 | spin_lock_irqsave(&dd->cspec->rcvmod_lock, flags); | 2389 | spin_lock_irqsave(&dd->cspec->rcvmod_lock, flags); |
2390 | ppd->p_rcvctrl |= SYM_MASK(RcvCtrl_0, RcvIBPortEnable); | 2390 | ppd->p_rcvctrl |= SYM_MASK(RcvCtrl_0, RcvIBPortEnable); |
@@ -5241,7 +5241,7 @@ static int qib_7322_ib_updown(struct qib_pportdata *ppd, int ibup, u64 ibcs) | |||
5241 | off */ | 5241 | off */ |
5242 | if (ppd->dd->flags & QIB_HAS_QSFP) { | 5242 | if (ppd->dd->flags & QIB_HAS_QSFP) { |
5243 | qd->t_insert = get_jiffies_64(); | 5243 | qd->t_insert = get_jiffies_64(); |
5244 | schedule_work(&qd->work); | 5244 | queue_work(ib_wq, &qd->work); |
5245 | } | 5245 | } |
5246 | spin_lock_irqsave(&ppd->sdma_lock, flags); | 5246 | spin_lock_irqsave(&ppd->sdma_lock, flags); |
5247 | if (__qib_sdma_running(ppd)) | 5247 | if (__qib_sdma_running(ppd)) |
diff --git a/drivers/infiniband/hw/qib/qib_qsfp.c b/drivers/infiniband/hw/qib/qib_qsfp.c index e06c4ed383f1..fa71b1e666c5 100644 --- a/drivers/infiniband/hw/qib/qib_qsfp.c +++ b/drivers/infiniband/hw/qib/qib_qsfp.c | |||
@@ -480,18 +480,6 @@ void qib_qsfp_init(struct qib_qsfp_data *qd, | |||
480 | udelay(20); /* Generous RST dwell */ | 480 | udelay(20); /* Generous RST dwell */ |
481 | 481 | ||
482 | dd->f_gpio_mod(dd, mask, mask, mask); | 482 | dd->f_gpio_mod(dd, mask, mask, mask); |
483 | /* Spec says module can take up to two seconds! */ | ||
484 | mask = QSFP_GPIO_MOD_PRS_N; | ||
485 | if (qd->ppd->hw_pidx) | ||
486 | mask <<= QSFP_GPIO_PORT2_SHIFT; | ||
487 | |||
488 | /* Do not try to wait here. Better to let event handle it */ | ||
489 | if (!qib_qsfp_mod_present(qd->ppd)) | ||
490 | goto bail; | ||
491 | /* We see a module, but it may be unwise to look yet. Just schedule */ | ||
492 | qd->t_insert = get_jiffies_64(); | ||
493 | queue_work(ib_wq, &qd->work); | ||
494 | bail: | ||
495 | return; | 483 | return; |
496 | } | 484 | } |
497 | 485 | ||