diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_ct.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_ct.c | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c index 463b74902ac4..c004fa9a681e 100644 --- a/drivers/scsi/lpfc/lpfc_ct.c +++ b/drivers/scsi/lpfc/lpfc_ct.c | |||
@@ -48,14 +48,14 @@ | |||
48 | #include "lpfc_vport.h" | 48 | #include "lpfc_vport.h" |
49 | #include "lpfc_debugfs.h" | 49 | #include "lpfc_debugfs.h" |
50 | 50 | ||
51 | #define HBA_PORTSPEED_UNKNOWN 0 /* Unknown - transceiver | 51 | /* FDMI Port Speed definitions */ |
52 | * incapable of reporting */ | 52 | #define HBA_PORTSPEED_1GBIT 0x0001 /* 1 GBit/sec */ |
53 | #define HBA_PORTSPEED_1GBIT 1 /* 1 GBit/sec */ | 53 | #define HBA_PORTSPEED_2GBIT 0x0002 /* 2 GBit/sec */ |
54 | #define HBA_PORTSPEED_2GBIT 2 /* 2 GBit/sec */ | 54 | #define HBA_PORTSPEED_4GBIT 0x0008 /* 4 GBit/sec */ |
55 | #define HBA_PORTSPEED_4GBIT 8 /* 4 GBit/sec */ | 55 | #define HBA_PORTSPEED_10GBIT 0x0004 /* 10 GBit/sec */ |
56 | #define HBA_PORTSPEED_8GBIT 16 /* 8 GBit/sec */ | 56 | #define HBA_PORTSPEED_8GBIT 0x0010 /* 8 GBit/sec */ |
57 | #define HBA_PORTSPEED_10GBIT 4 /* 10 GBit/sec */ | 57 | #define HBA_PORTSPEED_16GBIT 0x0020 /* 16 GBit/sec */ |
58 | #define HBA_PORTSPEED_NOT_NEGOTIATED 5 /* Speed not established */ | 58 | #define HBA_PORTSPEED_UNKNOWN 0x0800 /* Unknown */ |
59 | 59 | ||
60 | #define FOURBYTES 4 | 60 | #define FOURBYTES 4 |
61 | 61 | ||
@@ -1593,8 +1593,10 @@ lpfc_fdmi_cmd(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, int cmdcode) | |||
1593 | ae->ad.bits.AttrLen = be16_to_cpu(FOURBYTES + 4); | 1593 | ae->ad.bits.AttrLen = be16_to_cpu(FOURBYTES + 4); |
1594 | 1594 | ||
1595 | ae->un.SupportSpeed = 0; | 1595 | ae->un.SupportSpeed = 0; |
1596 | if (phba->lmt & LMT_16Gb) | ||
1597 | ae->un.SupportSpeed |= HBA_PORTSPEED_16GBIT; | ||
1596 | if (phba->lmt & LMT_10Gb) | 1598 | if (phba->lmt & LMT_10Gb) |
1597 | ae->un.SupportSpeed = HBA_PORTSPEED_10GBIT; | 1599 | ae->un.SupportSpeed |= HBA_PORTSPEED_10GBIT; |
1598 | if (phba->lmt & LMT_8Gb) | 1600 | if (phba->lmt & LMT_8Gb) |
1599 | ae->un.SupportSpeed |= HBA_PORTSPEED_8GBIT; | 1601 | ae->un.SupportSpeed |= HBA_PORTSPEED_8GBIT; |
1600 | if (phba->lmt & LMT_4Gb) | 1602 | if (phba->lmt & LMT_4Gb) |
@@ -1612,24 +1614,26 @@ lpfc_fdmi_cmd(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, int cmdcode) | |||
1612 | ae->ad.bits.AttrType = be16_to_cpu(PORT_SPEED); | 1614 | ae->ad.bits.AttrType = be16_to_cpu(PORT_SPEED); |
1613 | ae->ad.bits.AttrLen = be16_to_cpu(FOURBYTES + 4); | 1615 | ae->ad.bits.AttrLen = be16_to_cpu(FOURBYTES + 4); |
1614 | switch(phba->fc_linkspeed) { | 1616 | switch(phba->fc_linkspeed) { |
1615 | case LA_1GHZ_LINK: | 1617 | case LPFC_LINK_SPEED_1GHZ: |
1616 | ae->un.PortSpeed = HBA_PORTSPEED_1GBIT; | 1618 | ae->un.PortSpeed = HBA_PORTSPEED_1GBIT; |
1617 | break; | 1619 | break; |
1618 | case LA_2GHZ_LINK: | 1620 | case LPFC_LINK_SPEED_2GHZ: |
1619 | ae->un.PortSpeed = HBA_PORTSPEED_2GBIT; | 1621 | ae->un.PortSpeed = HBA_PORTSPEED_2GBIT; |
1620 | break; | 1622 | break; |
1621 | case LA_4GHZ_LINK: | 1623 | case LPFC_LINK_SPEED_4GHZ: |
1622 | ae->un.PortSpeed = HBA_PORTSPEED_4GBIT; | 1624 | ae->un.PortSpeed = HBA_PORTSPEED_4GBIT; |
1623 | break; | 1625 | break; |
1624 | case LA_8GHZ_LINK: | 1626 | case LPFC_LINK_SPEED_8GHZ: |
1625 | ae->un.PortSpeed = HBA_PORTSPEED_8GBIT; | 1627 | ae->un.PortSpeed = HBA_PORTSPEED_8GBIT; |
1626 | break; | 1628 | break; |
1627 | case LA_10GHZ_LINK: | 1629 | case LPFC_LINK_SPEED_10GHZ: |
1628 | ae->un.PortSpeed = HBA_PORTSPEED_10GBIT; | 1630 | ae->un.PortSpeed = HBA_PORTSPEED_10GBIT; |
1629 | break; | 1631 | break; |
1630 | default: | 1632 | case LPFC_LINK_SPEED_16GHZ: |
1631 | ae->un.PortSpeed = | 1633 | ae->un.PortSpeed = HBA_PORTSPEED_16GBIT; |
1632 | HBA_PORTSPEED_UNKNOWN; | 1634 | break; |
1635 | default: | ||
1636 | ae->un.PortSpeed = HBA_PORTSPEED_UNKNOWN; | ||
1633 | break; | 1637 | break; |
1634 | } | 1638 | } |
1635 | pab->ab.EntryCnt++; | 1639 | pab->ab.EntryCnt++; |