summaryrefslogtreecommitdiff
path: root/drivers/scsi/lpfc/lpfc_ct.c
diff options
context:
space:
mode:
authorJamie Wellnitz <Jamie.Wellnitz@emulex.com>2006-03-01 03:33:04 (GMT)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-03-06 15:45:43 (GMT)
commit74b72a59b8d42d31aa6ffac8f10ca7a784be392c (patch)
tree524eabfe74685220fb9a0778149ec5e696277422 /drivers/scsi/lpfc/lpfc_ct.c
parent42ab03609cca4ef5079e248296f015650c626899 (diff)
downloadlinux-fsl-qoriq-74b72a59b8d42d31aa6ffac8f10ca7a784be392c.tar.xz
[PATCH] lpfc 8.1.3: Derive supported speeds from LMT field in the READ_CONFIG
Derive supported speeds from LMT field in the READ_CONFIG Driver was keying off internal cores. Use what the firmware reports instead. 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_ct.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_ct.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
index 0c982bb..f3b2803 100644
--- a/drivers/scsi/lpfc/lpfc_ct.c
+++ b/drivers/scsi/lpfc/lpfc_ct.c
@@ -1014,19 +1014,19 @@ lpfc_fdmi_cmd(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp, int cmdcode)
ae = (ATTRIBUTE_ENTRY *) ((uint8_t *) pab + size);
ae->ad.bits.AttrType = be16_to_cpu(SUPPORTED_SPEED);
ae->ad.bits.AttrLen = be16_to_cpu(FOURBYTES + 4);
- if (FC_JEDEC_ID(vp->rev.biuRev) == VIPER_JEDEC_ID)
+
+ ae->un.SupportSpeed = 0;
+ if (phba->lmt & LMT_10Gb)
ae->un.SupportSpeed = HBA_PORTSPEED_10GBIT;
- else if (FC_JEDEC_ID(vp->rev.biuRev) == HELIOS_JEDEC_ID)
- ae->un.SupportSpeed = HBA_PORTSPEED_4GBIT;
- else if ((FC_JEDEC_ID(vp->rev.biuRev) ==
- CENTAUR_2G_JEDEC_ID)
- || (FC_JEDEC_ID(vp->rev.biuRev) ==
- PEGASUS_JEDEC_ID)
- || (FC_JEDEC_ID(vp->rev.biuRev) ==
- THOR_JEDEC_ID))
- ae->un.SupportSpeed = HBA_PORTSPEED_2GBIT;
- else
- ae->un.SupportSpeed = HBA_PORTSPEED_1GBIT;
+ if (phba->lmt & LMT_8Gb)
+ ae->un.SupportSpeed |= HBA_PORTSPEED_8GBIT;
+ if (phba->lmt & LMT_4Gb)
+ ae->un.SupportSpeed |= HBA_PORTSPEED_4GBIT;
+ if (phba->lmt & LMT_2Gb)
+ ae->un.SupportSpeed |= HBA_PORTSPEED_2GBIT;
+ if (phba->lmt & LMT_1Gb)
+ ae->un.SupportSpeed |= HBA_PORTSPEED_1GBIT;
+
pab->ab.EntryCnt++;
size += FOURBYTES + 4;