diff options
Diffstat (limited to 'drivers/scsi/fnic/fnic_main.c')
-rw-r--r-- | drivers/scsi/fnic/fnic_main.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c index 5f09d1814d26..42e15ee6e1bb 100644 --- a/drivers/scsi/fnic/fnic_main.c +++ b/drivers/scsi/fnic/fnic_main.c | |||
@@ -642,19 +642,6 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
642 | INIT_WORK(&fnic->fip_frame_work, fnic_handle_fip_frame); | 642 | INIT_WORK(&fnic->fip_frame_work, fnic_handle_fip_frame); |
643 | INIT_WORK(&fnic->event_work, fnic_handle_event); | 643 | INIT_WORK(&fnic->event_work, fnic_handle_event); |
644 | skb_queue_head_init(&fnic->fip_frame_queue); | 644 | skb_queue_head_init(&fnic->fip_frame_queue); |
645 | spin_lock_irqsave(&fnic_list_lock, flags); | ||
646 | if (!fnic_fip_queue) { | ||
647 | fnic_fip_queue = | ||
648 | create_singlethread_workqueue("fnic_fip_q"); | ||
649 | if (!fnic_fip_queue) { | ||
650 | spin_unlock_irqrestore(&fnic_list_lock, flags); | ||
651 | printk(KERN_ERR PFX "fnic FIP work queue " | ||
652 | "create failed\n"); | ||
653 | err = -ENOMEM; | ||
654 | goto err_out_free_max_pool; | ||
655 | } | ||
656 | } | ||
657 | spin_unlock_irqrestore(&fnic_list_lock, flags); | ||
658 | INIT_LIST_HEAD(&fnic->evlist); | 645 | INIT_LIST_HEAD(&fnic->evlist); |
659 | INIT_LIST_HEAD(&fnic->vlans); | 646 | INIT_LIST_HEAD(&fnic->vlans); |
660 | } else { | 647 | } else { |
@@ -960,6 +947,13 @@ static int __init fnic_init_module(void) | |||
960 | spin_lock_init(&fnic_list_lock); | 947 | spin_lock_init(&fnic_list_lock); |
961 | INIT_LIST_HEAD(&fnic_list); | 948 | INIT_LIST_HEAD(&fnic_list); |
962 | 949 | ||
950 | fnic_fip_queue = create_singlethread_workqueue("fnic_fip_q"); | ||
951 | if (!fnic_fip_queue) { | ||
952 | printk(KERN_ERR PFX "fnic FIP work queue create failed\n"); | ||
953 | err = -ENOMEM; | ||
954 | goto err_create_fip_workq; | ||
955 | } | ||
956 | |||
963 | fnic_fc_transport = fc_attach_transport(&fnic_fc_functions); | 957 | fnic_fc_transport = fc_attach_transport(&fnic_fc_functions); |
964 | if (!fnic_fc_transport) { | 958 | if (!fnic_fc_transport) { |
965 | printk(KERN_ERR PFX "fc_attach_transport error\n"); | 959 | printk(KERN_ERR PFX "fc_attach_transport error\n"); |
@@ -978,6 +972,8 @@ static int __init fnic_init_module(void) | |||
978 | err_pci_register: | 972 | err_pci_register: |
979 | fc_release_transport(fnic_fc_transport); | 973 | fc_release_transport(fnic_fc_transport); |
980 | err_fc_transport: | 974 | err_fc_transport: |
975 | destroy_workqueue(fnic_fip_queue); | ||
976 | err_create_fip_workq: | ||
981 | destroy_workqueue(fnic_event_queue); | 977 | destroy_workqueue(fnic_event_queue); |
982 | err_create_fnic_workq: | 978 | err_create_fnic_workq: |
983 | kmem_cache_destroy(fnic_io_req_cache); | 979 | kmem_cache_destroy(fnic_io_req_cache); |