Loading drivers/scsi/lpfc/lpfc_ct.c +1 −1 Original line number Diff line number Diff line /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * * Copyright (C) 2004-2005 Emulex. All rights reserved. * * Copyright (C) 2004-2006 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. * * www.emulex.com * * * Loading drivers/scsi/lpfc/lpfc_els.c +16 −24 Original line number Diff line number Diff line /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * * Copyright (C) 2004-2005 Emulex. All rights reserved. * * Copyright (C) 2004-2006 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. * * www.emulex.com * * Portions Copyright (C) 2004-2005 Christoph Hellwig * Loading Loading @@ -717,8 +717,7 @@ lpfc_cmpl_els_plogi(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, (irsp->un.ulpWord[4] == IOERR_LINK_DOWN) || (irsp->un.ulpWord[4] == IOERR_SLI_DOWN))) { rc = NLP_STE_FREED_NODE; } else { } else { rc = lpfc_disc_state_machine(phba, ndlp, cmdiocb, NLP_EVT_CMPL_PLOGI); } Loading Loading @@ -861,8 +860,7 @@ lpfc_cmpl_els_prli(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, (irsp->un.ulpWord[4] == IOERR_LINK_DOWN) || (irsp->un.ulpWord[4] == IOERR_SLI_DOWN))) { goto out; } else { } else { lpfc_disc_state_machine(phba, ndlp, cmdiocb, NLP_EVT_CMPL_PRLI); } Loading Loading @@ -1195,8 +1193,7 @@ lpfc_cmpl_els_logo(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, (irsp->un.ulpWord[4] == IOERR_LINK_DOWN) || (irsp->un.ulpWord[4] == IOERR_SLI_DOWN))) { goto out; } else { } else { lpfc_disc_state_machine(phba, ndlp, cmdiocb, NLP_EVT_CMPL_LOGO); } Loading Loading @@ -2201,7 +2198,7 @@ lpfc_els_disc_adisc(struct lpfc_hba * phba) phba->fc_flag &= ~FC_NLP_MORE; spin_unlock_irq(phba->host->host_lock); } return(sentadisc); return sentadisc; } int Loading Loading @@ -2238,7 +2235,7 @@ lpfc_els_disc_plogi(struct lpfc_hba * phba) phba->fc_flag &= ~FC_NLP_MORE; spin_unlock_irq(phba->host->host_lock); } return(sentplogi); return sentplogi; } int Loading Loading @@ -2591,8 +2588,7 @@ lpfc_els_rcv_flogi(struct lpfc_hba * phba, mempool_free( mbox, phba->mbox_mem_pool); } return 1; } else if (rc > 0) { /* greater than */ } else if (rc > 0) { /* greater than */ spin_lock_irq(phba->host->host_lock); phba->fc_flag |= FC_PT2PT_PLOGI; spin_unlock_irq(phba->host->host_lock); Loading Loading @@ -2886,8 +2882,7 @@ lpfc_els_rcv_rpl(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, ((maxsize == 0) || ((maxsize * sizeof(uint32_t)) >= sizeof(RPL_RSP)))) { cmdsize = sizeof(uint32_t) + sizeof(RPL_RSP); } else { } else { cmdsize = sizeof(uint32_t) + maxsize * sizeof(uint32_t); } lpfc_els_rsp_rpl_acc(phba, cmdsize, cmdiocb, ndlp); Loading Loading @@ -3032,8 +3027,7 @@ lpfc_els_rcv_fan(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, * other NLP_FABRIC logins */ lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); } else if (!(ndlp->nlp_flag & NLP_NPR_ADISC)) { } else if (!(ndlp->nlp_flag & NLP_NPR_ADISC)) { /* Fail outstanding I/O now since this * device is marked for PLOGI */ Loading Loading @@ -3228,8 +3222,7 @@ lpfc_els_flush_cmd(struct lpfc_hba * phba) spin_unlock_irq(phba->host->host_lock); (piocb->iocb_cmpl) (phba, piocb, piocb); spin_lock_irq(phba->host->host_lock); } else } else lpfc_sli_release_iocbq(phba, piocb); } Loading @@ -3253,8 +3246,7 @@ lpfc_els_flush_cmd(struct lpfc_hba * phba) spin_unlock_irq(phba->host->host_lock); (piocb->iocb_cmpl) (phba, piocb, piocb); spin_lock_irq(phba->host->host_lock); } else } else lpfc_sli_release_iocbq(phba, piocb); } spin_unlock_irq(phba->host->host_lock); Loading drivers/scsi/lpfc/lpfc_hbadisc.c +48 −55 Original line number Diff line number Diff line Loading @@ -357,8 +357,7 @@ lpfc_linkdown(struct lpfc_hba * phba) /* Check config parameter use-adisc or FCP-2 */ if ((rc != NLP_STE_FREED_NODE) && (phba->cfg_use_adisc == 0) && !(ndlp->nlp_fcp_info & NLP_FCP_2_DEVICE)) { !(ndlp->nlp_fcp_info & NLP_FCP_2_DEVICE)) { /* We know we will have to relogin, so * unreglogin the rpi right now to fail * any outstanding I/Os quickly. Loading Loading @@ -398,7 +397,7 @@ lpfc_linkdown(struct lpfc_hba * phba) lpfc_can_disctmo(phba); /* Must process IOCBs on all rings to handle ABORTed I/Os */ return (0); return 0; } static int Loading Loading @@ -1115,10 +1114,9 @@ lpfc_nlp_list(struct lpfc_hba * phba, struct lpfc_nodelist * nlp, int list) psli = &phba->sli; /* Sanity check to ensure we are not moving to / from the same list */ if ((nlp->nlp_flag & NLP_LIST_MASK) == list) { if ((nlp->nlp_flag & NLP_LIST_MASK) == list) if (list != NLP_NO_LIST) return(0); } return 0; switch (nlp->nlp_flag & NLP_LIST_MASK) { case NLP_NO_LIST: /* Not on any list */ Loading Loading @@ -1287,10 +1285,10 @@ lpfc_nlp_list(struct lpfc_hba * phba, struct lpfc_nodelist * nlp, int list) list_add_tail(&nlp->nlp_listp, &phba->fc_npr_list); phba->fc_npr_cnt++; if (!(nlp->nlp_flag & NLP_NODEV_TMO)) { if (!(nlp->nlp_flag & NLP_NODEV_TMO)) mod_timer(&nlp->nlp_tmofunc, jiffies + HZ * phba->cfg_nodev_tmo); } spin_lock_irq(phba->host->host_lock); nlp->nlp_flag |= NLP_NODEV_TMO; nlp->nlp_flag &= ~NLP_RCV_PLOGI; Loading Loading @@ -1342,7 +1340,7 @@ lpfc_nlp_list(struct lpfc_hba * phba, struct lpfc_nodelist * nlp, int list) } } } return (0); return 0; } /* Loading Loading @@ -1401,7 +1399,7 @@ lpfc_can_disctmo(struct lpfc_hba * phba) phba->brd_no, phba->hba_state, phba->fc_flag, phba->fc_plogi_cnt, phba->fc_adisc_cnt); return (0); return 0; } /* Loading @@ -1422,11 +1420,11 @@ lpfc_check_sli_ndlp(struct lpfc_hba * phba, switch (icmd->ulpCommand) { case CMD_GEN_REQUEST64_CR: if (icmd->ulpContext == (volatile ushort)ndlp->nlp_rpi) return (1); return 1; case CMD_ELS_REQUEST64_CR: case CMD_XMIT_ELS_RSP64_CX: if (iocb->context1 == (uint8_t *) ndlp) return (1); return 1; } } else if (pring->ringno == psli->ip_ring) { Loading @@ -1434,15 +1432,15 @@ lpfc_check_sli_ndlp(struct lpfc_hba * phba, /* Skip match check if waiting to relogin to FCP target */ if ((ndlp->nlp_type & NLP_FCP_TARGET) && (ndlp->nlp_flag & NLP_DELAY_TMO)) { return (0); return 0; } if (icmd->ulpContext == (volatile ushort)ndlp->nlp_rpi) { return (1); return 1; } } else if (pring->ringno == psli->next_ring) { } return (0); return 0; } /* Loading Loading @@ -1503,7 +1501,7 @@ lpfc_no_rpi(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp) } } return (0); return 0; } /* Loading Loading @@ -1604,7 +1602,7 @@ lpfc_freenode(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp) lpfc_unreg_rpi(phba, ndlp); return (0); return 0; } /* Loading Loading @@ -1640,12 +1638,11 @@ lpfc_nlp_remove(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp) spin_lock_irq(phba->host->host_lock); ndlp->nlp_flag |= NLP_DELAY_REMOVE; spin_unlock_irq(phba->host->host_lock); } else { } else { lpfc_freenode(phba, ndlp); mempool_free( ndlp, phba->nlp_mem_pool); } return(0); return 0; } static int Loading @@ -1656,20 +1653,20 @@ lpfc_matchdid(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp, uint32_t did) D_ID matchdid; if (did == Bcast_DID) return (0); return 0; if (ndlp->nlp_DID == 0) { return (0); return 0; } /* First check for Direct match */ if (ndlp->nlp_DID == did) return (1); return 1; /* Next check for area/domain identically equals 0 match */ mydid.un.word = phba->fc_myDID; if ((mydid.un.b.domain == 0) && (mydid.un.b.area == 0)) { return (0); return 0; } matchdid.un.word = did; Loading @@ -1680,9 +1677,9 @@ lpfc_matchdid(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp, uint32_t did) if ((ndlpdid.un.b.domain == 0) && (ndlpdid.un.b.area == 0)) { if (ndlpdid.un.b.id) return (1); return 1; } return (0); return 0; } matchdid.un.word = ndlp->nlp_DID; Loading @@ -1691,11 +1688,11 @@ lpfc_matchdid(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp, uint32_t did) if ((matchdid.un.b.domain == 0) && (matchdid.un.b.area == 0)) { if (matchdid.un.b.id) return (1); return 1; } } } return (0); return 0; } /* Search for a nodelist entry on a specific list */ Loading @@ -1720,7 +1717,7 @@ lpfc_findnode_did(struct lpfc_hba * phba, uint32_t order, uint32_t did) phba->brd_no, ndlp, ndlp->nlp_DID, ndlp->nlp_flag, data1); return (ndlp); return ndlp; } } } Loading @@ -1741,7 +1738,7 @@ lpfc_findnode_did(struct lpfc_hba * phba, uint32_t order, uint32_t did) phba->brd_no, ndlp, ndlp->nlp_DID, ndlp->nlp_flag, data1); return (ndlp); return ndlp; } } } Loading @@ -1763,7 +1760,7 @@ lpfc_findnode_did(struct lpfc_hba * phba, uint32_t order, uint32_t did) phba->brd_no, ndlp, ndlp->nlp_DID, ndlp->nlp_flag, data1); return (ndlp); return ndlp; } } } Loading @@ -1785,7 +1782,7 @@ lpfc_findnode_did(struct lpfc_hba * phba, uint32_t order, uint32_t did) phba->brd_no, ndlp, ndlp->nlp_DID, ndlp->nlp_flag, data1); return (ndlp); return ndlp; } } } Loading @@ -1807,7 +1804,7 @@ lpfc_findnode_did(struct lpfc_hba * phba, uint32_t order, uint32_t did) phba->brd_no, ndlp, ndlp->nlp_DID, ndlp->nlp_flag, data1); return (ndlp); return ndlp; } } } Loading @@ -1829,7 +1826,7 @@ lpfc_findnode_did(struct lpfc_hba * phba, uint32_t order, uint32_t did) phba->brd_no, ndlp, ndlp->nlp_DID, ndlp->nlp_flag, data1); return (ndlp); return ndlp; } } } Loading @@ -1851,7 +1848,7 @@ lpfc_findnode_did(struct lpfc_hba * phba, uint32_t order, uint32_t did) phba->brd_no, ndlp, ndlp->nlp_DID, ndlp->nlp_flag, data1); return (ndlp); return ndlp; } } } Loading @@ -1873,7 +1870,7 @@ lpfc_findnode_did(struct lpfc_hba * phba, uint32_t order, uint32_t did) phba->brd_no, ndlp, ndlp->nlp_DID, ndlp->nlp_flag, data1); return (ndlp); return ndlp; } } } Loading Loading @@ -1927,13 +1924,11 @@ lpfc_setup_disc_node(struct lpfc_hba * phba, uint32_t did) list_del_init(&ndlp->els_retry_evt. evt_listp); } } else { } else { ndlp->nlp_flag &= ~NLP_NPR_2B_DISC; ndlp = NULL; } } else { } else { flg = ndlp->nlp_flag & NLP_LIST_MASK; if ((flg == NLP_ADISC_LIST) || (flg == NLP_PLOGI_LIST)) return NULL; Loading Loading @@ -2084,8 +2079,7 @@ lpfc_disc_start(struct lpfc_hba * phba) spin_lock_irq(phba->host->host_lock); phba->fc_flag &= ~FC_RSCN_MODE; spin_unlock_irq(phba->host->host_lock); } else } else lpfc_els_handle_rscn(phba); } } Loading Loading @@ -2268,8 +2262,7 @@ lpfc_disc_timeout_handler(struct lpfc_hba *phba) if (ndlp->nlp_type & NLP_FABRIC) { /* Clean up the ndlp on Fabric connections */ lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); } else if (!(ndlp->nlp_flag & NLP_NPR_ADISC)) { } else if (!(ndlp->nlp_flag & NLP_NPR_ADISC)) { /* Fail outstanding IO now since device * is marked for PLOGI. */ Loading Loading @@ -2544,7 +2537,7 @@ lpfc_findnode_rpi(struct lpfc_hba * phba, uint16_t rpi) for (i = 0; i < ARRAY_SIZE(lists); i++ ) list_for_each_entry(ndlp, lists[i], nlp_listp) if (ndlp->nlp_rpi == rpi) return (ndlp); return ndlp; return NULL; } Loading drivers/scsi/lpfc/lpfc_nportdisc.c +9 −15 Original line number Diff line number Diff line /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * * Copyright (C) 2004-2005 Emulex. All rights reserved. * * Copyright (C) 2004-2006 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. * * www.emulex.com * * Portions Copyright (C) 2004-2005 Christoph Hellwig * Loading Loading @@ -150,8 +150,7 @@ lpfc_check_elscmpl_iocb(struct lpfc_hba * phba, lp = (uint32_t *) prsp->virt; ptr = (void *)((uint8_t *)lp + sizeof(uint32_t)); } } else { } else { /* Force ulpStatus error since we are returning NULL ptr */ if (!(irsp->ulpStatus)) { irsp->ulpStatus = IOSTAT_LOCAL_REJECT; Loading Loading @@ -301,12 +300,10 @@ lpfc_rcv_plogi(struct lpfc_hba * phba, /* Start discovery - this should just do CLEAR_LA */ lpfc_disc_start(phba); } else { } else { lpfc_initial_flogi(phba); } } else { } else { stat.un.b.lsRjtRsnCode = LSRJT_LOGICAL_BSY; stat.un.b.lsRjtRsnCodeExp = LSEXP_NOTHING_MORE; lpfc_els_rsp_reject(phba, stat.un.lsRjtError, cmdiocb, Loading Loading @@ -444,8 +441,7 @@ lpfc_rcv_padisc(struct lpfc_hba * phba, (lpfc_check_adisc(phba, ndlp, pnn, ppn))) { if (cmd == ELS_CMD_ADISC) { lpfc_els_rsp_adisc_acc(phba, cmdiocb, ndlp); } else { } else { lpfc_els_rsp_acc(phba, ELS_CMD_PLOGI, cmdiocb, ndlp, NULL, 0); } Loading Loading @@ -672,8 +668,7 @@ lpfc_rcv_plogi_plogi_issue(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp, stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; stat.un.b.lsRjtRsnCodeExp = LSEXP_CMD_IN_PROGRESS; lpfc_els_rsp_reject(phba, stat.un.lsRjtError, cmdiocb, ndlp); } else { } else { lpfc_rcv_plogi(phba, ndlp, cmdiocb); } /* if our portname was less */ Loading Loading @@ -708,8 +703,7 @@ lpfc_rcv_els_plogi_issue(struct lpfc_hba * phba, if (evt == NLP_EVT_RCV_LOGO) { lpfc_els_rsp_acc(phba, ELS_CMD_ACC, cmdiocb, ndlp, NULL, 0); } else { } else { lpfc_issue_els_logo(phba, ndlp, 0); } Loading Loading
drivers/scsi/lpfc/lpfc_ct.c +1 −1 Original line number Diff line number Diff line /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * * Copyright (C) 2004-2005 Emulex. All rights reserved. * * Copyright (C) 2004-2006 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. * * www.emulex.com * * * Loading
drivers/scsi/lpfc/lpfc_els.c +16 −24 Original line number Diff line number Diff line /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * * Copyright (C) 2004-2005 Emulex. All rights reserved. * * Copyright (C) 2004-2006 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. * * www.emulex.com * * Portions Copyright (C) 2004-2005 Christoph Hellwig * Loading Loading @@ -717,8 +717,7 @@ lpfc_cmpl_els_plogi(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, (irsp->un.ulpWord[4] == IOERR_LINK_DOWN) || (irsp->un.ulpWord[4] == IOERR_SLI_DOWN))) { rc = NLP_STE_FREED_NODE; } else { } else { rc = lpfc_disc_state_machine(phba, ndlp, cmdiocb, NLP_EVT_CMPL_PLOGI); } Loading Loading @@ -861,8 +860,7 @@ lpfc_cmpl_els_prli(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, (irsp->un.ulpWord[4] == IOERR_LINK_DOWN) || (irsp->un.ulpWord[4] == IOERR_SLI_DOWN))) { goto out; } else { } else { lpfc_disc_state_machine(phba, ndlp, cmdiocb, NLP_EVT_CMPL_PRLI); } Loading Loading @@ -1195,8 +1193,7 @@ lpfc_cmpl_els_logo(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, (irsp->un.ulpWord[4] == IOERR_LINK_DOWN) || (irsp->un.ulpWord[4] == IOERR_SLI_DOWN))) { goto out; } else { } else { lpfc_disc_state_machine(phba, ndlp, cmdiocb, NLP_EVT_CMPL_LOGO); } Loading Loading @@ -2201,7 +2198,7 @@ lpfc_els_disc_adisc(struct lpfc_hba * phba) phba->fc_flag &= ~FC_NLP_MORE; spin_unlock_irq(phba->host->host_lock); } return(sentadisc); return sentadisc; } int Loading Loading @@ -2238,7 +2235,7 @@ lpfc_els_disc_plogi(struct lpfc_hba * phba) phba->fc_flag &= ~FC_NLP_MORE; spin_unlock_irq(phba->host->host_lock); } return(sentplogi); return sentplogi; } int Loading Loading @@ -2591,8 +2588,7 @@ lpfc_els_rcv_flogi(struct lpfc_hba * phba, mempool_free( mbox, phba->mbox_mem_pool); } return 1; } else if (rc > 0) { /* greater than */ } else if (rc > 0) { /* greater than */ spin_lock_irq(phba->host->host_lock); phba->fc_flag |= FC_PT2PT_PLOGI; spin_unlock_irq(phba->host->host_lock); Loading Loading @@ -2886,8 +2882,7 @@ lpfc_els_rcv_rpl(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, ((maxsize == 0) || ((maxsize * sizeof(uint32_t)) >= sizeof(RPL_RSP)))) { cmdsize = sizeof(uint32_t) + sizeof(RPL_RSP); } else { } else { cmdsize = sizeof(uint32_t) + maxsize * sizeof(uint32_t); } lpfc_els_rsp_rpl_acc(phba, cmdsize, cmdiocb, ndlp); Loading Loading @@ -3032,8 +3027,7 @@ lpfc_els_rcv_fan(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, * other NLP_FABRIC logins */ lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); } else if (!(ndlp->nlp_flag & NLP_NPR_ADISC)) { } else if (!(ndlp->nlp_flag & NLP_NPR_ADISC)) { /* Fail outstanding I/O now since this * device is marked for PLOGI */ Loading Loading @@ -3228,8 +3222,7 @@ lpfc_els_flush_cmd(struct lpfc_hba * phba) spin_unlock_irq(phba->host->host_lock); (piocb->iocb_cmpl) (phba, piocb, piocb); spin_lock_irq(phba->host->host_lock); } else } else lpfc_sli_release_iocbq(phba, piocb); } Loading @@ -3253,8 +3246,7 @@ lpfc_els_flush_cmd(struct lpfc_hba * phba) spin_unlock_irq(phba->host->host_lock); (piocb->iocb_cmpl) (phba, piocb, piocb); spin_lock_irq(phba->host->host_lock); } else } else lpfc_sli_release_iocbq(phba, piocb); } spin_unlock_irq(phba->host->host_lock); Loading
drivers/scsi/lpfc/lpfc_hbadisc.c +48 −55 Original line number Diff line number Diff line Loading @@ -357,8 +357,7 @@ lpfc_linkdown(struct lpfc_hba * phba) /* Check config parameter use-adisc or FCP-2 */ if ((rc != NLP_STE_FREED_NODE) && (phba->cfg_use_adisc == 0) && !(ndlp->nlp_fcp_info & NLP_FCP_2_DEVICE)) { !(ndlp->nlp_fcp_info & NLP_FCP_2_DEVICE)) { /* We know we will have to relogin, so * unreglogin the rpi right now to fail * any outstanding I/Os quickly. Loading Loading @@ -398,7 +397,7 @@ lpfc_linkdown(struct lpfc_hba * phba) lpfc_can_disctmo(phba); /* Must process IOCBs on all rings to handle ABORTed I/Os */ return (0); return 0; } static int Loading Loading @@ -1115,10 +1114,9 @@ lpfc_nlp_list(struct lpfc_hba * phba, struct lpfc_nodelist * nlp, int list) psli = &phba->sli; /* Sanity check to ensure we are not moving to / from the same list */ if ((nlp->nlp_flag & NLP_LIST_MASK) == list) { if ((nlp->nlp_flag & NLP_LIST_MASK) == list) if (list != NLP_NO_LIST) return(0); } return 0; switch (nlp->nlp_flag & NLP_LIST_MASK) { case NLP_NO_LIST: /* Not on any list */ Loading Loading @@ -1287,10 +1285,10 @@ lpfc_nlp_list(struct lpfc_hba * phba, struct lpfc_nodelist * nlp, int list) list_add_tail(&nlp->nlp_listp, &phba->fc_npr_list); phba->fc_npr_cnt++; if (!(nlp->nlp_flag & NLP_NODEV_TMO)) { if (!(nlp->nlp_flag & NLP_NODEV_TMO)) mod_timer(&nlp->nlp_tmofunc, jiffies + HZ * phba->cfg_nodev_tmo); } spin_lock_irq(phba->host->host_lock); nlp->nlp_flag |= NLP_NODEV_TMO; nlp->nlp_flag &= ~NLP_RCV_PLOGI; Loading Loading @@ -1342,7 +1340,7 @@ lpfc_nlp_list(struct lpfc_hba * phba, struct lpfc_nodelist * nlp, int list) } } } return (0); return 0; } /* Loading Loading @@ -1401,7 +1399,7 @@ lpfc_can_disctmo(struct lpfc_hba * phba) phba->brd_no, phba->hba_state, phba->fc_flag, phba->fc_plogi_cnt, phba->fc_adisc_cnt); return (0); return 0; } /* Loading @@ -1422,11 +1420,11 @@ lpfc_check_sli_ndlp(struct lpfc_hba * phba, switch (icmd->ulpCommand) { case CMD_GEN_REQUEST64_CR: if (icmd->ulpContext == (volatile ushort)ndlp->nlp_rpi) return (1); return 1; case CMD_ELS_REQUEST64_CR: case CMD_XMIT_ELS_RSP64_CX: if (iocb->context1 == (uint8_t *) ndlp) return (1); return 1; } } else if (pring->ringno == psli->ip_ring) { Loading @@ -1434,15 +1432,15 @@ lpfc_check_sli_ndlp(struct lpfc_hba * phba, /* Skip match check if waiting to relogin to FCP target */ if ((ndlp->nlp_type & NLP_FCP_TARGET) && (ndlp->nlp_flag & NLP_DELAY_TMO)) { return (0); return 0; } if (icmd->ulpContext == (volatile ushort)ndlp->nlp_rpi) { return (1); return 1; } } else if (pring->ringno == psli->next_ring) { } return (0); return 0; } /* Loading Loading @@ -1503,7 +1501,7 @@ lpfc_no_rpi(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp) } } return (0); return 0; } /* Loading Loading @@ -1604,7 +1602,7 @@ lpfc_freenode(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp) lpfc_unreg_rpi(phba, ndlp); return (0); return 0; } /* Loading Loading @@ -1640,12 +1638,11 @@ lpfc_nlp_remove(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp) spin_lock_irq(phba->host->host_lock); ndlp->nlp_flag |= NLP_DELAY_REMOVE; spin_unlock_irq(phba->host->host_lock); } else { } else { lpfc_freenode(phba, ndlp); mempool_free( ndlp, phba->nlp_mem_pool); } return(0); return 0; } static int Loading @@ -1656,20 +1653,20 @@ lpfc_matchdid(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp, uint32_t did) D_ID matchdid; if (did == Bcast_DID) return (0); return 0; if (ndlp->nlp_DID == 0) { return (0); return 0; } /* First check for Direct match */ if (ndlp->nlp_DID == did) return (1); return 1; /* Next check for area/domain identically equals 0 match */ mydid.un.word = phba->fc_myDID; if ((mydid.un.b.domain == 0) && (mydid.un.b.area == 0)) { return (0); return 0; } matchdid.un.word = did; Loading @@ -1680,9 +1677,9 @@ lpfc_matchdid(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp, uint32_t did) if ((ndlpdid.un.b.domain == 0) && (ndlpdid.un.b.area == 0)) { if (ndlpdid.un.b.id) return (1); return 1; } return (0); return 0; } matchdid.un.word = ndlp->nlp_DID; Loading @@ -1691,11 +1688,11 @@ lpfc_matchdid(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp, uint32_t did) if ((matchdid.un.b.domain == 0) && (matchdid.un.b.area == 0)) { if (matchdid.un.b.id) return (1); return 1; } } } return (0); return 0; } /* Search for a nodelist entry on a specific list */ Loading @@ -1720,7 +1717,7 @@ lpfc_findnode_did(struct lpfc_hba * phba, uint32_t order, uint32_t did) phba->brd_no, ndlp, ndlp->nlp_DID, ndlp->nlp_flag, data1); return (ndlp); return ndlp; } } } Loading @@ -1741,7 +1738,7 @@ lpfc_findnode_did(struct lpfc_hba * phba, uint32_t order, uint32_t did) phba->brd_no, ndlp, ndlp->nlp_DID, ndlp->nlp_flag, data1); return (ndlp); return ndlp; } } } Loading @@ -1763,7 +1760,7 @@ lpfc_findnode_did(struct lpfc_hba * phba, uint32_t order, uint32_t did) phba->brd_no, ndlp, ndlp->nlp_DID, ndlp->nlp_flag, data1); return (ndlp); return ndlp; } } } Loading @@ -1785,7 +1782,7 @@ lpfc_findnode_did(struct lpfc_hba * phba, uint32_t order, uint32_t did) phba->brd_no, ndlp, ndlp->nlp_DID, ndlp->nlp_flag, data1); return (ndlp); return ndlp; } } } Loading @@ -1807,7 +1804,7 @@ lpfc_findnode_did(struct lpfc_hba * phba, uint32_t order, uint32_t did) phba->brd_no, ndlp, ndlp->nlp_DID, ndlp->nlp_flag, data1); return (ndlp); return ndlp; } } } Loading @@ -1829,7 +1826,7 @@ lpfc_findnode_did(struct lpfc_hba * phba, uint32_t order, uint32_t did) phba->brd_no, ndlp, ndlp->nlp_DID, ndlp->nlp_flag, data1); return (ndlp); return ndlp; } } } Loading @@ -1851,7 +1848,7 @@ lpfc_findnode_did(struct lpfc_hba * phba, uint32_t order, uint32_t did) phba->brd_no, ndlp, ndlp->nlp_DID, ndlp->nlp_flag, data1); return (ndlp); return ndlp; } } } Loading @@ -1873,7 +1870,7 @@ lpfc_findnode_did(struct lpfc_hba * phba, uint32_t order, uint32_t did) phba->brd_no, ndlp, ndlp->nlp_DID, ndlp->nlp_flag, data1); return (ndlp); return ndlp; } } } Loading Loading @@ -1927,13 +1924,11 @@ lpfc_setup_disc_node(struct lpfc_hba * phba, uint32_t did) list_del_init(&ndlp->els_retry_evt. evt_listp); } } else { } else { ndlp->nlp_flag &= ~NLP_NPR_2B_DISC; ndlp = NULL; } } else { } else { flg = ndlp->nlp_flag & NLP_LIST_MASK; if ((flg == NLP_ADISC_LIST) || (flg == NLP_PLOGI_LIST)) return NULL; Loading Loading @@ -2084,8 +2079,7 @@ lpfc_disc_start(struct lpfc_hba * phba) spin_lock_irq(phba->host->host_lock); phba->fc_flag &= ~FC_RSCN_MODE; spin_unlock_irq(phba->host->host_lock); } else } else lpfc_els_handle_rscn(phba); } } Loading Loading @@ -2268,8 +2262,7 @@ lpfc_disc_timeout_handler(struct lpfc_hba *phba) if (ndlp->nlp_type & NLP_FABRIC) { /* Clean up the ndlp on Fabric connections */ lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); } else if (!(ndlp->nlp_flag & NLP_NPR_ADISC)) { } else if (!(ndlp->nlp_flag & NLP_NPR_ADISC)) { /* Fail outstanding IO now since device * is marked for PLOGI. */ Loading Loading @@ -2544,7 +2537,7 @@ lpfc_findnode_rpi(struct lpfc_hba * phba, uint16_t rpi) for (i = 0; i < ARRAY_SIZE(lists); i++ ) list_for_each_entry(ndlp, lists[i], nlp_listp) if (ndlp->nlp_rpi == rpi) return (ndlp); return ndlp; return NULL; } Loading
drivers/scsi/lpfc/lpfc_nportdisc.c +9 −15 Original line number Diff line number Diff line /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * * Copyright (C) 2004-2005 Emulex. All rights reserved. * * Copyright (C) 2004-2006 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. * * www.emulex.com * * Portions Copyright (C) 2004-2005 Christoph Hellwig * Loading Loading @@ -150,8 +150,7 @@ lpfc_check_elscmpl_iocb(struct lpfc_hba * phba, lp = (uint32_t *) prsp->virt; ptr = (void *)((uint8_t *)lp + sizeof(uint32_t)); } } else { } else { /* Force ulpStatus error since we are returning NULL ptr */ if (!(irsp->ulpStatus)) { irsp->ulpStatus = IOSTAT_LOCAL_REJECT; Loading Loading @@ -301,12 +300,10 @@ lpfc_rcv_plogi(struct lpfc_hba * phba, /* Start discovery - this should just do CLEAR_LA */ lpfc_disc_start(phba); } else { } else { lpfc_initial_flogi(phba); } } else { } else { stat.un.b.lsRjtRsnCode = LSRJT_LOGICAL_BSY; stat.un.b.lsRjtRsnCodeExp = LSEXP_NOTHING_MORE; lpfc_els_rsp_reject(phba, stat.un.lsRjtError, cmdiocb, Loading Loading @@ -444,8 +441,7 @@ lpfc_rcv_padisc(struct lpfc_hba * phba, (lpfc_check_adisc(phba, ndlp, pnn, ppn))) { if (cmd == ELS_CMD_ADISC) { lpfc_els_rsp_adisc_acc(phba, cmdiocb, ndlp); } else { } else { lpfc_els_rsp_acc(phba, ELS_CMD_PLOGI, cmdiocb, ndlp, NULL, 0); } Loading Loading @@ -672,8 +668,7 @@ lpfc_rcv_plogi_plogi_issue(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp, stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; stat.un.b.lsRjtRsnCodeExp = LSEXP_CMD_IN_PROGRESS; lpfc_els_rsp_reject(phba, stat.un.lsRjtError, cmdiocb, ndlp); } else { } else { lpfc_rcv_plogi(phba, ndlp, cmdiocb); } /* if our portname was less */ Loading Loading @@ -708,8 +703,7 @@ lpfc_rcv_els_plogi_issue(struct lpfc_hba * phba, if (evt == NLP_EVT_RCV_LOGO) { lpfc_els_rsp_acc(phba, ELS_CMD_ACC, cmdiocb, ndlp, NULL, 0); } else { } else { lpfc_issue_els_logo(phba, ndlp, 0); } Loading