aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_init.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2007-10-27 13:37:17 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-11 19:22:31 -0500
commit7ee5d43e2ea25336a7638715420c75583bd2ed69 (patch)
tree2687f4508fa05465b231a61e606b1063c944d107 /drivers/scsi/lpfc/lpfc_init.c
parent57127f157298ea2dacbbc878a3c5d2a5daca772c (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.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 17f445478beb..86c2f2b15b68 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -2294,12 +2294,24 @@ lpfc_init(void)
2294 printk(LPFC_MODULE_DESC "\n"); 2294 printk(LPFC_MODULE_DESC "\n");
2295 printk(LPFC_COPYRIGHT "\n"); 2295 printk(LPFC_COPYRIGHT "\n");
2296 2296
2297 if (lpfc_enable_npiv) {
2298 lpfc_transport_functions.vport_create = lpfc_vport_create;
2299 lpfc_transport_functions.vport_delete = lpfc_vport_delete;
2300 }
2297 lpfc_transport_template = 2301 lpfc_transport_template =
2298 fc_attach_transport(&lpfc_transport_functions); 2302 fc_attach_transport(&lpfc_transport_functions);
2299 lpfc_vport_transport_template = 2303 if (lpfc_transport_template == NULL)
2300 fc_attach_transport(&lpfc_vport_transport_functions);
2301 if (!lpfc_transport_template || !lpfc_vport_transport_template)
2302 return -ENOMEM; 2304 return -ENOMEM;
2305 if (lpfc_enable_npiv) {
2306 lpfc_transport_functions.vport_create = NULL;
2307 lpfc_transport_functions.vport_delete = NULL;
2308 lpfc_transport_functions.issue_fc_host_lip = NULL;
2309 lpfc_transport_functions.vport_disable = lpfc_vport_disable;
2310 lpfc_vport_transport_template =
2311 fc_attach_transport(&lpfc_transport_functions);
2312 if (lpfc_vport_transport_template == NULL)
2313 return -ENOMEM;
2314 }
2303 error = pci_register_driver(&lpfc_driver); 2315 error = pci_register_driver(&lpfc_driver);
2304 if (error) { 2316 if (error) {
2305 fc_release_transport(lpfc_transport_template); 2317 fc_release_transport(lpfc_transport_template);
@@ -2314,7 +2326,8 @@ lpfc_exit(void)
2314{ 2326{
2315 pci_unregister_driver(&lpfc_driver); 2327 pci_unregister_driver(&lpfc_driver);
2316 fc_release_transport(lpfc_transport_template); 2328 fc_release_transport(lpfc_transport_template);
2317 fc_release_transport(lpfc_vport_transport_template); 2329 if (lpfc_enable_npiv)
2330 fc_release_transport(lpfc_vport_transport_template);
2318} 2331}
2319 2332
2320module_init(lpfc_init); 2333module_init(lpfc_init);