提交 bfc47785 编写于 作者: J James Smart 提交者: Martin K. Petersen

scsi: lpfc: Add 256 Gb link speed support

Update routines to support 256 Gb link speed for LPe37000/LPe38000
adapters. 256 Gb speeds can be seen on trunk links.

Link: https://lore.kernel.org/r/20210722221721.74388-5-jsmart2021@gmail.comCo-developed-by: NJustin Tee <justin.tee@broadcom.com>
Signed-off-by: NJustin Tee <justin.tee@broadcom.com>
Signed-off-by: NJames Smart <jsmart2021@gmail.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 f6c5e6c4
...@@ -6745,6 +6745,9 @@ lpfc_get_host_speed(struct Scsi_Host *shost) ...@@ -6745,6 +6745,9 @@ lpfc_get_host_speed(struct Scsi_Host *shost)
case LPFC_LINK_SPEED_128GHZ: case LPFC_LINK_SPEED_128GHZ:
fc_host_speed(shost) = FC_PORTSPEED_128GBIT; fc_host_speed(shost) = FC_PORTSPEED_128GBIT;
break; break;
case LPFC_LINK_SPEED_256GHZ:
fc_host_speed(shost) = FC_PORTSPEED_256GBIT;
break;
default: default:
fc_host_speed(shost) = FC_PORTSPEED_UNKNOWN; fc_host_speed(shost) = FC_PORTSPEED_UNKNOWN;
break; break;
......
...@@ -2846,6 +2846,8 @@ lpfc_fdmi_port_attr_support_speed(struct lpfc_vport *vport, ...@@ -2846,6 +2846,8 @@ lpfc_fdmi_port_attr_support_speed(struct lpfc_vport *vport,
ae->un.AttrInt = 0; ae->un.AttrInt = 0;
if (!(phba->hba_flag & HBA_FCOE_MODE)) { if (!(phba->hba_flag & HBA_FCOE_MODE)) {
if (phba->lmt & LMT_256Gb)
ae->un.AttrInt |= HBA_PORTSPEED_256GFC;
if (phba->lmt & LMT_128Gb) if (phba->lmt & LMT_128Gb)
ae->un.AttrInt |= HBA_PORTSPEED_128GFC; ae->un.AttrInt |= HBA_PORTSPEED_128GFC;
if (phba->lmt & LMT_64Gb) if (phba->lmt & LMT_64Gb)
...@@ -2927,6 +2929,9 @@ lpfc_fdmi_port_attr_speed(struct lpfc_vport *vport, ...@@ -2927,6 +2929,9 @@ lpfc_fdmi_port_attr_speed(struct lpfc_vport *vport,
case LPFC_LINK_SPEED_128GHZ: case LPFC_LINK_SPEED_128GHZ:
ae->un.AttrInt = HBA_PORTSPEED_128GFC; ae->un.AttrInt = HBA_PORTSPEED_128GFC;
break; break;
case LPFC_LINK_SPEED_256GHZ:
ae->un.AttrInt = HBA_PORTSPEED_256GFC;
break;
default: default:
ae->un.AttrInt = HBA_PORTSPEED_UNKNOWN; ae->un.AttrInt = HBA_PORTSPEED_UNKNOWN;
break; break;
......
...@@ -6105,6 +6105,12 @@ lpfc_rdp_res_speed(struct fc_rdp_port_speed_desc *desc, struct lpfc_hba *phba) ...@@ -6105,6 +6105,12 @@ lpfc_rdp_res_speed(struct fc_rdp_port_speed_desc *desc, struct lpfc_hba *phba)
case LPFC_LINK_SPEED_64GHZ: case LPFC_LINK_SPEED_64GHZ:
rdp_speed = RDP_PS_64GB; rdp_speed = RDP_PS_64GB;
break; break;
case LPFC_LINK_SPEED_128GHZ:
rdp_speed = RDP_PS_128GB;
break;
case LPFC_LINK_SPEED_256GHZ:
rdp_speed = RDP_PS_256GB;
break;
default: default:
rdp_speed = RDP_PS_UNKNOWN; rdp_speed = RDP_PS_UNKNOWN;
break; break;
...@@ -6112,6 +6118,8 @@ lpfc_rdp_res_speed(struct fc_rdp_port_speed_desc *desc, struct lpfc_hba *phba) ...@@ -6112,6 +6118,8 @@ lpfc_rdp_res_speed(struct fc_rdp_port_speed_desc *desc, struct lpfc_hba *phba)
desc->info.port_speed.speed = cpu_to_be16(rdp_speed); desc->info.port_speed.speed = cpu_to_be16(rdp_speed);
if (phba->lmt & LMT_256Gb)
rdp_cap |= RDP_PS_256GB;
if (phba->lmt & LMT_128Gb) if (phba->lmt & LMT_128Gb)
rdp_cap |= RDP_PS_128GB; rdp_cap |= RDP_PS_128GB;
if (phba->lmt & LMT_64Gb) if (phba->lmt & LMT_64Gb)
......
...@@ -3331,6 +3331,7 @@ lpfc_mbx_process_link_up(struct lpfc_hba *phba, struct lpfc_mbx_read_top *la) ...@@ -3331,6 +3331,7 @@ lpfc_mbx_process_link_up(struct lpfc_hba *phba, struct lpfc_mbx_read_top *la)
case LPFC_LINK_SPEED_32GHZ: case LPFC_LINK_SPEED_32GHZ:
case LPFC_LINK_SPEED_64GHZ: case LPFC_LINK_SPEED_64GHZ:
case LPFC_LINK_SPEED_128GHZ: case LPFC_LINK_SPEED_128GHZ:
case LPFC_LINK_SPEED_256GHZ:
break; break;
default: default:
phba->fc_linkspeed = LPFC_LINK_SPEED_UNKNOWN; phba->fc_linkspeed = LPFC_LINK_SPEED_UNKNOWN;
......
...@@ -4679,6 +4679,8 @@ static void lpfc_host_supported_speeds_set(struct Scsi_Host *shost) ...@@ -4679,6 +4679,8 @@ static void lpfc_host_supported_speeds_set(struct Scsi_Host *shost)
if (phba->hba_flag & HBA_FCOE_MODE) if (phba->hba_flag & HBA_FCOE_MODE)
return; return;
if (phba->lmt & LMT_256Gb)
fc_host_supported_speeds(shost) |= FC_PORTSPEED_256GBIT;
if (phba->lmt & LMT_128Gb) if (phba->lmt & LMT_128Gb)
fc_host_supported_speeds(shost) |= FC_PORTSPEED_128GBIT; fc_host_supported_speeds(shost) |= FC_PORTSPEED_128GBIT;
if (phba->lmt & LMT_64Gb) if (phba->lmt & LMT_64Gb)
...@@ -5087,6 +5089,9 @@ lpfc_sli4_port_speed_parse(struct lpfc_hba *phba, uint32_t evt_code, ...@@ -5087,6 +5089,9 @@ lpfc_sli4_port_speed_parse(struct lpfc_hba *phba, uint32_t evt_code,
case LPFC_FC_LA_SPEED_128G: case LPFC_FC_LA_SPEED_128G:
port_speed = 128000; port_speed = 128000;
break; break;
case LPFC_FC_LA_SPEED_256G:
port_speed = 256000;
break;
default: default:
port_speed = 0; port_speed = 0;
} }
......
...@@ -142,6 +142,10 @@ struct lpfc_scsicmd_bkt { ...@@ -142,6 +142,10 @@ struct lpfc_scsicmd_bkt {
#define FC_PORTSPEED_128GBIT 0x2000 #define FC_PORTSPEED_128GBIT 0x2000
#endif #endif
#ifndef FC_PORTSPEED_256GBIT
#define FC_PORTSPEED_256GBIT 0x4000
#endif
#define TXRDY_PAYLOAD_LEN 12 #define TXRDY_PAYLOAD_LEN 12
/* For sysfs/debugfs tmp string max len */ /* For sysfs/debugfs tmp string max len */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册