diff options
author | Jamie Wellnitz <Jamie.Wellnitz@emulex.com> | 2006-02-28 19:25:31 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-02-28 20:02:47 -0500 |
commit | 2fe165b65089925292122e9772321738627f325c (patch) | |
tree | 275ed8dc03c43545576cbbb4d0a2707d2b981ed3 /drivers/scsi/lpfc/lpfc_els.c | |
parent | 082c02667d98d3060f63382e7a695d58d4c8c5e4 (diff) |
[SCSI] lpfc 8.1.2: Code style changes for Discovery code
Code style changes for Discovery code
Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_els.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_els.c | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 74ad15d0a2ba..6e1a5162851c 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************* | 1 | /******************************************************************* |
2 | * This file is part of the Emulex Linux Device Driver for * | 2 | * This file is part of the Emulex Linux Device Driver for * |
3 | * Fibre Channel Host Bus Adapters. * | 3 | * Fibre Channel Host Bus Adapters. * |
4 | * Copyright (C) 2004-2005 Emulex. All rights reserved. * | 4 | * Copyright (C) 2004-2006 Emulex. All rights reserved. * |
5 | * EMULEX and SLI are trademarks of Emulex. * | 5 | * EMULEX and SLI are trademarks of Emulex. * |
6 | * www.emulex.com * | 6 | * www.emulex.com * |
7 | * Portions Copyright (C) 2004-2005 Christoph Hellwig * | 7 | * Portions Copyright (C) 2004-2005 Christoph Hellwig * |
@@ -717,8 +717,7 @@ lpfc_cmpl_els_plogi(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, | |||
717 | (irsp->un.ulpWord[4] == IOERR_LINK_DOWN) || | 717 | (irsp->un.ulpWord[4] == IOERR_LINK_DOWN) || |
718 | (irsp->un.ulpWord[4] == IOERR_SLI_DOWN))) { | 718 | (irsp->un.ulpWord[4] == IOERR_SLI_DOWN))) { |
719 | rc = NLP_STE_FREED_NODE; | 719 | rc = NLP_STE_FREED_NODE; |
720 | } | 720 | } else { |
721 | else { | ||
722 | rc = lpfc_disc_state_machine(phba, ndlp, cmdiocb, | 721 | rc = lpfc_disc_state_machine(phba, ndlp, cmdiocb, |
723 | NLP_EVT_CMPL_PLOGI); | 722 | NLP_EVT_CMPL_PLOGI); |
724 | } | 723 | } |
@@ -784,7 +783,7 @@ lpfc_issue_els_plogi(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp, | |||
784 | 783 | ||
785 | cmdsize = (sizeof (uint32_t) + sizeof (struct serv_parm)); | 784 | cmdsize = (sizeof (uint32_t) + sizeof (struct serv_parm)); |
786 | elsiocb = lpfc_prep_els_iocb(phba, 1, cmdsize, retry, ndlp, | 785 | elsiocb = lpfc_prep_els_iocb(phba, 1, cmdsize, retry, ndlp, |
787 | ELS_CMD_PLOGI); | 786 | ELS_CMD_PLOGI); |
788 | if (!elsiocb) | 787 | if (!elsiocb) |
789 | return 1; | 788 | return 1; |
790 | 789 | ||
@@ -861,8 +860,7 @@ lpfc_cmpl_els_prli(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, | |||
861 | (irsp->un.ulpWord[4] == IOERR_LINK_DOWN) || | 860 | (irsp->un.ulpWord[4] == IOERR_LINK_DOWN) || |
862 | (irsp->un.ulpWord[4] == IOERR_SLI_DOWN))) { | 861 | (irsp->un.ulpWord[4] == IOERR_SLI_DOWN))) { |
863 | goto out; | 862 | goto out; |
864 | } | 863 | } else { |
865 | else { | ||
866 | lpfc_disc_state_machine(phba, ndlp, cmdiocb, | 864 | lpfc_disc_state_machine(phba, ndlp, cmdiocb, |
867 | NLP_EVT_CMPL_PRLI); | 865 | NLP_EVT_CMPL_PRLI); |
868 | } | 866 | } |
@@ -1195,8 +1193,7 @@ lpfc_cmpl_els_logo(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, | |||
1195 | (irsp->un.ulpWord[4] == IOERR_LINK_DOWN) || | 1193 | (irsp->un.ulpWord[4] == IOERR_LINK_DOWN) || |
1196 | (irsp->un.ulpWord[4] == IOERR_SLI_DOWN))) { | 1194 | (irsp->un.ulpWord[4] == IOERR_SLI_DOWN))) { |
1197 | goto out; | 1195 | goto out; |
1198 | } | 1196 | } else { |
1199 | else { | ||
1200 | lpfc_disc_state_machine(phba, ndlp, cmdiocb, | 1197 | lpfc_disc_state_machine(phba, ndlp, cmdiocb, |
1201 | NLP_EVT_CMPL_LOGO); | 1198 | NLP_EVT_CMPL_LOGO); |
1202 | } | 1199 | } |
@@ -2201,7 +2198,7 @@ lpfc_els_disc_adisc(struct lpfc_hba * phba) | |||
2201 | phba->fc_flag &= ~FC_NLP_MORE; | 2198 | phba->fc_flag &= ~FC_NLP_MORE; |
2202 | spin_unlock_irq(phba->host->host_lock); | 2199 | spin_unlock_irq(phba->host->host_lock); |
2203 | } | 2200 | } |
2204 | return(sentadisc); | 2201 | return sentadisc; |
2205 | } | 2202 | } |
2206 | 2203 | ||
2207 | int | 2204 | int |
@@ -2238,7 +2235,7 @@ lpfc_els_disc_plogi(struct lpfc_hba * phba) | |||
2238 | phba->fc_flag &= ~FC_NLP_MORE; | 2235 | phba->fc_flag &= ~FC_NLP_MORE; |
2239 | spin_unlock_irq(phba->host->host_lock); | 2236 | spin_unlock_irq(phba->host->host_lock); |
2240 | } | 2237 | } |
2241 | return(sentplogi); | 2238 | return sentplogi; |
2242 | } | 2239 | } |
2243 | 2240 | ||
2244 | int | 2241 | int |
@@ -2591,8 +2588,7 @@ lpfc_els_rcv_flogi(struct lpfc_hba * phba, | |||
2591 | mempool_free( mbox, phba->mbox_mem_pool); | 2588 | mempool_free( mbox, phba->mbox_mem_pool); |
2592 | } | 2589 | } |
2593 | return 1; | 2590 | return 1; |
2594 | } | 2591 | } else if (rc > 0) { /* greater than */ |
2595 | else if (rc > 0) { /* greater than */ | ||
2596 | spin_lock_irq(phba->host->host_lock); | 2592 | spin_lock_irq(phba->host->host_lock); |
2597 | phba->fc_flag |= FC_PT2PT_PLOGI; | 2593 | phba->fc_flag |= FC_PT2PT_PLOGI; |
2598 | spin_unlock_irq(phba->host->host_lock); | 2594 | spin_unlock_irq(phba->host->host_lock); |
@@ -2755,8 +2751,8 @@ lpfc_els_rcv_rps(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, | |||
2755 | RPS *rps; | 2751 | RPS *rps; |
2756 | struct ls_rjt stat; | 2752 | struct ls_rjt stat; |
2757 | 2753 | ||
2758 | if((ndlp->nlp_state != NLP_STE_UNMAPPED_NODE) && | 2754 | if ((ndlp->nlp_state != NLP_STE_UNMAPPED_NODE) && |
2759 | (ndlp->nlp_state != NLP_STE_MAPPED_NODE)) { | 2755 | (ndlp->nlp_state != NLP_STE_MAPPED_NODE)) { |
2760 | stat.un.b.lsRjtRsvd0 = 0; | 2756 | stat.un.b.lsRjtRsvd0 = 0; |
2761 | stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; | 2757 | stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; |
2762 | stat.un.b.lsRjtRsnCodeExp = LSEXP_CANT_GIVE_DATA; | 2758 | stat.un.b.lsRjtRsnCodeExp = LSEXP_CANT_GIVE_DATA; |
@@ -2866,8 +2862,8 @@ lpfc_els_rcv_rpl(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, | |||
2866 | RPL *rpl; | 2862 | RPL *rpl; |
2867 | struct ls_rjt stat; | 2863 | struct ls_rjt stat; |
2868 | 2864 | ||
2869 | if((ndlp->nlp_state != NLP_STE_UNMAPPED_NODE) && | 2865 | if ((ndlp->nlp_state != NLP_STE_UNMAPPED_NODE) && |
2870 | (ndlp->nlp_state != NLP_STE_MAPPED_NODE)) { | 2866 | (ndlp->nlp_state != NLP_STE_MAPPED_NODE)) { |
2871 | stat.un.b.lsRjtRsvd0 = 0; | 2867 | stat.un.b.lsRjtRsvd0 = 0; |
2872 | stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; | 2868 | stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; |
2873 | stat.un.b.lsRjtRsnCodeExp = LSEXP_CANT_GIVE_DATA; | 2869 | stat.un.b.lsRjtRsnCodeExp = LSEXP_CANT_GIVE_DATA; |
@@ -2886,8 +2882,7 @@ lpfc_els_rcv_rpl(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, | |||
2886 | ((maxsize == 0) || | 2882 | ((maxsize == 0) || |
2887 | ((maxsize * sizeof(uint32_t)) >= sizeof(RPL_RSP)))) { | 2883 | ((maxsize * sizeof(uint32_t)) >= sizeof(RPL_RSP)))) { |
2888 | cmdsize = sizeof(uint32_t) + sizeof(RPL_RSP); | 2884 | cmdsize = sizeof(uint32_t) + sizeof(RPL_RSP); |
2889 | } | 2885 | } else { |
2890 | else { | ||
2891 | cmdsize = sizeof(uint32_t) + maxsize * sizeof(uint32_t); | 2886 | cmdsize = sizeof(uint32_t) + maxsize * sizeof(uint32_t); |
2892 | } | 2887 | } |
2893 | lpfc_els_rsp_rpl_acc(phba, cmdsize, cmdiocb, ndlp); | 2888 | lpfc_els_rsp_rpl_acc(phba, cmdsize, cmdiocb, ndlp); |
@@ -3032,8 +3027,7 @@ lpfc_els_rcv_fan(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, | |||
3032 | * other NLP_FABRIC logins | 3027 | * other NLP_FABRIC logins |
3033 | */ | 3028 | */ |
3034 | lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); | 3029 | lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); |
3035 | } | 3030 | } else if (!(ndlp->nlp_flag & NLP_NPR_ADISC)) { |
3036 | else if (!(ndlp->nlp_flag & NLP_NPR_ADISC)) { | ||
3037 | /* Fail outstanding I/O now since this | 3031 | /* Fail outstanding I/O now since this |
3038 | * device is marked for PLOGI | 3032 | * device is marked for PLOGI |
3039 | */ | 3033 | */ |
@@ -3228,8 +3222,7 @@ lpfc_els_flush_cmd(struct lpfc_hba * phba) | |||
3228 | spin_unlock_irq(phba->host->host_lock); | 3222 | spin_unlock_irq(phba->host->host_lock); |
3229 | (piocb->iocb_cmpl) (phba, piocb, piocb); | 3223 | (piocb->iocb_cmpl) (phba, piocb, piocb); |
3230 | spin_lock_irq(phba->host->host_lock); | 3224 | spin_lock_irq(phba->host->host_lock); |
3231 | } | 3225 | } else |
3232 | else | ||
3233 | lpfc_sli_release_iocbq(phba, piocb); | 3226 | lpfc_sli_release_iocbq(phba, piocb); |
3234 | } | 3227 | } |
3235 | 3228 | ||
@@ -3253,8 +3246,7 @@ lpfc_els_flush_cmd(struct lpfc_hba * phba) | |||
3253 | spin_unlock_irq(phba->host->host_lock); | 3246 | spin_unlock_irq(phba->host->host_lock); |
3254 | (piocb->iocb_cmpl) (phba, piocb, piocb); | 3247 | (piocb->iocb_cmpl) (phba, piocb, piocb); |
3255 | spin_lock_irq(phba->host->host_lock); | 3248 | spin_lock_irq(phba->host->host_lock); |
3256 | } | 3249 | } else |
3257 | else | ||
3258 | lpfc_sli_release_iocbq(phba, piocb); | 3250 | lpfc_sli_release_iocbq(phba, piocb); |
3259 | } | 3251 | } |
3260 | spin_unlock_irq(phba->host->host_lock); | 3252 | spin_unlock_irq(phba->host->host_lock); |