diff options
author | James Smart <James.Smart@Emulex.Com> | 2007-10-27 13:37:17 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-11 18:22:31 -0600 |
commit | 7ee5d43e2ea25336a7638715420c75583bd2ed69 (patch) | |
tree | 2687f4508fa05465b231a61e606b1063c944d107 /drivers/scsi/lpfc/lpfc_init.c | |
parent | 57127f157298ea2dacbbc878a3c5d2a5daca772c (diff) |
[SCSI] lpfc 8.2.3 : NPIV bug fixes
NPIV bug fixes:
- Remove vport params on physical hba when npiv is disabled
- Implement new DA_ID CT command to remove vport information from
the switch after delete. Some switches didn't clean this up unless
the physical link dropped.
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_init.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 17f445478be..86c2f2b15b6 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -2294,12 +2294,24 @@ lpfc_init(void) printk(LPFC_MODULE_DESC "\n"); printk(LPFC_COPYRIGHT "\n"); + if (lpfc_enable_npiv) { + lpfc_transport_functions.vport_create = lpfc_vport_create; + lpfc_transport_functions.vport_delete = lpfc_vport_delete; + } lpfc_transport_template = fc_attach_transport(&lpfc_transport_functions); - lpfc_vport_transport_template = - fc_attach_transport(&lpfc_vport_transport_functions); - if (!lpfc_transport_template || !lpfc_vport_transport_template) + if (lpfc_transport_template == NULL) return -ENOMEM; + if (lpfc_enable_npiv) { + lpfc_transport_functions.vport_create = NULL; + lpfc_transport_functions.vport_delete = NULL; + lpfc_transport_functions.issue_fc_host_lip = NULL; + lpfc_transport_functions.vport_disable = lpfc_vport_disable; + lpfc_vport_transport_template = + fc_attach_transport(&lpfc_transport_functions); + if (lpfc_vport_transport_template == NULL) + return -ENOMEM; + } error = pci_register_driver(&lpfc_driver); if (error) { fc_release_transport(lpfc_transport_template); @@ -2314,7 +2326,8 @@ lpfc_exit(void) { pci_unregister_driver(&lpfc_driver); fc_release_transport(lpfc_transport_template); - fc_release_transport(lpfc_vport_transport_template); + if (lpfc_enable_npiv) + fc_release_transport(lpfc_vport_transport_template); } module_init(lpfc_init); |