diff options
Diffstat (limited to 'drivers/scsi/fnic/fnic_main.c')
-rw-r--r-- | drivers/scsi/fnic/fnic_main.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c index 2c266c01dc5a..71c7bbe26d05 100644 --- a/drivers/scsi/fnic/fnic_main.c +++ b/drivers/scsi/fnic/fnic_main.c | |||
@@ -671,14 +671,6 @@ static int __devinit fnic_probe(struct pci_dev *pdev, | |||
671 | lp->link_up = 0; | 671 | lp->link_up = 0; |
672 | lp->tt = fnic_transport_template; | 672 | lp->tt = fnic_transport_template; |
673 | 673 | ||
674 | lp->emp = fc_exch_mgr_alloc(lp, FC_CLASS_3, | ||
675 | FCPIO_HOST_EXCH_RANGE_START, | ||
676 | FCPIO_HOST_EXCH_RANGE_END); | ||
677 | if (!lp->emp) { | ||
678 | err = -ENOMEM; | ||
679 | goto err_out_remove_scsi_host; | ||
680 | } | ||
681 | |||
682 | lp->max_retry_count = fnic->config.flogi_retries; | 674 | lp->max_retry_count = fnic->config.flogi_retries; |
683 | lp->max_rport_retry_count = fnic->config.plogi_retries; | 675 | lp->max_rport_retry_count = fnic->config.plogi_retries; |
684 | lp->service_params = (FCP_SPPF_INIT_FCN | FCP_SPPF_RD_XRDY_DIS | | 676 | lp->service_params = (FCP_SPPF_INIT_FCN | FCP_SPPF_RD_XRDY_DIS | |
@@ -693,12 +685,18 @@ static int __devinit fnic_probe(struct pci_dev *pdev, | |||
693 | fc_set_wwnn(lp, fnic->config.node_wwn); | 685 | fc_set_wwnn(lp, fnic->config.node_wwn); |
694 | fc_set_wwpn(lp, fnic->config.port_wwn); | 686 | fc_set_wwpn(lp, fnic->config.port_wwn); |
695 | 687 | ||
696 | fc_exch_init(lp); | ||
697 | fc_lport_init(lp); | 688 | fc_lport_init(lp); |
689 | fc_exch_init(lp); | ||
698 | fc_elsct_init(lp); | 690 | fc_elsct_init(lp); |
699 | fc_rport_init(lp); | 691 | fc_rport_init(lp); |
700 | fc_disc_init(lp); | 692 | fc_disc_init(lp); |
701 | 693 | ||
694 | if (!fc_exch_mgr_alloc(lp, FC_CLASS_3, FCPIO_HOST_EXCH_RANGE_START, | ||
695 | FCPIO_HOST_EXCH_RANGE_END, NULL)) { | ||
696 | err = -ENOMEM; | ||
697 | goto err_out_remove_scsi_host; | ||
698 | } | ||
699 | |||
702 | fc_lport_config(lp); | 700 | fc_lport_config(lp); |
703 | 701 | ||
704 | if (fc_set_mfs(lp, fnic->config.maxdatafieldsize + | 702 | if (fc_set_mfs(lp, fnic->config.maxdatafieldsize + |
@@ -738,7 +736,7 @@ static int __devinit fnic_probe(struct pci_dev *pdev, | |||
738 | return 0; | 736 | return 0; |
739 | 737 | ||
740 | err_out_free_exch_mgr: | 738 | err_out_free_exch_mgr: |
741 | fc_exch_mgr_free(lp->emp); | 739 | fc_exch_mgr_free(lp); |
742 | err_out_remove_scsi_host: | 740 | err_out_remove_scsi_host: |
743 | fc_remove_host(fnic->lport->host); | 741 | fc_remove_host(fnic->lport->host); |
744 | scsi_remove_host(fnic->lport->host); | 742 | scsi_remove_host(fnic->lport->host); |
@@ -827,7 +825,7 @@ static void __devexit fnic_remove(struct pci_dev *pdev) | |||
827 | 825 | ||
828 | fc_remove_host(fnic->lport->host); | 826 | fc_remove_host(fnic->lport->host); |
829 | scsi_remove_host(fnic->lport->host); | 827 | scsi_remove_host(fnic->lport->host); |
830 | fc_exch_mgr_free(fnic->lport->emp); | 828 | fc_exch_mgr_free(fnic->lport); |
831 | vnic_dev_notify_unset(fnic->vdev); | 829 | vnic_dev_notify_unset(fnic->vdev); |
832 | fnic_free_vnic_resources(fnic); | 830 | fnic_free_vnic_resources(fnic); |
833 | fnic_free_intr(fnic); | 831 | fnic_free_intr(fnic); |