diff options
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch_provider.c | 5 | ||||
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_irq.c | 8 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_fs.c | 16 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_cm.c | 4 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_ib.c | 4 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 4 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 6 |
7 files changed, 36 insertions, 11 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c index f2774ae906bf..24e0df04f7db 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_provider.c +++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c | |||
@@ -545,11 +545,14 @@ static int iwch_reregister_phys_mem(struct ib_mr *mr, | |||
545 | php = to_iwch_pd(pd); | 545 | php = to_iwch_pd(pd); |
546 | if (mr_rereg_mask & IB_MR_REREG_ACCESS) | 546 | if (mr_rereg_mask & IB_MR_REREG_ACCESS) |
547 | mh.attr.perms = iwch_ib_to_tpt_access(acc); | 547 | mh.attr.perms = iwch_ib_to_tpt_access(acc); |
548 | if (mr_rereg_mask & IB_MR_REREG_TRANS) | 548 | if (mr_rereg_mask & IB_MR_REREG_TRANS) { |
549 | ret = build_phys_page_list(buffer_list, num_phys_buf, | 549 | ret = build_phys_page_list(buffer_list, num_phys_buf, |
550 | iova_start, | 550 | iova_start, |
551 | &total_size, &npages, | 551 | &total_size, &npages, |
552 | &shift, &page_list); | 552 | &shift, &page_list); |
553 | if (ret) | ||
554 | return ret; | ||
555 | } | ||
553 | 556 | ||
554 | ret = iwch_reregister_mem(rhp, php, &mh, shift, page_list, npages); | 557 | ret = iwch_reregister_mem(rhp, php, &mh, shift, page_list, npages); |
555 | kfree(page_list); | 558 | kfree(page_list); |
diff --git a/drivers/infiniband/hw/ehca/ehca_irq.c b/drivers/infiniband/hw/ehca/ehca_irq.c index 20f36bf8b2b6..f284be1c9166 100644 --- a/drivers/infiniband/hw/ehca/ehca_irq.c +++ b/drivers/infiniband/hw/ehca/ehca_irq.c | |||
@@ -66,7 +66,9 @@ | |||
66 | static void queue_comp_task(struct ehca_cq *__cq); | 66 | static void queue_comp_task(struct ehca_cq *__cq); |
67 | 67 | ||
68 | static struct ehca_comp_pool* pool; | 68 | static struct ehca_comp_pool* pool; |
69 | #ifdef CONFIG_HOTPLUG_CPU | ||
69 | static struct notifier_block comp_pool_callback_nb; | 70 | static struct notifier_block comp_pool_callback_nb; |
71 | #endif | ||
70 | 72 | ||
71 | static inline void comp_event_callback(struct ehca_cq *cq) | 73 | static inline void comp_event_callback(struct ehca_cq *cq) |
72 | { | 74 | { |
@@ -733,6 +735,7 @@ static void take_over_work(struct ehca_comp_pool *pool, | |||
733 | 735 | ||
734 | } | 736 | } |
735 | 737 | ||
738 | #ifdef CONFIG_HOTPLUG_CPU | ||
736 | static int comp_pool_callback(struct notifier_block *nfb, | 739 | static int comp_pool_callback(struct notifier_block *nfb, |
737 | unsigned long action, | 740 | unsigned long action, |
738 | void *hcpu) | 741 | void *hcpu) |
@@ -775,6 +778,7 @@ static int comp_pool_callback(struct notifier_block *nfb, | |||
775 | 778 | ||
776 | return NOTIFY_OK; | 779 | return NOTIFY_OK; |
777 | } | 780 | } |
781 | #endif | ||
778 | 782 | ||
779 | int ehca_create_comp_pool(void) | 783 | int ehca_create_comp_pool(void) |
780 | { | 784 | { |
@@ -805,9 +809,11 @@ int ehca_create_comp_pool(void) | |||
805 | } | 809 | } |
806 | } | 810 | } |
807 | 811 | ||
812 | #ifdef CONFIG_HOTPLUG_CPU | ||
808 | comp_pool_callback_nb.notifier_call = comp_pool_callback; | 813 | comp_pool_callback_nb.notifier_call = comp_pool_callback; |
809 | comp_pool_callback_nb.priority =0; | 814 | comp_pool_callback_nb.priority =0; |
810 | register_cpu_notifier(&comp_pool_callback_nb); | 815 | register_cpu_notifier(&comp_pool_callback_nb); |
816 | #endif | ||
811 | 817 | ||
812 | printk(KERN_INFO "eHCA scaling code enabled\n"); | 818 | printk(KERN_INFO "eHCA scaling code enabled\n"); |
813 | 819 | ||
@@ -821,7 +827,9 @@ void ehca_destroy_comp_pool(void) | |||
821 | if (!ehca_scaling_code) | 827 | if (!ehca_scaling_code) |
822 | return; | 828 | return; |
823 | 829 | ||
830 | #ifdef CONFIG_HOTPLUG_CPU | ||
824 | unregister_cpu_notifier(&comp_pool_callback_nb); | 831 | unregister_cpu_notifier(&comp_pool_callback_nb); |
832 | #endif | ||
825 | 833 | ||
826 | for (i = 0; i < NR_CPUS; i++) { | 834 | for (i = 0; i < NR_CPUS; i++) { |
827 | if (cpu_online(i)) | 835 | if (cpu_online(i)) |
diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c index 5b40a846ff95..ed55979bfd34 100644 --- a/drivers/infiniband/hw/ipath/ipath_fs.c +++ b/drivers/infiniband/hw/ipath/ipath_fs.c | |||
@@ -451,12 +451,18 @@ bail: | |||
451 | return ret; | 451 | return ret; |
452 | } | 452 | } |
453 | 453 | ||
454 | static void remove_file(struct dentry *parent, char *name) | 454 | static int remove_file(struct dentry *parent, char *name) |
455 | { | 455 | { |
456 | struct dentry *tmp; | 456 | struct dentry *tmp; |
457 | int ret; | ||
457 | 458 | ||
458 | tmp = lookup_one_len(name, parent, strlen(name)); | 459 | tmp = lookup_one_len(name, parent, strlen(name)); |
459 | 460 | ||
461 | if (IS_ERR(tmp)) { | ||
462 | ret = PTR_ERR(tmp); | ||
463 | goto bail; | ||
464 | } | ||
465 | |||
460 | spin_lock(&dcache_lock); | 466 | spin_lock(&dcache_lock); |
461 | spin_lock(&tmp->d_lock); | 467 | spin_lock(&tmp->d_lock); |
462 | if (!(d_unhashed(tmp) && tmp->d_inode)) { | 468 | if (!(d_unhashed(tmp) && tmp->d_inode)) { |
@@ -469,6 +475,14 @@ static void remove_file(struct dentry *parent, char *name) | |||
469 | spin_unlock(&tmp->d_lock); | 475 | spin_unlock(&tmp->d_lock); |
470 | spin_unlock(&dcache_lock); | 476 | spin_unlock(&dcache_lock); |
471 | } | 477 | } |
478 | |||
479 | ret = 0; | ||
480 | bail: | ||
481 | /* | ||
482 | * We don't expect clients to care about the return value, but | ||
483 | * it's there if they need it. | ||
484 | */ | ||
485 | return ret; | ||
472 | } | 486 | } |
473 | 487 | ||
474 | static int remove_device_files(struct super_block *sb, | 488 | static int remove_device_files(struct super_block *sb, |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c index 3484e8ba24a4..e70492db74f6 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c | |||
@@ -452,7 +452,7 @@ void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_ | |||
452 | skb->len, tx->mtu); | 452 | skb->len, tx->mtu); |
453 | ++priv->stats.tx_dropped; | 453 | ++priv->stats.tx_dropped; |
454 | ++priv->stats.tx_errors; | 454 | ++priv->stats.tx_errors; |
455 | ipoib_cm_skb_too_long(dev, skb, tx->mtu - INFINIBAND_ALEN); | 455 | ipoib_cm_skb_too_long(dev, skb, tx->mtu - IPOIB_ENCAP_LEN); |
456 | return; | 456 | return; |
457 | } | 457 | } |
458 | 458 | ||
@@ -1095,7 +1095,7 @@ static void ipoib_cm_stale_task(struct work_struct *work) | |||
1095 | /* List if sorted by LRU, start from tail, | 1095 | /* List if sorted by LRU, start from tail, |
1096 | * stop when we see a recently used entry */ | 1096 | * stop when we see a recently used entry */ |
1097 | p = list_entry(priv->cm.passive_ids.prev, typeof(*p), list); | 1097 | p = list_entry(priv->cm.passive_ids.prev, typeof(*p), list); |
1098 | if (time_after_eq(jiffies, p->jiffies + IPOIB_CM_RX_TIMEOUT)) | 1098 | if (time_before_eq(jiffies, p->jiffies + IPOIB_CM_RX_TIMEOUT)) |
1099 | break; | 1099 | break; |
1100 | list_del_init(&p->list); | 1100 | list_del_init(&p->list); |
1101 | spin_unlock_irqrestore(&priv->lock, flags); | 1101 | spin_unlock_irqrestore(&priv->lock, flags); |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c index f2aa923ddbea..ba0ee5cf2ad7 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c | |||
@@ -328,9 +328,9 @@ void ipoib_send(struct net_device *dev, struct sk_buff *skb, | |||
328 | struct ipoib_tx_buf *tx_req; | 328 | struct ipoib_tx_buf *tx_req; |
329 | u64 addr; | 329 | u64 addr; |
330 | 330 | ||
331 | if (unlikely(skb->len > priv->mcast_mtu + INFINIBAND_ALEN)) { | 331 | if (unlikely(skb->len > priv->mcast_mtu + IPOIB_ENCAP_LEN)) { |
332 | ipoib_warn(priv, "packet len %d (> %d) too long to send, dropping\n", | 332 | ipoib_warn(priv, "packet len %d (> %d) too long to send, dropping\n", |
333 | skb->len, priv->mcast_mtu + INFINIBAND_ALEN); | 333 | skb->len, priv->mcast_mtu + IPOIB_ENCAP_LEN); |
334 | ++priv->stats.tx_dropped; | 334 | ++priv->stats.tx_dropped; |
335 | ++priv->stats.tx_errors; | 335 | ++priv->stats.tx_errors; |
336 | ipoib_cm_skb_too_long(dev, skb, priv->mcast_mtu); | 336 | ipoib_cm_skb_too_long(dev, skb, priv->mcast_mtu); |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index f9dbc6f68145..0741c6d1337c 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c | |||
@@ -380,7 +380,7 @@ static void path_rec_completion(int status, | |||
380 | struct net_device *dev = path->dev; | 380 | struct net_device *dev = path->dev; |
381 | struct ipoib_dev_priv *priv = netdev_priv(dev); | 381 | struct ipoib_dev_priv *priv = netdev_priv(dev); |
382 | struct ipoib_ah *ah = NULL; | 382 | struct ipoib_ah *ah = NULL; |
383 | struct ipoib_neigh *neigh; | 383 | struct ipoib_neigh *neigh, *tn; |
384 | struct sk_buff_head skqueue; | 384 | struct sk_buff_head skqueue; |
385 | struct sk_buff *skb; | 385 | struct sk_buff *skb; |
386 | unsigned long flags; | 386 | unsigned long flags; |
@@ -418,7 +418,7 @@ static void path_rec_completion(int status, | |||
418 | while ((skb = __skb_dequeue(&path->queue))) | 418 | while ((skb = __skb_dequeue(&path->queue))) |
419 | __skb_queue_tail(&skqueue, skb); | 419 | __skb_queue_tail(&skqueue, skb); |
420 | 420 | ||
421 | list_for_each_entry(neigh, &path->neigh_list, list) { | 421 | list_for_each_entry_safe(neigh, tn, &path->neigh_list, list) { |
422 | kref_get(&path->ah->ref); | 422 | kref_get(&path->ah->ref); |
423 | neigh->ah = path->ah; | 423 | neigh->ah = path->ah; |
424 | memcpy(&neigh->dgid.raw, &path->pathrec.dgid.raw, | 424 | memcpy(&neigh->dgid.raw, &path->pathrec.dgid.raw, |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index 56c87a81bb67..54fbead4de01 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c | |||
@@ -644,6 +644,9 @@ static int ipoib_mcast_leave(struct net_device *dev, struct ipoib_mcast *mcast) | |||
644 | struct ipoib_dev_priv *priv = netdev_priv(dev); | 644 | struct ipoib_dev_priv *priv = netdev_priv(dev); |
645 | int ret = 0; | 645 | int ret = 0; |
646 | 646 | ||
647 | if (test_and_clear_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags)) | ||
648 | ib_sa_free_multicast(mcast->mc); | ||
649 | |||
647 | if (test_and_clear_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags)) { | 650 | if (test_and_clear_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags)) { |
648 | ipoib_dbg_mcast(priv, "leaving MGID " IPOIB_GID_FMT "\n", | 651 | ipoib_dbg_mcast(priv, "leaving MGID " IPOIB_GID_FMT "\n", |
649 | IPOIB_GID_ARG(mcast->mcmember.mgid)); | 652 | IPOIB_GID_ARG(mcast->mcmember.mgid)); |
@@ -655,9 +658,6 @@ static int ipoib_mcast_leave(struct net_device *dev, struct ipoib_mcast *mcast) | |||
655 | ipoib_warn(priv, "ipoib_mcast_detach failed (result = %d)\n", ret); | 658 | ipoib_warn(priv, "ipoib_mcast_detach failed (result = %d)\n", ret); |
656 | } | 659 | } |
657 | 660 | ||
658 | if (test_and_clear_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags)) | ||
659 | ib_sa_free_multicast(mcast->mc); | ||
660 | |||
661 | return 0; | 661 | return 0; |
662 | } | 662 | } |
663 | 663 | ||