diff options
author | James Smart <james.smart@emulex.com> | 2010-12-15 17:58:10 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-12-21 13:37:24 -0500 |
commit | 4042629e426da5ff0c793276a61103bd3f6b2183 (patch) | |
tree | 7e7337e1349da7854b45cdf436258dd91b29b59f /drivers/scsi/lpfc/lpfc_mbox.c | |
parent | 2fcee4bf874a8ae72ada68b62728d1fdeb30e3d4 (diff) |
[SCSI] lpfc 8.3.20: Updates to FC discovery commands
Updated commands used for ELS to utilize VPI
Allocate RPI at node creation time and pass in ELS commnads.
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_mbox.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_mbox.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c index b1dab92628ee..23403c650207 100644 --- a/drivers/scsi/lpfc/lpfc_mbox.c +++ b/drivers/scsi/lpfc/lpfc_mbox.c | |||
@@ -710,7 +710,7 @@ lpfc_read_lnk_stat(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb) | |||
710 | * @did: remote port identifier. | 710 | * @did: remote port identifier. |
711 | * @param: pointer to memory holding the server parameters. | 711 | * @param: pointer to memory holding the server parameters. |
712 | * @pmb: pointer to the driver internal queue element for mailbox command. | 712 | * @pmb: pointer to the driver internal queue element for mailbox command. |
713 | * @flag: action flag to be passed back for the complete function. | 713 | * @rpi: the rpi to use in the registration (usually only used for SLI4. |
714 | * | 714 | * |
715 | * The registration login mailbox command is used to register an N_Port or | 715 | * The registration login mailbox command is used to register an N_Port or |
716 | * F_Port login. This registration allows the HBA to cache the remote N_Port | 716 | * F_Port login. This registration allows the HBA to cache the remote N_Port |
@@ -729,7 +729,7 @@ lpfc_read_lnk_stat(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb) | |||
729 | **/ | 729 | **/ |
730 | int | 730 | int |
731 | lpfc_reg_rpi(struct lpfc_hba *phba, uint16_t vpi, uint32_t did, | 731 | lpfc_reg_rpi(struct lpfc_hba *phba, uint16_t vpi, uint32_t did, |
732 | uint8_t *param, LPFC_MBOXQ_t *pmb, uint32_t flag) | 732 | uint8_t *param, LPFC_MBOXQ_t *pmb, uint16_t rpi) |
733 | { | 733 | { |
734 | MAILBOX_t *mb = &pmb->u.mb; | 734 | MAILBOX_t *mb = &pmb->u.mb; |
735 | uint8_t *sparam; | 735 | uint8_t *sparam; |
@@ -739,17 +739,13 @@ lpfc_reg_rpi(struct lpfc_hba *phba, uint16_t vpi, uint32_t did, | |||
739 | 739 | ||
740 | mb->un.varRegLogin.rpi = 0; | 740 | mb->un.varRegLogin.rpi = 0; |
741 | if (phba->sli_rev == LPFC_SLI_REV4) { | 741 | if (phba->sli_rev == LPFC_SLI_REV4) { |
742 | mb->un.varRegLogin.rpi = lpfc_sli4_alloc_rpi(phba); | 742 | mb->un.varRegLogin.rpi = rpi; |
743 | if (mb->un.varRegLogin.rpi == LPFC_RPI_ALLOC_ERROR) | 743 | if (mb->un.varRegLogin.rpi == LPFC_RPI_ALLOC_ERROR) |
744 | return 1; | 744 | return 1; |
745 | } | 745 | } |
746 | |||
747 | mb->un.varRegLogin.vpi = vpi + phba->vpi_base; | 746 | mb->un.varRegLogin.vpi = vpi + phba->vpi_base; |
748 | mb->un.varRegLogin.did = did; | 747 | mb->un.varRegLogin.did = did; |
749 | mb->un.varWords[30] = flag; /* Set flag to issue action on cmpl */ | ||
750 | |||
751 | mb->mbxOwner = OWN_HOST; | 748 | mb->mbxOwner = OWN_HOST; |
752 | |||
753 | /* Get a buffer to hold NPorts Service Parameters */ | 749 | /* Get a buffer to hold NPorts Service Parameters */ |
754 | mp = kmalloc(sizeof (struct lpfc_dmabuf), GFP_KERNEL); | 750 | mp = kmalloc(sizeof (struct lpfc_dmabuf), GFP_KERNEL); |
755 | if (mp) | 751 | if (mp) |
@@ -760,7 +756,7 @@ lpfc_reg_rpi(struct lpfc_hba *phba, uint16_t vpi, uint32_t did, | |||
760 | /* REG_LOGIN: no buffers */ | 756 | /* REG_LOGIN: no buffers */ |
761 | lpfc_printf_log(phba, KERN_WARNING, LOG_MBOX, | 757 | lpfc_printf_log(phba, KERN_WARNING, LOG_MBOX, |
762 | "0302 REG_LOGIN: no buffers, VPI:%d DID:x%x, " | 758 | "0302 REG_LOGIN: no buffers, VPI:%d DID:x%x, " |
763 | "flag x%x\n", vpi, did, flag); | 759 | "rpi x%x\n", vpi, did, rpi); |
764 | return (1); | 760 | return (1); |
765 | } | 761 | } |
766 | INIT_LIST_HEAD(&mp->list); | 762 | INIT_LIST_HEAD(&mp->list); |