aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_vport.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2008-06-14 22:52:59 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-07-12 09:22:28 -0400
commit495a714c50e2c6ca6357129812f983b3ac0a32f2 (patch)
treef4f7237ed2bcb5e35c9dacae60864d169303b6b4 /drivers/scsi/lpfc/lpfc_vport.c
parent5e9d9b8276980fc5dfa88ce34f6ec88ce3026232 (diff)
[SCSI] lpfc 8.2.7 : Miscellaneous Fixes
Miscellaneous Fixes: - Fix bug in mbox sysfs interface that locked in EAGAIN if discovery stalled. - Fix missing error message when npiv and loop are true when link up occurs. - Fix panic in lpfc_scsi_cmd_iocb_cmpl: scsi_buf was NULL, but created race conditions with other code paths. - Fix error in sysfs mailbox structure that didn't rezero on next use. - Add missing mempool_free() to attachment failure path - Fix missing put of ndlp structure during driver unload. - Fix applications unable to send mailbox commands during discovery. - Remove unused argument (type) from function lpfc_post_buffer() API - Fix vport name is not shown after hbacmd vportcreate. - Remove repeated code statements. 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_vport.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_vport.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c
index 6feaf59b0b1b..109f89d98830 100644
--- a/drivers/scsi/lpfc/lpfc_vport.c
+++ b/drivers/scsi/lpfc/lpfc_vport.c
@@ -216,6 +216,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable)
216 int vpi; 216 int vpi;
217 int rc = VPORT_ERROR; 217 int rc = VPORT_ERROR;
218 int status; 218 int status;
219 int size;
219 220
220 if ((phba->sli_rev < 3) || 221 if ((phba->sli_rev < 3) ||
221 !(phba->sli3_options & LPFC_SLI3_NPIV_ENABLED)) { 222 !(phba->sli3_options & LPFC_SLI3_NPIV_ENABLED)) {
@@ -278,7 +279,20 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable)
278 279
279 memcpy(vport->fc_portname.u.wwn, vport->fc_sparam.portName.u.wwn, 8); 280 memcpy(vport->fc_portname.u.wwn, vport->fc_sparam.portName.u.wwn, 8);
280 memcpy(vport->fc_nodename.u.wwn, vport->fc_sparam.nodeName.u.wwn, 8); 281 memcpy(vport->fc_nodename.u.wwn, vport->fc_sparam.nodeName.u.wwn, 8);
281 282 size = strnlen(fc_vport->symbolic_name, LPFC_VNAME_LEN);
283 if (size) {
284 vport->vname = kzalloc(size+1, GFP_KERNEL);
285 if (!vport->vname) {
286 lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
287 "1814 Create VPORT failed. "
288 "vname allocation failed.\n");
289 rc = VPORT_ERROR;
290 lpfc_free_vpi(phba, vpi);
291 destroy_port(vport);
292 goto error_out;
293 }
294 memcpy(vport->vname, fc_vport->symbolic_name, size+1);
295 }
282 if (fc_vport->node_name != 0) 296 if (fc_vport->node_name != 0)
283 u64_to_wwn(fc_vport->node_name, vport->fc_nodename.u.wwn); 297 u64_to_wwn(fc_vport->node_name, vport->fc_nodename.u.wwn);
284 if (fc_vport->port_name != 0) 298 if (fc_vport->port_name != 0)