Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'add-support-for-25g-50g-and-100g-to-fbnic'

Alexander Duyck says:

====================
Add support for 25G, 50G, and 100G to fbnic

The fbnic driver up till now had avoided actually reporting link as the
phylink setup only supported up to 40G configurations. This changeset is
meant to start addressing that by adding support for 50G and 100G interface
types.

With that basic support added fbnic can then set those types based on the
EEPROM configuration provided by the firmware and then report those speeds
out using the information provided via the phylink call for getting the
link ksettings. This provides the basic MAC support and enables supporting
the speeds as well as configuring flow control.

After this I plan to add support for a PHY that will represent the SerDes
PHY being used to manage the link as we need a way to indicate link
training into phylink to prevent link flaps on the PCS while the SerDes is
in training, and then after that I will look at rolling support for our
PCS/PMA into the XPCS driver.
====================

Link: https://patch.msgid.link/175028434031.625704.17964815932031774402.stgit@ahduyck-xeon-server.home.arpa
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

+237 -93
+5
drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c
··· 1683 1683 .get_drvinfo = fbnic_get_drvinfo, 1684 1684 .get_regs_len = fbnic_get_regs_len, 1685 1685 .get_regs = fbnic_get_regs, 1686 + .get_link = ethtool_op_get_link, 1686 1687 .get_coalesce = fbnic_get_coalesce, 1687 1688 .set_coalesce = fbnic_set_coalesce, 1688 1689 .get_ringparam = fbnic_get_ringparam, 1689 1690 .set_ringparam = fbnic_set_ringparam, 1691 + .get_pauseparam = fbnic_phylink_get_pauseparam, 1692 + .set_pauseparam = fbnic_phylink_set_pauseparam, 1690 1693 .get_strings = fbnic_get_strings, 1691 1694 .get_ethtool_stats = fbnic_get_ethtool_stats, 1692 1695 .get_sset_count = fbnic_get_sset_count, ··· 1708 1705 .set_channels = fbnic_set_channels, 1709 1706 .get_ts_info = fbnic_get_ts_info, 1710 1707 .get_ts_stats = fbnic_get_ts_stats, 1708 + .get_link_ksettings = fbnic_phylink_ethtool_ksettings_get, 1709 + .get_fecparam = fbnic_phylink_get_fecparam, 1711 1710 .get_eth_mac_stats = fbnic_get_eth_mac_stats, 1712 1711 .get_eth_ctrl_stats = fbnic_get_eth_ctrl_stats, 1713 1712 .get_rmon_stats = fbnic_get_rmon_stats,
+21 -2
drivers/net/ethernet/meta/fbnic/fbnic_fw.c
··· 95 95 /* Initialize lock to protect Tx ring */ 96 96 spin_lock_init(&fbd->fw_tx_lock); 97 97 98 + /* Reset FW Capabilities */ 99 + memset(&fbd->fw_cap, 0, sizeof(fbd->fw_cap)); 100 + 98 101 /* Reinitialize mailbox memory */ 99 102 for (i = 0; i < FBNIC_IPC_MBX_INDICES; i++) 100 103 memset(&fbd->mbx[i], 0, sizeof(struct fbnic_fw_mbx)); ··· 1120 1117 1121 1118 int fbnic_mbx_poll_tx_ready(struct fbnic_dev *fbd) 1122 1119 { 1120 + struct fbnic_fw_mbx *tx_mbx = &fbd->mbx[FBNIC_IPC_MBX_TX_IDX]; 1123 1121 unsigned long timeout = jiffies + 10 * HZ + 1; 1124 1122 int err, i; 1125 1123 ··· 1153 1149 if (err) 1154 1150 goto clean_mbx; 1155 1151 1156 - /* Use "1" to indicate we entered the state waiting for a response */ 1157 - fbd->fw_cap.running.mgmt.version = 1; 1152 + /* Poll until we get a current management firmware version, use "1" 1153 + * to indicate we entered the polling state waiting for a response 1154 + */ 1155 + for (fbd->fw_cap.running.mgmt.version = 1; 1156 + fbd->fw_cap.running.mgmt.version < MIN_FW_VERSION_CODE;) { 1157 + if (!tx_mbx->ready) 1158 + err = -ENODEV; 1159 + if (err) 1160 + goto clean_mbx; 1161 + 1162 + msleep(20); 1163 + fbnic_mbx_poll(fbd); 1164 + 1165 + /* set err, but wait till mgmt.version check to report it */ 1166 + if (!time_is_after_jiffies(timeout)) 1167 + err = -ETIMEDOUT; 1168 + } 1158 1169 1159 1170 return 0; 1160 1171 clean_mbx:
+4 -4
drivers/net/ethernet/meta/fbnic/fbnic_fw.h
··· 155 155 }; 156 156 157 157 enum { 158 - FBNIC_FW_LINK_SPEED_25R1 = 1, 159 - FBNIC_FW_LINK_SPEED_50R2 = 2, 160 - FBNIC_FW_LINK_SPEED_50R1 = 3, 161 - FBNIC_FW_LINK_SPEED_100R2 = 4, 158 + FBNIC_FW_LINK_MODE_25CR = 1, 159 + FBNIC_FW_LINK_MODE_50CR2 = 2, 160 + FBNIC_FW_LINK_MODE_50CR = 3, 161 + FBNIC_FW_LINK_MODE_100CR2 = 4, 162 162 }; 163 163 164 164 enum {
+40 -55
drivers/net/ethernet/meta/fbnic/fbnic_mac.c
··· 452 452 command_config |= FBNIC_MAC_COMMAND_CONFIG_RX_PAUSE_DIS; 453 453 454 454 /* Disable fault handling if no FEC is requested */ 455 - if ((fbn->fec & FBNIC_FEC_MODE_MASK) == FBNIC_FEC_OFF) 455 + if (fbn->fec == FBNIC_FEC_OFF) 456 456 command_config |= FBNIC_MAC_COMMAND_CONFIG_FLT_HDL_DIS; 457 457 458 458 return command_config; ··· 468 468 return false; 469 469 470 470 /* Define the expected lane mask for the status bits we need to check */ 471 - switch (fbn->link_mode & FBNIC_LINK_MODE_MASK) { 472 - case FBNIC_LINK_100R2: 471 + switch (fbn->aui) { 472 + case FBNIC_AUI_100GAUI2: 473 473 lane_mask = 0xf; 474 474 break; 475 - case FBNIC_LINK_50R1: 475 + case FBNIC_AUI_50GAUI1: 476 476 lane_mask = 3; 477 477 break; 478 - case FBNIC_LINK_50R2: 479 - switch (fbn->fec & FBNIC_FEC_MODE_MASK) { 478 + case FBNIC_AUI_LAUI2: 479 + switch (fbn->fec) { 480 480 case FBNIC_FEC_OFF: 481 481 lane_mask = 0x63; 482 482 break; ··· 488 488 break; 489 489 } 490 490 break; 491 - case FBNIC_LINK_25R1: 491 + case FBNIC_AUI_25GAUI: 492 492 lane_mask = 1; 493 493 break; 494 494 } 495 495 496 496 /* Use an XOR to remove the bits we expect to see set */ 497 - switch (fbn->fec & FBNIC_FEC_MODE_MASK) { 497 + switch (fbn->fec) { 498 498 case FBNIC_FEC_OFF: 499 499 lane_mask ^= FIELD_GET(FBNIC_SIG_PCS_OUT0_BLOCK_LOCK, 500 500 pcs_status); ··· 540 540 return link; 541 541 } 542 542 543 - static void fbnic_pcs_get_fw_settings(struct fbnic_dev *fbd) 543 + void fbnic_mac_get_fw_settings(struct fbnic_dev *fbd, u8 *aui, u8 *fec) 544 544 { 545 - struct fbnic_net *fbn = netdev_priv(fbd->netdev); 546 - u8 link_mode = fbn->link_mode; 547 - u8 fec = fbn->fec; 548 - 549 - /* Update FEC first to reflect FW current mode */ 550 - if (fbn->fec & FBNIC_FEC_AUTO) { 551 - switch (fbd->fw_cap.link_fec) { 552 - case FBNIC_FW_LINK_FEC_NONE: 553 - fec = FBNIC_FEC_OFF; 554 - break; 555 - case FBNIC_FW_LINK_FEC_RS: 556 - fec = FBNIC_FEC_RS; 557 - break; 558 - case FBNIC_FW_LINK_FEC_BASER: 559 - fec = FBNIC_FEC_BASER; 560 - break; 561 - default: 562 - return; 563 - } 564 - 565 - fbn->fec = fec; 545 + /* Retrieve default speed from FW */ 546 + switch (fbd->fw_cap.link_speed) { 547 + case FBNIC_FW_LINK_MODE_25CR: 548 + *aui = FBNIC_AUI_25GAUI; 549 + break; 550 + case FBNIC_FW_LINK_MODE_50CR2: 551 + *aui = FBNIC_AUI_LAUI2; 552 + break; 553 + case FBNIC_FW_LINK_MODE_50CR: 554 + *aui = FBNIC_AUI_50GAUI1; 555 + *fec = FBNIC_FEC_RS; 556 + return; 557 + case FBNIC_FW_LINK_MODE_100CR2: 558 + *aui = FBNIC_AUI_100GAUI2; 559 + *fec = FBNIC_FEC_RS; 560 + return; 561 + default: 562 + *aui = FBNIC_AUI_UNKNOWN; 563 + return; 566 564 } 567 565 568 - /* Do nothing if AUTO mode is not engaged */ 569 - if (fbn->link_mode & FBNIC_LINK_AUTO) { 570 - switch (fbd->fw_cap.link_speed) { 571 - case FBNIC_FW_LINK_SPEED_25R1: 572 - link_mode = FBNIC_LINK_25R1; 573 - break; 574 - case FBNIC_FW_LINK_SPEED_50R2: 575 - link_mode = FBNIC_LINK_50R2; 576 - break; 577 - case FBNIC_FW_LINK_SPEED_50R1: 578 - link_mode = FBNIC_LINK_50R1; 579 - fec = FBNIC_FEC_RS; 580 - break; 581 - case FBNIC_FW_LINK_SPEED_100R2: 582 - link_mode = FBNIC_LINK_100R2; 583 - fec = FBNIC_FEC_RS; 584 - break; 585 - default: 586 - return; 587 - } 588 - 589 - fbn->link_mode = link_mode; 566 + /* Update FEC first to reflect FW current mode */ 567 + switch (fbd->fw_cap.link_fec) { 568 + case FBNIC_FW_LINK_FEC_NONE: 569 + *fec = FBNIC_FEC_OFF; 570 + break; 571 + case FBNIC_FW_LINK_FEC_RS: 572 + default: 573 + *fec = FBNIC_FEC_RS; 574 + break; 575 + case FBNIC_FW_LINK_FEC_BASER: 576 + *fec = FBNIC_FEC_BASER; 577 + break; 590 578 } 591 579 } 592 580 ··· 583 595 /* Mask and clear the PCS interrupt, will be enabled by link handler */ 584 596 wr32(fbd, FBNIC_SIG_PCS_INTR_MASK, ~0); 585 597 wr32(fbd, FBNIC_SIG_PCS_INTR_STS, ~0); 586 - 587 - /* Pull in settings from FW */ 588 - fbnic_pcs_get_fw_settings(fbd); 589 598 590 599 return 0; 591 600 }
+10 -13
drivers/net/ethernet/meta/fbnic/fbnic_mac.h
··· 25 25 FBNIC_FEC_OFF = 0, 26 26 FBNIC_FEC_RS = 1, 27 27 FBNIC_FEC_BASER = 2, 28 - FBNIC_FEC_AUTO = 4, 29 28 }; 30 29 31 - #define FBNIC_FEC_MODE_MASK (FBNIC_FEC_AUTO - 1) 32 - 33 - /* Treat the link modes as a set of modulation/lanes bitmask: 30 + /* Treat the AUI modes as a modulation/lanes bitmask: 34 31 * Bit 0: Lane Count, 0 = R1, 1 = R2 35 32 * Bit 1: Modulation, 0 = NRZ, 1 = PAM4 36 - * Bit 2: Retrieve link mode from FW 33 + * Bit 2: Unknown Modulation/Lane Configuration 37 34 */ 38 35 enum { 39 - FBNIC_LINK_25R1 = 0, 40 - FBNIC_LINK_50R2 = 1, 41 - FBNIC_LINK_50R1 = 2, 42 - FBNIC_LINK_100R2 = 3, 43 - FBNIC_LINK_AUTO = 4, 36 + FBNIC_AUI_25GAUI = 0, /* 25.7812GBd 25.78125 * 1 */ 37 + FBNIC_AUI_LAUI2 = 1, /* 51.5625GBd 25.78128 * 2 */ 38 + FBNIC_AUI_50GAUI1 = 2, /* 53.125GBd 53.125 * 1 */ 39 + FBNIC_AUI_100GAUI2 = 3, /* 106.25GBd 53.125 * 2 */ 40 + FBNIC_AUI_UNKNOWN = 4, 44 41 }; 45 42 46 - #define FBNIC_LINK_MODE_R2 (FBNIC_LINK_50R2) 47 - #define FBNIC_LINK_MODE_PAM4 (FBNIC_LINK_50R1) 48 - #define FBNIC_LINK_MODE_MASK (FBNIC_LINK_AUTO - 1) 43 + #define FBNIC_AUI_MODE_R2 (FBNIC_AUI_LAUI2) 44 + #define FBNIC_AUI_MODE_PAM4 (FBNIC_AUI_50GAUI1) 49 45 50 46 enum fbnic_sensor_id { 51 47 FBNIC_SENSOR_TEMP, /* Temp in millidegrees Centigrade */ ··· 93 97 }; 94 98 95 99 int fbnic_mac_init(struct fbnic_dev *fbd); 100 + void fbnic_mac_get_fw_settings(struct fbnic_dev *fbd, u8 *aui, u8 *fec); 96 101 #endif /* _FBNIC_MAC_H_ */
-2
drivers/net/ethernet/meta/fbnic/fbnic_netdev.c
··· 736 736 */ 737 737 netdev->ethtool->wol_enabled = true; 738 738 739 - fbn->fec = FBNIC_FEC_AUTO | FBNIC_FEC_RS; 740 - fbn->link_mode = FBNIC_LINK_AUTO | FBNIC_LINK_50R2; 741 739 netif_carrier_off(netdev); 742 740 743 741 netif_tx_stop_all_queues(netdev);
+9 -2
drivers/net/ethernet/meta/fbnic/fbnic_netdev.h
··· 42 42 struct phylink_config phylink_config; 43 43 struct phylink_pcs phylink_pcs; 44 44 45 - /* TBD: Remove these when phylink supports FEC and lane config */ 45 + u8 aui; 46 46 u8 fec; 47 - u8 link_mode; 48 47 49 48 /* Cached top bits of the HW time counter for 40b -> 64b conversion */ 50 49 u32 time_high; ··· 92 93 void __fbnic_set_rx_mode(struct net_device *netdev); 93 94 void fbnic_clear_rx_mode(struct net_device *netdev); 94 95 96 + void fbnic_phylink_get_pauseparam(struct net_device *netdev, 97 + struct ethtool_pauseparam *pause); 98 + int fbnic_phylink_set_pauseparam(struct net_device *netdev, 99 + struct ethtool_pauseparam *pause); 100 + int fbnic_phylink_ethtool_ksettings_get(struct net_device *netdev, 101 + struct ethtool_link_ksettings *cmd); 102 + int fbnic_phylink_get_fecparam(struct net_device *netdev, 103 + struct ethtool_fecparam *fecparam); 95 104 int fbnic_phylink_init(struct net_device *netdev); 96 105 #endif /* _FBNIC_NETDEV_H_ */
+111 -15
drivers/net/ethernet/meta/fbnic/fbnic_phylink.c
··· 8 8 #include "fbnic_mac.h" 9 9 #include "fbnic_netdev.h" 10 10 11 + static phy_interface_t fbnic_phylink_select_interface(u8 aui) 12 + { 13 + switch (aui) { 14 + case FBNIC_AUI_100GAUI2: 15 + return PHY_INTERFACE_MODE_100GBASEP; 16 + case FBNIC_AUI_50GAUI1: 17 + return PHY_INTERFACE_MODE_50GBASER; 18 + case FBNIC_AUI_LAUI2: 19 + return PHY_INTERFACE_MODE_LAUI; 20 + case FBNIC_AUI_25GAUI: 21 + return PHY_INTERFACE_MODE_25GBASER; 22 + } 23 + 24 + return PHY_INTERFACE_MODE_NA; 25 + } 26 + 27 + void fbnic_phylink_get_pauseparam(struct net_device *netdev, 28 + struct ethtool_pauseparam *pause) 29 + { 30 + struct fbnic_net *fbn = netdev_priv(netdev); 31 + 32 + phylink_ethtool_get_pauseparam(fbn->phylink, pause); 33 + } 34 + 35 + int fbnic_phylink_set_pauseparam(struct net_device *netdev, 36 + struct ethtool_pauseparam *pause) 37 + { 38 + struct fbnic_net *fbn = netdev_priv(netdev); 39 + 40 + return phylink_ethtool_set_pauseparam(fbn->phylink, pause); 41 + } 42 + 43 + static void 44 + fbnic_phylink_get_supported_fec_modes(unsigned long *supported) 45 + { 46 + /* The NIC can support up to 8 possible combinations. 47 + * Either 50G-CR, or 100G-CR2 48 + * This is with RS FEC mode only 49 + * Either 25G-CR, or 50G-CR2 50 + * This is with No FEC, RS, or Base-R 51 + */ 52 + if (phylink_test(supported, 100000baseCR2_Full) || 53 + phylink_test(supported, 50000baseCR_Full)) 54 + phylink_set(supported, FEC_RS); 55 + if (phylink_test(supported, 50000baseCR2_Full) || 56 + phylink_test(supported, 25000baseCR_Full)) { 57 + phylink_set(supported, FEC_BASER); 58 + phylink_set(supported, FEC_NONE); 59 + phylink_set(supported, FEC_RS); 60 + } 61 + } 62 + 63 + int fbnic_phylink_ethtool_ksettings_get(struct net_device *netdev, 64 + struct ethtool_link_ksettings *cmd) 65 + { 66 + struct fbnic_net *fbn = netdev_priv(netdev); 67 + int err; 68 + 69 + err = phylink_ethtool_ksettings_get(fbn->phylink, cmd); 70 + if (!err) { 71 + unsigned long *supp = cmd->link_modes.supported; 72 + 73 + cmd->base.port = PORT_DA; 74 + cmd->lanes = (fbn->aui & FBNIC_AUI_MODE_R2) ? 2 : 1; 75 + 76 + fbnic_phylink_get_supported_fec_modes(supp); 77 + } 78 + 79 + return err; 80 + } 81 + 82 + int fbnic_phylink_get_fecparam(struct net_device *netdev, 83 + struct ethtool_fecparam *fecparam) 84 + { 85 + struct fbnic_net *fbn = netdev_priv(netdev); 86 + 87 + if (fbn->fec & FBNIC_FEC_RS) { 88 + fecparam->active_fec = ETHTOOL_FEC_RS; 89 + fecparam->fec = ETHTOOL_FEC_RS; 90 + } else if (fbn->fec & FBNIC_FEC_BASER) { 91 + fecparam->active_fec = ETHTOOL_FEC_BASER; 92 + fecparam->fec = ETHTOOL_FEC_BASER; 93 + } else { 94 + fecparam->active_fec = ETHTOOL_FEC_OFF; 95 + fecparam->fec = ETHTOOL_FEC_OFF; 96 + } 97 + 98 + if (fbn->aui & FBNIC_AUI_MODE_PAM4) 99 + fecparam->fec |= ETHTOOL_FEC_AUTO; 100 + 101 + return 0; 102 + } 103 + 11 104 static struct fbnic_net * 12 105 fbnic_pcs_to_net(struct phylink_pcs *pcs) 13 106 { ··· 114 21 struct fbnic_net *fbn = fbnic_pcs_to_net(pcs); 115 22 struct fbnic_dev *fbd = fbn->fbd; 116 23 117 - /* For now we use hard-coded defaults and FW config to determine 118 - * the current values. In future patches we will add support for 119 - * reconfiguring these values and changing link settings. 120 - */ 121 - switch (fbd->fw_cap.link_speed) { 122 - case FBNIC_FW_LINK_SPEED_25R1: 24 + switch (fbn->aui) { 25 + case FBNIC_AUI_25GAUI: 123 26 state->speed = SPEED_25000; 124 27 break; 125 - case FBNIC_FW_LINK_SPEED_50R2: 28 + case FBNIC_AUI_LAUI2: 29 + case FBNIC_AUI_50GAUI1: 126 30 state->speed = SPEED_50000; 127 31 break; 128 - case FBNIC_FW_LINK_SPEED_100R2: 32 + case FBNIC_AUI_100GAUI2: 129 33 state->speed = SPEED_100000; 130 34 break; 131 35 default: 132 - state->speed = SPEED_UNKNOWN; 133 - break; 36 + state->link = 0; 37 + return; 134 38 } 135 39 136 40 state->duplex = DUPLEX_FULL; ··· 221 131 int fbnic_phylink_init(struct net_device *netdev) 222 132 { 223 133 struct fbnic_net *fbn = netdev_priv(netdev); 134 + struct fbnic_dev *fbd = fbn->fbd; 224 135 struct phylink *phylink; 225 136 226 137 fbn->phylink_pcs.ops = &fbnic_phylink_pcs_ops; ··· 229 138 fbn->phylink_config.dev = &netdev->dev; 230 139 fbn->phylink_config.type = PHYLINK_NETDEV; 231 140 fbn->phylink_config.mac_capabilities = MAC_SYM_PAUSE | MAC_ASYM_PAUSE | 232 - MAC_10000FD | MAC_25000FD | 233 - MAC_40000FD | MAC_50000FD | 141 + MAC_25000FD | MAC_50000FD | 234 142 MAC_100000FD; 235 143 fbn->phylink_config.default_an_inband = true; 236 144 237 - __set_bit(PHY_INTERFACE_MODE_XGMII, 145 + __set_bit(PHY_INTERFACE_MODE_100GBASEP, 238 146 fbn->phylink_config.supported_interfaces); 239 - __set_bit(PHY_INTERFACE_MODE_XLGMII, 147 + __set_bit(PHY_INTERFACE_MODE_50GBASER, 148 + fbn->phylink_config.supported_interfaces); 149 + __set_bit(PHY_INTERFACE_MODE_LAUI, 150 + fbn->phylink_config.supported_interfaces); 151 + __set_bit(PHY_INTERFACE_MODE_25GBASER, 240 152 fbn->phylink_config.supported_interfaces); 241 153 154 + fbnic_mac_get_fw_settings(fbd, &fbn->aui, &fbn->fec); 155 + 242 156 phylink = phylink_create(&fbn->phylink_config, NULL, 243 - PHY_INTERFACE_MODE_XLGMII, 157 + fbnic_phylink_select_interface(fbn->aui), 244 158 &fbnic_phylink_mac_ops); 245 159 if (IS_ERR(phylink)) 246 160 return PTR_ERR(phylink);
+3
drivers/net/phy/phy-core.c
··· 142 142 case PHY_INTERFACE_MODE_RXAUI: 143 143 case PHY_INTERFACE_MODE_XAUI: 144 144 case PHY_INTERFACE_MODE_1000BASEKX: 145 + case PHY_INTERFACE_MODE_50GBASER: 146 + case PHY_INTERFACE_MODE_LAUI: 147 + case PHY_INTERFACE_MODE_100GBASEP: 145 148 return 1; 146 149 case PHY_INTERFACE_MODE_QSGMII: 147 150 case PHY_INTERFACE_MODE_QUSGMII:
+9
drivers/net/phy/phy_caps.c
··· 351 351 link_caps |= BIT(LINK_CAPA_40000FD); 352 352 break; 353 353 354 + case PHY_INTERFACE_MODE_50GBASER: 355 + case PHY_INTERFACE_MODE_LAUI: 356 + link_caps |= BIT(LINK_CAPA_50000FD); 357 + break; 358 + 359 + case PHY_INTERFACE_MODE_100GBASEP: 360 + link_caps |= BIT(LINK_CAPA_100000FD); 361 + break; 362 + 354 363 case PHY_INTERFACE_MODE_INTERNAL: 355 364 link_caps |= LINK_CAPA_ALL; 356 365 break;
+13
drivers/net/phy/phylink.c
··· 127 127 #endif 128 128 129 129 static const phy_interface_t phylink_sfp_interface_preference[] = { 130 + PHY_INTERFACE_MODE_100GBASEP, 131 + PHY_INTERFACE_MODE_50GBASER, 132 + PHY_INTERFACE_MODE_LAUI, 130 133 PHY_INTERFACE_MODE_25GBASER, 131 134 PHY_INTERFACE_MODE_USXGMII, 132 135 PHY_INTERFACE_MODE_10GBASER, ··· 276 273 277 274 case PHY_INTERFACE_MODE_XLGMII: 278 275 return SPEED_40000; 276 + 277 + case PHY_INTERFACE_MODE_50GBASER: 278 + case PHY_INTERFACE_MODE_LAUI: 279 + return SPEED_50000; 280 + 281 + case PHY_INTERFACE_MODE_100GBASEP: 282 + return SPEED_100000; 279 283 280 284 case PHY_INTERFACE_MODE_INTERNAL: 281 285 case PHY_INTERFACE_MODE_NA: ··· 808 798 case PHY_INTERFACE_MODE_10GKR: 809 799 case PHY_INTERFACE_MODE_10GBASER: 810 800 case PHY_INTERFACE_MODE_XLGMII: 801 + case PHY_INTERFACE_MODE_50GBASER: 802 + case PHY_INTERFACE_MODE_LAUI: 803 + case PHY_INTERFACE_MODE_100GBASEP: 811 804 caps = ~(MAC_SYM_PAUSE | MAC_ASYM_PAUSE); 812 805 caps = phylink_get_capabilities(pl->link_config.interface, caps, 813 806 RATE_MATCH_NONE);
+12
include/linux/phy.h
··· 103 103 * @PHY_INTERFACE_MODE_QUSGMII: Quad Universal SGMII 104 104 * @PHY_INTERFACE_MODE_1000BASEKX: 1000Base-KX - with Clause 73 AN 105 105 * @PHY_INTERFACE_MODE_10G_QXGMII: 10G-QXGMII - 4 ports over 10G USXGMII 106 + * @PHY_INTERFACE_MODE_50GBASER: 50GBase-R - with Clause 134 FEC 107 + * @PHY_INTERFACE_MODE_LAUI: 50 Gigabit Attachment Unit Interface 108 + * @PHY_INTERFACE_MODE_100GBASEP: 100GBase-P - with Clause 134 FEC 106 109 * @PHY_INTERFACE_MODE_MAX: Book keeping 107 110 * 108 111 * Describes the interface between the MAC and PHY. ··· 147 144 PHY_INTERFACE_MODE_QUSGMII, 148 145 PHY_INTERFACE_MODE_1000BASEKX, 149 146 PHY_INTERFACE_MODE_10G_QXGMII, 147 + PHY_INTERFACE_MODE_50GBASER, 148 + PHY_INTERFACE_MODE_LAUI, 149 + PHY_INTERFACE_MODE_100GBASEP, 150 150 PHY_INTERFACE_MODE_MAX, 151 151 } phy_interface_t; 152 152 ··· 266 260 return "qusgmii"; 267 261 case PHY_INTERFACE_MODE_10G_QXGMII: 268 262 return "10g-qxgmii"; 263 + case PHY_INTERFACE_MODE_50GBASER: 264 + return "50gbase-r"; 265 + case PHY_INTERFACE_MODE_LAUI: 266 + return "laui"; 267 + case PHY_INTERFACE_MODE_100GBASEP: 268 + return "100gbase-p"; 269 269 default: 270 270 return "unknown"; 271 271 }