diff options
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/core/addr.c | 4 | ||||
-rw-r--r-- | drivers/infiniband/core/cma.c | 4 | ||||
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_mr.c | 13 | ||||
-rw-r--r-- | drivers/infiniband/hw/nes/nes_cm.c | 8 | ||||
-rw-r--r-- | drivers/infiniband/hw/nes/nes_verbs.c | 2 |
5 files changed, 20 insertions, 11 deletions
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c index ce511d8748ce..5be1bd4fc7ed 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c | |||
@@ -514,7 +514,7 @@ static struct notifier_block nb = { | |||
514 | .notifier_call = netevent_callback | 514 | .notifier_call = netevent_callback |
515 | }; | 515 | }; |
516 | 516 | ||
517 | static int addr_init(void) | 517 | static int __init addr_init(void) |
518 | { | 518 | { |
519 | addr_wq = create_singlethread_workqueue("ib_addr"); | 519 | addr_wq = create_singlethread_workqueue("ib_addr"); |
520 | if (!addr_wq) | 520 | if (!addr_wq) |
@@ -524,7 +524,7 @@ static int addr_init(void) | |||
524 | return 0; | 524 | return 0; |
525 | } | 525 | } |
526 | 526 | ||
527 | static void addr_cleanup(void) | 527 | static void __exit addr_cleanup(void) |
528 | { | 528 | { |
529 | unregister_netevent_notifier(&nb); | 529 | unregister_netevent_notifier(&nb); |
530 | destroy_workqueue(addr_wq); | 530 | destroy_workqueue(addr_wq); |
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 851de83ff455..075317884b53 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c | |||
@@ -2960,7 +2960,7 @@ static void cma_remove_one(struct ib_device *device) | |||
2960 | kfree(cma_dev); | 2960 | kfree(cma_dev); |
2961 | } | 2961 | } |
2962 | 2962 | ||
2963 | static int cma_init(void) | 2963 | static int __init cma_init(void) |
2964 | { | 2964 | { |
2965 | int ret, low, high, remaining; | 2965 | int ret, low, high, remaining; |
2966 | 2966 | ||
@@ -2990,7 +2990,7 @@ err: | |||
2990 | return ret; | 2990 | return ret; |
2991 | } | 2991 | } |
2992 | 2992 | ||
2993 | static void cma_cleanup(void) | 2993 | static void __exit cma_cleanup(void) |
2994 | { | 2994 | { |
2995 | ib_unregister_client(&cma_client); | 2995 | ib_unregister_client(&cma_client); |
2996 | unregister_netdevice_notifier(&cma_nb); | 2996 | unregister_netdevice_notifier(&cma_nb); |
diff --git a/drivers/infiniband/hw/mthca/mthca_mr.c b/drivers/infiniband/hw/mthca/mthca_mr.c index d606edf10858..065b20899876 100644 --- a/drivers/infiniband/hw/mthca/mthca_mr.c +++ b/drivers/infiniband/hw/mthca/mthca_mr.c | |||
@@ -352,10 +352,14 @@ static void mthca_arbel_write_mtt_seg(struct mthca_dev *dev, | |||
352 | 352 | ||
353 | BUG_ON(!mtts); | 353 | BUG_ON(!mtts); |
354 | 354 | ||
355 | dma_sync_single_for_cpu(&dev->pdev->dev, dma_handle, | ||
356 | list_len * sizeof (u64), DMA_TO_DEVICE); | ||
357 | |||
355 | for (i = 0; i < list_len; ++i) | 358 | for (i = 0; i < list_len; ++i) |
356 | mtts[i] = cpu_to_be64(buffer_list[i] | MTHCA_MTT_FLAG_PRESENT); | 359 | mtts[i] = cpu_to_be64(buffer_list[i] | MTHCA_MTT_FLAG_PRESENT); |
357 | 360 | ||
358 | dma_sync_single(&dev->pdev->dev, dma_handle, list_len * sizeof (u64), DMA_TO_DEVICE); | 361 | dma_sync_single_for_device(&dev->pdev->dev, dma_handle, |
362 | list_len * sizeof (u64), DMA_TO_DEVICE); | ||
359 | } | 363 | } |
360 | 364 | ||
361 | int mthca_write_mtt(struct mthca_dev *dev, struct mthca_mtt *mtt, | 365 | int mthca_write_mtt(struct mthca_dev *dev, struct mthca_mtt *mtt, |
@@ -803,12 +807,15 @@ int mthca_arbel_map_phys_fmr(struct ib_fmr *ibfmr, u64 *page_list, | |||
803 | 807 | ||
804 | wmb(); | 808 | wmb(); |
805 | 809 | ||
810 | dma_sync_single_for_cpu(&dev->pdev->dev, fmr->mem.arbel.dma_handle, | ||
811 | list_len * sizeof(u64), DMA_TO_DEVICE); | ||
812 | |||
806 | for (i = 0; i < list_len; ++i) | 813 | for (i = 0; i < list_len; ++i) |
807 | fmr->mem.arbel.mtts[i] = cpu_to_be64(page_list[i] | | 814 | fmr->mem.arbel.mtts[i] = cpu_to_be64(page_list[i] | |
808 | MTHCA_MTT_FLAG_PRESENT); | 815 | MTHCA_MTT_FLAG_PRESENT); |
809 | 816 | ||
810 | dma_sync_single(&dev->pdev->dev, fmr->mem.arbel.dma_handle, | 817 | dma_sync_single_for_device(&dev->pdev->dev, fmr->mem.arbel.dma_handle, |
811 | list_len * sizeof(u64), DMA_TO_DEVICE); | 818 | list_len * sizeof(u64), DMA_TO_DEVICE); |
812 | 819 | ||
813 | fmr->mem.arbel.mpt->key = cpu_to_be32(key); | 820 | fmr->mem.arbel.mpt->key = cpu_to_be32(key); |
814 | fmr->mem.arbel.mpt->lkey = cpu_to_be32(key); | 821 | fmr->mem.arbel.mpt->lkey = cpu_to_be32(key); |
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index 11c7d6642014..114b802771ad 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c | |||
@@ -472,6 +472,7 @@ int schedule_nes_timer(struct nes_cm_node *cm_node, struct sk_buff *skb, | |||
472 | 472 | ||
473 | static void nes_retrans_expired(struct nes_cm_node *cm_node) | 473 | static void nes_retrans_expired(struct nes_cm_node *cm_node) |
474 | { | 474 | { |
475 | struct iw_cm_id *cm_id = cm_node->cm_id; | ||
475 | switch (cm_node->state) { | 476 | switch (cm_node->state) { |
476 | case NES_CM_STATE_SYN_RCVD: | 477 | case NES_CM_STATE_SYN_RCVD: |
477 | case NES_CM_STATE_CLOSING: | 478 | case NES_CM_STATE_CLOSING: |
@@ -479,7 +480,9 @@ static void nes_retrans_expired(struct nes_cm_node *cm_node) | |||
479 | break; | 480 | break; |
480 | case NES_CM_STATE_LAST_ACK: | 481 | case NES_CM_STATE_LAST_ACK: |
481 | case NES_CM_STATE_FIN_WAIT1: | 482 | case NES_CM_STATE_FIN_WAIT1: |
482 | case NES_CM_STATE_MPAREJ_RCVD: | 483 | if (cm_node->cm_id) |
484 | cm_id->rem_ref(cm_id); | ||
485 | cm_node->state = NES_CM_STATE_CLOSED; | ||
483 | send_reset(cm_node, NULL); | 486 | send_reset(cm_node, NULL); |
484 | break; | 487 | break; |
485 | default: | 488 | default: |
@@ -1406,6 +1409,7 @@ static void handle_rst_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb, | |||
1406 | case NES_CM_STATE_CLOSED: | 1409 | case NES_CM_STATE_CLOSED: |
1407 | drop_packet(skb); | 1410 | drop_packet(skb); |
1408 | break; | 1411 | break; |
1412 | case NES_CM_STATE_FIN_WAIT1: | ||
1409 | case NES_CM_STATE_LAST_ACK: | 1413 | case NES_CM_STATE_LAST_ACK: |
1410 | cm_node->cm_id->rem_ref(cm_node->cm_id); | 1414 | cm_node->cm_id->rem_ref(cm_node->cm_id); |
1411 | case NES_CM_STATE_TIME_WAIT: | 1415 | case NES_CM_STATE_TIME_WAIT: |
@@ -1413,8 +1417,6 @@ static void handle_rst_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb, | |||
1413 | rem_ref_cm_node(cm_node->cm_core, cm_node); | 1417 | rem_ref_cm_node(cm_node->cm_core, cm_node); |
1414 | drop_packet(skb); | 1418 | drop_packet(skb); |
1415 | break; | 1419 | break; |
1416 | case NES_CM_STATE_FIN_WAIT1: | ||
1417 | nes_debug(NES_DBG_CM, "Bad state %s[%u]\n", __func__, __LINE__); | ||
1418 | default: | 1420 | default: |
1419 | drop_packet(skb); | 1421 | drop_packet(skb); |
1420 | break; | 1422 | break; |
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index 64d5cfd8f380..21e0fd336cf7 100644 --- a/drivers/infiniband/hw/nes/nes_verbs.c +++ b/drivers/infiniband/hw/nes/nes_verbs.c | |||
@@ -654,7 +654,7 @@ static int nes_query_device(struct ib_device *ibdev, struct ib_device_attr *prop | |||
654 | default: | 654 | default: |
655 | props->max_qp_rd_atom = 0; | 655 | props->max_qp_rd_atom = 0; |
656 | } | 656 | } |
657 | props->max_qp_init_rd_atom = props->max_qp_wr; | 657 | props->max_qp_init_rd_atom = props->max_qp_rd_atom; |
658 | props->atomic_cap = IB_ATOMIC_NONE; | 658 | props->atomic_cap = IB_ATOMIC_NONE; |
659 | props->max_map_per_fmr = 1; | 659 | props->max_map_per_fmr = 1; |
660 | 660 | ||