summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_init.c
diff options
context:
space:
mode:
authorJames Smart2011-10-11 03:33:25 +0200
committerJames Bottomley2011-10-16 18:31:56 +0200
commitcd1c8301db15ee52bfc5a0e5bc16b52bab8475aa (patch)
treea05dbb780dd982efaa9ac8a949cfcdfed75c1054 /drivers/scsi/lpfc/lpfc_init.c
parent[SCSI] lpfc 8.3.27: Changed worst case mailbox timeout (diff)
downloadkernel-qcow2-linux-cd1c8301db15ee52bfc5a0e5bc16b52bab8475aa.tar.gz
kernel-qcow2-linux-cd1c8301db15ee52bfc5a0e5bc16b52bab8475aa.tar.xz
kernel-qcow2-linux-cd1c8301db15ee52bfc5a0e5bc16b52bab8475aa.zip
[SCSI] lpfc 8.3.27: Change algorithm for getting physical port name
Implemented new algorithm for getting physical port name for all SLI4 devices 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_init.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 3bdec4b2faae..99bc2bb1987f 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -1733,11 +1733,20 @@ lpfc_parse_vpd(struct lpfc_hba *phba, uint8_t *vpd, int len)
j = 0;
Length -= (3+i);
while(i--) {
- phba->Port[j++] = vpd[index++];
- if (j == 19)
- break;
+ if ((phba->sli_rev == LPFC_SLI_REV4) &&
+ (phba->sli4_hba.pport_name_sta ==
+ LPFC_SLI4_PPNAME_GET)) {
+ j++;
+ index++;
+ } else
+ phba->Port[j++] = vpd[index++];
+ if (j == 19)
+ break;
}
- phba->Port[j] = 0;
+ if ((phba->sli_rev != LPFC_SLI_REV4) ||
+ (phba->sli4_hba.pport_name_sta ==
+ LPFC_SLI4_PPNAME_NON))
+ phba->Port[j] = 0;
continue;
}
else {