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_nportdisc.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_nportdisc.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_nportdisc.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index 4bf232a9adc9..dba11d94d27d 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.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 * |
@@ -150,8 +150,7 @@ lpfc_check_elscmpl_iocb(struct lpfc_hba * phba, | |||
150 | lp = (uint32_t *) prsp->virt; | 150 | lp = (uint32_t *) prsp->virt; |
151 | ptr = (void *)((uint8_t *)lp + sizeof(uint32_t)); | 151 | ptr = (void *)((uint8_t *)lp + sizeof(uint32_t)); |
152 | } | 152 | } |
153 | } | 153 | } else { |
154 | else { | ||
155 | /* Force ulpStatus error since we are returning NULL ptr */ | 154 | /* Force ulpStatus error since we are returning NULL ptr */ |
156 | if (!(irsp->ulpStatus)) { | 155 | if (!(irsp->ulpStatus)) { |
157 | irsp->ulpStatus = IOSTAT_LOCAL_REJECT; | 156 | irsp->ulpStatus = IOSTAT_LOCAL_REJECT; |
@@ -301,12 +300,10 @@ lpfc_rcv_plogi(struct lpfc_hba * phba, | |||
301 | /* Start discovery - this should just do | 300 | /* Start discovery - this should just do |
302 | CLEAR_LA */ | 301 | CLEAR_LA */ |
303 | lpfc_disc_start(phba); | 302 | lpfc_disc_start(phba); |
304 | } | 303 | } else { |
305 | else { | ||
306 | lpfc_initial_flogi(phba); | 304 | lpfc_initial_flogi(phba); |
307 | } | 305 | } |
308 | } | 306 | } else { |
309 | else { | ||
310 | stat.un.b.lsRjtRsnCode = LSRJT_LOGICAL_BSY; | 307 | stat.un.b.lsRjtRsnCode = LSRJT_LOGICAL_BSY; |
311 | stat.un.b.lsRjtRsnCodeExp = LSEXP_NOTHING_MORE; | 308 | stat.un.b.lsRjtRsnCodeExp = LSEXP_NOTHING_MORE; |
312 | lpfc_els_rsp_reject(phba, stat.un.lsRjtError, cmdiocb, | 309 | lpfc_els_rsp_reject(phba, stat.un.lsRjtError, cmdiocb, |
@@ -354,7 +351,7 @@ lpfc_rcv_plogi(struct lpfc_hba * phba, | |||
354 | ((sp->cmn.bbRcvSizeMsb & 0x0F) << 8) | sp->cmn.bbRcvSizeLsb; | 351 | ((sp->cmn.bbRcvSizeMsb & 0x0F) << 8) | sp->cmn.bbRcvSizeLsb; |
355 | 352 | ||
356 | /* no need to reg_login if we are already in one of these states */ | 353 | /* no need to reg_login if we are already in one of these states */ |
357 | switch(ndlp->nlp_state) { | 354 | switch (ndlp->nlp_state) { |
358 | case NLP_STE_NPR_NODE: | 355 | case NLP_STE_NPR_NODE: |
359 | if (!(ndlp->nlp_flag & NLP_NPR_ADISC)) | 356 | if (!(ndlp->nlp_flag & NLP_NPR_ADISC)) |
360 | break; | 357 | break; |
@@ -444,8 +441,7 @@ lpfc_rcv_padisc(struct lpfc_hba * phba, | |||
444 | (lpfc_check_adisc(phba, ndlp, pnn, ppn))) { | 441 | (lpfc_check_adisc(phba, ndlp, pnn, ppn))) { |
445 | if (cmd == ELS_CMD_ADISC) { | 442 | if (cmd == ELS_CMD_ADISC) { |
446 | lpfc_els_rsp_adisc_acc(phba, cmdiocb, ndlp); | 443 | lpfc_els_rsp_adisc_acc(phba, cmdiocb, ndlp); |
447 | } | 444 | } else { |
448 | else { | ||
449 | lpfc_els_rsp_acc(phba, ELS_CMD_PLOGI, cmdiocb, ndlp, | 445 | lpfc_els_rsp_acc(phba, ELS_CMD_PLOGI, cmdiocb, ndlp, |
450 | NULL, 0); | 446 | NULL, 0); |
451 | } | 447 | } |
@@ -672,8 +668,7 @@ lpfc_rcv_plogi_plogi_issue(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp, | |||
672 | stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; | 668 | stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; |
673 | stat.un.b.lsRjtRsnCodeExp = LSEXP_CMD_IN_PROGRESS; | 669 | stat.un.b.lsRjtRsnCodeExp = LSEXP_CMD_IN_PROGRESS; |
674 | lpfc_els_rsp_reject(phba, stat.un.lsRjtError, cmdiocb, ndlp); | 670 | lpfc_els_rsp_reject(phba, stat.un.lsRjtError, cmdiocb, ndlp); |
675 | } | 671 | } else { |
676 | else { | ||
677 | lpfc_rcv_plogi(phba, ndlp, cmdiocb); | 672 | lpfc_rcv_plogi(phba, ndlp, cmdiocb); |
678 | } /* if our portname was less */ | 673 | } /* if our portname was less */ |
679 | 674 | ||
@@ -708,8 +703,7 @@ lpfc_rcv_els_plogi_issue(struct lpfc_hba * phba, | |||
708 | 703 | ||
709 | if (evt == NLP_EVT_RCV_LOGO) { | 704 | if (evt == NLP_EVT_RCV_LOGO) { |
710 | lpfc_els_rsp_acc(phba, ELS_CMD_ACC, cmdiocb, ndlp, NULL, 0); | 705 | lpfc_els_rsp_acc(phba, ELS_CMD_ACC, cmdiocb, ndlp, NULL, 0); |
711 | } | 706 | } else { |
712 | else { | ||
713 | lpfc_issue_els_logo(phba, ndlp, 0); | 707 | lpfc_issue_els_logo(phba, ndlp, 0); |
714 | } | 708 | } |
715 | 709 | ||
@@ -803,7 +797,7 @@ lpfc_cmpl_plogi_plogi_issue(struct lpfc_hba * phba, | |||
803 | * execute first, queue this command to | 797 | * execute first, queue this command to |
804 | * be processed later. | 798 | * be processed later. |
805 | */ | 799 | */ |
806 | switch(ndlp->nlp_DID) { | 800 | switch (ndlp->nlp_DID) { |
807 | case NameServer_DID: | 801 | case NameServer_DID: |
808 | mbox->mbox_cmpl = | 802 | mbox->mbox_cmpl = |
809 | lpfc_mbx_cmpl_ns_reg_login; | 803 | lpfc_mbx_cmpl_ns_reg_login; |