diff options
author | James Smart <james.smart@emulex.com> | 2011-05-24 11:44:12 -0400 |
---|---|---|
committer | James Bottomley <jbottomley@parallels.com> | 2011-05-26 23:49:38 -0400 |
commit | 6d368e532168cb621731b3936945cd910cb25bd0 (patch) | |
tree | 6d49d2dea91c6637ab4cf38b61ec3a0eecc0bdfb /drivers/scsi/lpfc/lpfc_nportdisc.c | |
parent | 52d5244096017bbd11164479116baceaede342b0 (diff) |
[SCSI] lpfc 8.3.24: Add resource extent support
This patch adds support for hardware that returns resource ids via
extents rather than contiguous ranges.
[jejb: checkpatch.pl fixes]
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_nportdisc.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_nportdisc.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index 9bf7eb85d17..2ddd02f7c60 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c | |||
@@ -652,6 +652,7 @@ lpfc_disc_set_adisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) | |||
652 | lpfc_unreg_rpi(vport, ndlp); | 652 | lpfc_unreg_rpi(vport, ndlp); |
653 | return 0; | 653 | return 0; |
654 | } | 654 | } |
655 | |||
655 | /** | 656 | /** |
656 | * lpfc_release_rpi - Release a RPI by issuing unreg_login mailbox cmd. | 657 | * lpfc_release_rpi - Release a RPI by issuing unreg_login mailbox cmd. |
657 | * @phba : Pointer to lpfc_hba structure. | 658 | * @phba : Pointer to lpfc_hba structure. |
@@ -1394,8 +1395,11 @@ lpfc_cmpl_reglogin_reglogin_issue(struct lpfc_vport *vport, | |||
1394 | if (mb->mbxStatus) { | 1395 | if (mb->mbxStatus) { |
1395 | /* RegLogin failed */ | 1396 | /* RegLogin failed */ |
1396 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 1397 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, |
1397 | "0246 RegLogin failed Data: x%x x%x x%x\n", | 1398 | "0246 RegLogin failed Data: x%x x%x x%x x%x " |
1398 | did, mb->mbxStatus, vport->port_state); | 1399 | "x%x\n", |
1400 | did, mb->mbxStatus, vport->port_state, | ||
1401 | mb->un.varRegLogin.vpi, | ||
1402 | mb->un.varRegLogin.rpi); | ||
1399 | /* | 1403 | /* |
1400 | * If RegLogin failed due to lack of HBA resources do not | 1404 | * If RegLogin failed due to lack of HBA resources do not |
1401 | * retry discovery. | 1405 | * retry discovery. |
@@ -1419,7 +1423,10 @@ lpfc_cmpl_reglogin_reglogin_issue(struct lpfc_vport *vport, | |||
1419 | return ndlp->nlp_state; | 1423 | return ndlp->nlp_state; |
1420 | } | 1424 | } |
1421 | 1425 | ||
1422 | ndlp->nlp_rpi = mb->un.varWords[0]; | 1426 | /* SLI4 ports have preallocated logical rpis. */ |
1427 | if (vport->phba->sli_rev < LPFC_SLI_REV4) | ||
1428 | ndlp->nlp_rpi = mb->un.varWords[0]; | ||
1429 | |||
1423 | ndlp->nlp_flag |= NLP_RPI_REGISTERED; | 1430 | ndlp->nlp_flag |= NLP_RPI_REGISTERED; |
1424 | 1431 | ||
1425 | /* Only if we are not a fabric nport do we issue PRLI */ | 1432 | /* Only if we are not a fabric nport do we issue PRLI */ |
@@ -2020,7 +2027,9 @@ lpfc_cmpl_reglogin_npr_node(struct lpfc_vport *vport, | |||
2020 | MAILBOX_t *mb = &pmb->u.mb; | 2027 | MAILBOX_t *mb = &pmb->u.mb; |
2021 | 2028 | ||
2022 | if (!mb->mbxStatus) { | 2029 | if (!mb->mbxStatus) { |
2023 | ndlp->nlp_rpi = mb->un.varWords[0]; | 2030 | /* SLI4 ports have preallocated logical rpis. */ |
2031 | if (vport->phba->sli_rev < LPFC_SLI_REV4) | ||
2032 | ndlp->nlp_rpi = mb->un.varWords[0]; | ||
2024 | ndlp->nlp_flag |= NLP_RPI_REGISTERED; | 2033 | ndlp->nlp_flag |= NLP_RPI_REGISTERED; |
2025 | } else { | 2034 | } else { |
2026 | if (ndlp->nlp_flag & NLP_NODEV_REMOVE) { | 2035 | if (ndlp->nlp_flag & NLP_NODEV_REMOVE) { |