aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_vport.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2008-08-24 21:50:00 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-10-13 09:28:53 -0400
commitd7c255b26d8e3f12164d82093de3bf22efad2b4a (patch)
tree0b3467eda322ec2d90e5a7369891ab4ba12ff0a1 /drivers/scsi/lpfc/lpfc_vport.c
parent34b02dcdcf1865405f4762b991965c0c3b8a3ae0 (diff)
[SCSI] lpfc 8.2.8 : Miscellaneous Bug Fixes
Miscellaneous Fixes: - Fix the wrong variable name used for checking node active usage status - Fix numerous duplicate log message numbers - Fix change KERN_WARNING messages to KERN_INFO. - Stop sending erroneous LOGO to fabric after vport is already terminated - Fix HBQ allocates that were kalloc'ing w/ GFP_KERNEL while holding a lock. - Fix gcc 4.3.2 compiler warnings and a sparse warning - Fix bugs in handling unsolicited ct event queue - Reorder some of the initial link up checks, to remove odd VPI states. - Correct poor VPI handling - Add debug messages - Expand Update_CFG mailbox definition - Fix handling of VPD data offsets - Reorder loopback flags - convert to use offsetof() 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.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c
index ad0f65313878..2578d5fd9537 100644
--- a/drivers/scsi/lpfc/lpfc_vport.c
+++ b/drivers/scsi/lpfc/lpfc_vport.c
@@ -577,8 +577,12 @@ lpfc_vport_delete(struct fc_vport *fc_vport)
577 * initiated after we've disposed of all other resources associated 577 * initiated after we've disposed of all other resources associated
578 * with the port. 578 * with the port.
579 */ 579 */
580 if (!scsi_host_get(shost) || !scsi_host_get(shost)) 580 if (!scsi_host_get(shost))
581 return VPORT_INVAL; 581 return VPORT_INVAL;
582 if (!scsi_host_get(shost)) {
583 scsi_host_put(shost);
584 return VPORT_INVAL;
585 }
582 spin_lock_irq(&phba->hbalock); 586 spin_lock_irq(&phba->hbalock);
583 vport->load_flag |= FC_UNLOADING; 587 vport->load_flag |= FC_UNLOADING;
584 spin_unlock_irq(&phba->hbalock); 588 spin_unlock_irq(&phba->hbalock);
@@ -668,6 +672,8 @@ lpfc_vport_delete(struct fc_vport *fc_vport)
668 } 672 }
669 vport->unreg_vpi_cmpl = VPORT_INVAL; 673 vport->unreg_vpi_cmpl = VPORT_INVAL;
670 timeout = msecs_to_jiffies(phba->fc_ratov * 2000); 674 timeout = msecs_to_jiffies(phba->fc_ratov * 2000);
675 if (ndlp->nlp_state == NLP_STE_UNUSED_NODE)
676 goto skip_logo;
671 if (!lpfc_issue_els_npiv_logo(vport, ndlp)) 677 if (!lpfc_issue_els_npiv_logo(vport, ndlp))
672 while (vport->unreg_vpi_cmpl == VPORT_INVAL && timeout) 678 while (vport->unreg_vpi_cmpl == VPORT_INVAL && timeout)
673 timeout = schedule_timeout(timeout); 679 timeout = schedule_timeout(timeout);
@@ -689,8 +695,10 @@ skip_logo:
689 * Completion of unreg_vpi (lpfc_mbx_cmpl_unreg_vpi) 695 * Completion of unreg_vpi (lpfc_mbx_cmpl_unreg_vpi)
690 * does the scsi_host_put() to release the vport. 696 * does the scsi_host_put() to release the vport.
691 */ 697 */
692 lpfc_mbx_unreg_vpi(vport); 698 if (lpfc_mbx_unreg_vpi(vport))
693 } 699 scsi_host_put(shost);
700 } else
701 scsi_host_put(shost);
694 702
695 lpfc_free_vpi(phba, vport->vpi); 703 lpfc_free_vpi(phba, vport->vpi);
696 vport->work_port_events = 0; 704 vport->work_port_events = 0;