aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_vport.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2011-10-10 21:32:10 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-10-16 12:28:48 -0400
commit73d91e503a60bd164b636258ae9f558b72010602 (patch)
treedc319fbf3cb55fc8d011720d5c13f1b814ae8539 /drivers/scsi/lpfc/lpfc_vport.c
parent8d6f5cea12e5eebdaca94b3a3a4bd4f12e83d85d (diff)
[SCSI] lpfc 8.3.27: Miscellanous logic and interface fixes
Miscellanous logic and interface fixes - Fix lpfc_init_vfi_cmpl to check the interface type for interface type 0 before parsing the results. - Cast uint32_t values that are multiplied to uint64_t before the multiplication. - Instead of "break" statement when PCI read returned error, use the goto statement to the end of the routine after setting return value - moved the msleep(10) to the beginning of the wait loop for checking the SLIPort_Status register - Added the code to follow the existing wait for SLIPort_Status register RDY, ERR, and RN bits to be set by the port before proceeding to perform PCI function reset. - Do not override ulpCt_h and ulpCt_l for SLI 4 ports. - For vport delete, call lpfc_nlp_put when the vport's vpi state is not marked with VPI_REGISTERED. - Added missed fields into the driver's Controller Attributes Structure - Changed ringing EQ/CQ/RQ doorbell register to be dependent on the size of the queue. - Return -EACCES in issue_reset if cfg_enable_hba_reset is zero. - Added new logging flag LOG_FCP_UNDER 0x00040000 to qualify underrun logging. - Add a check in the fabric name display routine to display 0 if the port state is <= FLOGI. - Add a check to the switch statement in lpfc_decode_firmware_rev to check for an 'X'. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_vport.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_vport.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c
index 1feb551a57bc..cff6ca67415c 100644
--- a/drivers/scsi/lpfc/lpfc_vport.c
+++ b/drivers/scsi/lpfc/lpfc_vport.c
@@ -692,13 +692,14 @@ lpfc_vport_delete(struct fc_vport *fc_vport)
692 /* Indicate free memory when release */ 692 /* Indicate free memory when release */
693 NLP_SET_FREE_REQ(ndlp); 693 NLP_SET_FREE_REQ(ndlp);
694 } else { 694 } else {
695 if (!NLP_CHK_NODE_ACT(ndlp)) 695 if (!NLP_CHK_NODE_ACT(ndlp)) {
696 ndlp = lpfc_enable_node(vport, ndlp, 696 ndlp = lpfc_enable_node(vport, ndlp,
697 NLP_STE_UNUSED_NODE); 697 NLP_STE_UNUSED_NODE);
698 if (!ndlp) 698 if (!ndlp)
699 goto skip_logo; 699 goto skip_logo;
700 }
700 701
701 /* Remove ndlp from vport npld list */ 702 /* Remove ndlp from vport list */
702 lpfc_dequeue_node(vport, ndlp); 703 lpfc_dequeue_node(vport, ndlp);
703 spin_lock_irq(&phba->ndlp_lock); 704 spin_lock_irq(&phba->ndlp_lock);
704 if (!NLP_CHK_FREE_REQ(ndlp)) 705 if (!NLP_CHK_FREE_REQ(ndlp))
@@ -711,8 +712,17 @@ lpfc_vport_delete(struct fc_vport *fc_vport)
711 } 712 }
712 spin_unlock_irq(&phba->ndlp_lock); 713 spin_unlock_irq(&phba->ndlp_lock);
713 } 714 }
714 if (!(vport->vpi_state & LPFC_VPI_REGISTERED)) 715
716 /*
717 * If the vpi is not registered, then a valid FDISC doesn't
718 * exist and there is no need for a ELS LOGO. Just cleanup
719 * the ndlp.
720 */
721 if (!(vport->vpi_state & LPFC_VPI_REGISTERED)) {
722 lpfc_nlp_put(ndlp);
715 goto skip_logo; 723 goto skip_logo;
724 }
725
716 vport->unreg_vpi_cmpl = VPORT_INVAL; 726 vport->unreg_vpi_cmpl = VPORT_INVAL;
717 timeout = msecs_to_jiffies(phba->fc_ratov * 2000); 727 timeout = msecs_to_jiffies(phba->fc_ratov * 2000);
718 if (!lpfc_issue_els_npiv_logo(vport, ndlp)) 728 if (!lpfc_issue_els_npiv_logo(vport, ndlp))