diff options
author | Mike Travis <travis@sgi.com> | 2008-12-31 17:34:16 -0800 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-03 18:53:31 +0100 |
commit | 7eb19553369c46cc1fa64caf120cbcab1b597f7c (patch) | |
tree | ef1a3beae706b9497c845d0a2557ceb4d2754998 /drivers/scsi/lpfc/lpfc_vport.c | |
parent | 6092848a2a23b660150a38bc06f59d75838d70c8 (diff) | |
parent | 8c384cdee3e04d6194a2c2b192b624754f990835 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask into merge-rr-cpumask
Conflicts:
arch/x86/kernel/io_apic.c
kernel/rcuclassic.c
kernel/sched.c
kernel/time/tick-sched.c
Signed-off-by: Mike Travis <travis@sgi.com>
[ mingo@elte.hu: backmerged typo fix for io_apic.c ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_vport.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_vport.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c index a7de1cc02b4..63b54c66756 100644 --- a/drivers/scsi/lpfc/lpfc_vport.c +++ b/drivers/scsi/lpfc/lpfc_vport.c @@ -288,10 +288,8 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) int vpi; int rc = VPORT_ERROR; int status; - int size; - if ((phba->sli_rev < 3) || - !(phba->sli3_options & LPFC_SLI3_NPIV_ENABLED)) { + if ((phba->sli_rev < 3) || !(phba->cfg_enable_npiv)) { lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, "1808 Create VPORT failed: " "NPIV is not enabled: SLImode:%d\n", @@ -351,20 +349,6 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) memcpy(vport->fc_portname.u.wwn, vport->fc_sparam.portName.u.wwn, 8); memcpy(vport->fc_nodename.u.wwn, vport->fc_sparam.nodeName.u.wwn, 8); - size = strnlen(fc_vport->symbolic_name, LPFC_VNAME_LEN); - if (size) { - vport->vname = kzalloc(size+1, GFP_KERNEL); - if (!vport->vname) { - lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT, - "1814 Create VPORT failed. " - "vname allocation failed.\n"); - rc = VPORT_ERROR; - lpfc_free_vpi(phba, vpi); - destroy_port(vport); - goto error_out; - } - memcpy(vport->vname, fc_vport->symbolic_name, size+1); - } if (fc_vport->node_name != 0) u64_to_wwn(fc_vport->node_name, vport->fc_nodename.u.wwn); if (fc_vport->port_name != 0) @@ -394,6 +378,9 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) goto error_out; } + /* Create binary sysfs attribute for vport */ + lpfc_alloc_sysfs_attr(vport); + *(struct lpfc_vport **)fc_vport->dd_data = vport; vport->fc_vport = fc_vport; @@ -405,6 +392,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) } if (disable) { + lpfc_vport_set_state(vport, FC_VPORT_DISABLED); rc = VPORT_OK; goto out; } @@ -587,8 +575,12 @@ lpfc_vport_delete(struct fc_vport *fc_vport) spin_lock_irq(&phba->hbalock); vport->load_flag |= FC_UNLOADING; spin_unlock_irq(&phba->hbalock); - kfree(vport->vname); + + lpfc_free_sysfs_attr(vport); + lpfc_debugfs_terminate(vport); + + /* Remove FC host and then SCSI host with the vport */ fc_remove_host(lpfc_shost_from_vport(vport)); scsi_remove_host(lpfc_shost_from_vport(vport)); |