diff options
author | James Smart <james.smart@emulex.com> | 2015-04-07 15:07:17 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Odin.com> | 2015-04-10 10:48:08 -0400 |
commit | 26d830ec7fb660130a00f5d27601f37da70a4c1e (patch) | |
tree | 43e1bef850ab510e2948e6af6d9d7f3ea07aa3d5 /drivers/scsi/lpfc | |
parent | a0683bf67a0502c6ed8b75a1f1a65762c7790635 (diff) |
lpfc: Parse the new 20G, 25G and 40G link speeds in the lpfc driver
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hw4.h | 5 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 38 |
2 files changed, 30 insertions, 13 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h index 3121ec454cfa..0b4c5afd6636 100644 --- a/drivers/scsi/lpfc/lpfc_hw4.h +++ b/drivers/scsi/lpfc/lpfc_hw4.h | |||
@@ -3085,6 +3085,9 @@ struct lpfc_acqe_link { | |||
3085 | #define LPFC_ASYNC_LINK_SPEED_100MBPS 0x2 | 3085 | #define LPFC_ASYNC_LINK_SPEED_100MBPS 0x2 |
3086 | #define LPFC_ASYNC_LINK_SPEED_1GBPS 0x3 | 3086 | #define LPFC_ASYNC_LINK_SPEED_1GBPS 0x3 |
3087 | #define LPFC_ASYNC_LINK_SPEED_10GBPS 0x4 | 3087 | #define LPFC_ASYNC_LINK_SPEED_10GBPS 0x4 |
3088 | #define LPFC_ASYNC_LINK_SPEED_20GBPS 0x5 | ||
3089 | #define LPFC_ASYNC_LINK_SPEED_25GBPS 0x6 | ||
3090 | #define LPFC_ASYNC_LINK_SPEED_40GBPS 0x7 | ||
3088 | #define lpfc_acqe_link_duplex_SHIFT 16 | 3091 | #define lpfc_acqe_link_duplex_SHIFT 16 |
3089 | #define lpfc_acqe_link_duplex_MASK 0x000000FF | 3092 | #define lpfc_acqe_link_duplex_MASK 0x000000FF |
3090 | #define lpfc_acqe_link_duplex_WORD word0 | 3093 | #define lpfc_acqe_link_duplex_WORD word0 |
@@ -3166,7 +3169,7 @@ struct lpfc_acqe_fc_la { | |||
3166 | #define lpfc_acqe_fc_la_speed_SHIFT 24 | 3169 | #define lpfc_acqe_fc_la_speed_SHIFT 24 |
3167 | #define lpfc_acqe_fc_la_speed_MASK 0x000000FF | 3170 | #define lpfc_acqe_fc_la_speed_MASK 0x000000FF |
3168 | #define lpfc_acqe_fc_la_speed_WORD word0 | 3171 | #define lpfc_acqe_fc_la_speed_WORD word0 |
3169 | #define LPFC_FC_LA_SPEED_UNKOWN 0x0 | 3172 | #define LPFC_FC_LA_SPEED_UNKNOWN 0x0 |
3170 | #define LPFC_FC_LA_SPEED_1G 0x1 | 3173 | #define LPFC_FC_LA_SPEED_1G 0x1 |
3171 | #define LPFC_FC_LA_SPEED_2G 0x2 | 3174 | #define LPFC_FC_LA_SPEED_2G 0x2 |
3172 | #define LPFC_FC_LA_SPEED_4G 0x4 | 3175 | #define LPFC_FC_LA_SPEED_4G 0x4 |
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index e01619c4a992..4947cc4abc0d 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -3706,6 +3706,11 @@ lpfc_sli4_parse_latt_link_speed(struct lpfc_hba *phba, | |||
3706 | case LPFC_ASYNC_LINK_SPEED_10GBPS: | 3706 | case LPFC_ASYNC_LINK_SPEED_10GBPS: |
3707 | link_speed = LPFC_LINK_SPEED_10GHZ; | 3707 | link_speed = LPFC_LINK_SPEED_10GHZ; |
3708 | break; | 3708 | break; |
3709 | case LPFC_ASYNC_LINK_SPEED_20GBPS: | ||
3710 | case LPFC_ASYNC_LINK_SPEED_25GBPS: | ||
3711 | case LPFC_ASYNC_LINK_SPEED_40GBPS: | ||
3712 | link_speed = LPFC_LINK_SPEED_UNKNOWN; | ||
3713 | break; | ||
3709 | default: | 3714 | default: |
3710 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 3715 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, |
3711 | "0483 Invalid link-attention link speed: x%x\n", | 3716 | "0483 Invalid link-attention link speed: x%x\n", |
@@ -3777,46 +3782,55 @@ lpfc_sli4_port_speed_parse(struct lpfc_hba *phba, uint32_t evt_code, | |||
3777 | switch (evt_code) { | 3782 | switch (evt_code) { |
3778 | case LPFC_TRAILER_CODE_LINK: | 3783 | case LPFC_TRAILER_CODE_LINK: |
3779 | switch (speed_code) { | 3784 | switch (speed_code) { |
3780 | case LPFC_EVT_CODE_LINK_NO_LINK: | 3785 | case LPFC_ASYNC_LINK_SPEED_ZERO: |
3781 | port_speed = 0; | 3786 | port_speed = 0; |
3782 | break; | 3787 | break; |
3783 | case LPFC_EVT_CODE_LINK_10_MBIT: | 3788 | case LPFC_ASYNC_LINK_SPEED_10MBPS: |
3784 | port_speed = 10; | 3789 | port_speed = 10; |
3785 | break; | 3790 | break; |
3786 | case LPFC_EVT_CODE_LINK_100_MBIT: | 3791 | case LPFC_ASYNC_LINK_SPEED_100MBPS: |
3787 | port_speed = 100; | 3792 | port_speed = 100; |
3788 | break; | 3793 | break; |
3789 | case LPFC_EVT_CODE_LINK_1_GBIT: | 3794 | case LPFC_ASYNC_LINK_SPEED_1GBPS: |
3790 | port_speed = 1000; | 3795 | port_speed = 1000; |
3791 | break; | 3796 | break; |
3792 | case LPFC_EVT_CODE_LINK_10_GBIT: | 3797 | case LPFC_ASYNC_LINK_SPEED_10GBPS: |
3793 | port_speed = 10000; | 3798 | port_speed = 10000; |
3794 | break; | 3799 | break; |
3800 | case LPFC_ASYNC_LINK_SPEED_20GBPS: | ||
3801 | port_speed = 20000; | ||
3802 | break; | ||
3803 | case LPFC_ASYNC_LINK_SPEED_25GBPS: | ||
3804 | port_speed = 25000; | ||
3805 | break; | ||
3806 | case LPFC_ASYNC_LINK_SPEED_40GBPS: | ||
3807 | port_speed = 40000; | ||
3808 | break; | ||
3795 | default: | 3809 | default: |
3796 | port_speed = 0; | 3810 | port_speed = 0; |
3797 | } | 3811 | } |
3798 | break; | 3812 | break; |
3799 | case LPFC_TRAILER_CODE_FC: | 3813 | case LPFC_TRAILER_CODE_FC: |
3800 | switch (speed_code) { | 3814 | switch (speed_code) { |
3801 | case LPFC_EVT_CODE_FC_NO_LINK: | 3815 | case LPFC_FC_LA_SPEED_UNKNOWN: |
3802 | port_speed = 0; | 3816 | port_speed = 0; |
3803 | break; | 3817 | break; |
3804 | case LPFC_EVT_CODE_FC_1_GBAUD: | 3818 | case LPFC_FC_LA_SPEED_1G: |
3805 | port_speed = 1000; | 3819 | port_speed = 1000; |
3806 | break; | 3820 | break; |
3807 | case LPFC_EVT_CODE_FC_2_GBAUD: | 3821 | case LPFC_FC_LA_SPEED_2G: |
3808 | port_speed = 2000; | 3822 | port_speed = 2000; |
3809 | break; | 3823 | break; |
3810 | case LPFC_EVT_CODE_FC_4_GBAUD: | 3824 | case LPFC_FC_LA_SPEED_4G: |
3811 | port_speed = 4000; | 3825 | port_speed = 4000; |
3812 | break; | 3826 | break; |
3813 | case LPFC_EVT_CODE_FC_8_GBAUD: | 3827 | case LPFC_FC_LA_SPEED_8G: |
3814 | port_speed = 8000; | 3828 | port_speed = 8000; |
3815 | break; | 3829 | break; |
3816 | case LPFC_EVT_CODE_FC_10_GBAUD: | 3830 | case LPFC_FC_LA_SPEED_10G: |
3817 | port_speed = 10000; | 3831 | port_speed = 10000; |
3818 | break; | 3832 | break; |
3819 | case LPFC_EVT_CODE_FC_16_GBAUD: | 3833 | case LPFC_FC_LA_SPEED_16G: |
3820 | port_speed = 16000; | 3834 | port_speed = 16000; |
3821 | break; | 3835 | break; |
3822 | default: | 3836 | default: |