Commit 74b72a59 authored by Jamie Wellnitz's avatar Jamie Wellnitz Committed by James Bottomley

[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: default avatarJamie Wellnitz <Jamie.Wellnitz@emulex.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 42ab0360
......@@ -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;
......
......@@ -1711,13 +1711,13 @@ typedef struct {
uint32_t rttov;
uint32_t altov;
uint32_t lmt;
#define LMT_RESERVED 0x0 /* Not used */
#define LMT_266_10bit 0x1 /* 265.625 Mbaud 10 bit iface */
#define LMT_532_10bit 0x2 /* 531.25 Mbaud 10 bit iface */
#define LMT_1063_20bit 0x3 /* 1062.5 Mbaud 20 bit iface */
#define LMT_1063_10bit 0x4 /* 1062.5 Mbaud 10 bit iface */
#define LMT_2125_10bit 0x8 /* 2125 Mbaud 10 bit iface */
#define LMT_4250_10bit 0x40 /* 4250 Mbaud 10 bit iface */
#define LMT_RESERVED 0x000 /* Not used */
#define LMT_1Gb 0x004
#define LMT_2Gb 0x008
#define LMT_4Gb 0x040
#define LMT_8Gb 0x080
#define LMT_10Gb 0x100
uint32_t rsvd2;
uint32_t rsvd3;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment