aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bnx2fc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/bnx2fc')
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_fcoe.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 3455cc5e4bfd..f54843023466 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -2592,12 +2592,16 @@ static int __init bnx2fc_mod_init(void)
2592 spin_lock_init(&p->fp_work_lock); 2592 spin_lock_init(&p->fp_work_lock);
2593 } 2593 }
2594 2594
2595 cpu_notifier_register_begin();
2596
2595 for_each_online_cpu(cpu) { 2597 for_each_online_cpu(cpu) {
2596 bnx2fc_percpu_thread_create(cpu); 2598 bnx2fc_percpu_thread_create(cpu);
2597 } 2599 }
2598 2600
2599 /* Initialize per CPU interrupt thread */ 2601 /* Initialize per CPU interrupt thread */
2600 register_hotcpu_notifier(&bnx2fc_cpu_notifier); 2602 __register_hotcpu_notifier(&bnx2fc_cpu_notifier);
2603
2604 cpu_notifier_register_done();
2601 2605
2602 cnic_register_driver(CNIC_ULP_FCOE, &bnx2fc_cnic_cb); 2606 cnic_register_driver(CNIC_ULP_FCOE, &bnx2fc_cnic_cb);
2603 2607
@@ -2662,13 +2666,17 @@ static void __exit bnx2fc_mod_exit(void)
2662 if (l2_thread) 2666 if (l2_thread)
2663 kthread_stop(l2_thread); 2667 kthread_stop(l2_thread);
2664 2668
2665 unregister_hotcpu_notifier(&bnx2fc_cpu_notifier); 2669 cpu_notifier_register_begin();
2666 2670
2667 /* Destroy per cpu threads */ 2671 /* Destroy per cpu threads */
2668 for_each_online_cpu(cpu) { 2672 for_each_online_cpu(cpu) {
2669 bnx2fc_percpu_thread_destroy(cpu); 2673 bnx2fc_percpu_thread_destroy(cpu);
2670 } 2674 }
2671 2675
2676 __unregister_hotcpu_notifier(&bnx2fc_cpu_notifier);
2677
2678 cpu_notifier_register_done();
2679
2672 destroy_workqueue(bnx2fc_wq); 2680 destroy_workqueue(bnx2fc_wq);
2673 /* 2681 /*
2674 * detach from scsi transport 2682 * detach from scsi transport