Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ice/ice_lib.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 11,338 Lines • ▼ Show 20 Lines | ice_get_port_topology(struct ice_hw *hw, u8 lport, | ||||
| is_muxed = ice_is_serdes_muxed(hw); | is_muxed = ice_is_serdes_muxed(hw); | ||||
| err = ice_update_port_topology(lport, port_topology, is_muxed); | err = ice_update_port_topology(lport, port_topology, is_muxed); | ||||
| if (err) | if (err) | ||||
| return err; | return err; | ||||
| if (cage_type == 0x11 || /* SFP */ | if (cage_type == 0x11 || /* SFP */ | ||||
| cage_type == 0x12) { /* SFP28 */ | cage_type == 0x12) { /* SFP28 */ | ||||
| port_topology->serdes_lane_count = 1; | port_topology->serdes_lane_count = 1; | ||||
| } else if (cage_type == 0x13 || /* QSFP */ | } else if (cage_type == 0x13 || /* QSFP */ | ||||
| cage_type == 0x14) { /* QSFP28 */ | cage_type == 0x14) { /* QSFP28 */ | ||||
| u8 max_speed = 0; | u8 max_speed = 0; | ||||
| err = ice_get_maxspeed(hw, port_topology->primary_serdes_lane, | err = ice_get_maxspeed(hw, port_topology->primary_serdes_lane, | ||||
| &max_speed); | &max_speed); | ||||
| if (err) | if (err) | ||||
| return err; | return err; | ||||
| if (max_speed == ICE_AQC_PORT_OPT_MAX_LANE_M) | if (max_speed == ICE_AQC_PORT_OPT_MAX_LANE_M) | ||||
| device_printf(ice_hw_to_dev(hw), | device_printf(ice_hw_to_dev(hw), | ||||
| "%s: WARNING: reported max_lane_speed is N/A\n", | "%s: WARNING: reported max_lane_speed is N/A\n", | ||||
| __func__); | __func__); | ||||
| if (max_speed == ICE_AQC_PORT_OPT_MAX_LANE_100G) | if (max_speed == ICE_AQC_PORT_OPT_MAX_LANE_100G) | ||||
| port_topology->serdes_lane_count = 4; | port_topology->serdes_lane_count = 4; | ||||
| else if (max_speed == ICE_AQC_PORT_OPT_MAX_LANE_50G) | else if (max_speed == ICE_AQC_PORT_OPT_MAX_LANE_50G || | ||||
| max_speed == ICE_AQC_PORT_OPT_MAX_LANE_40G) | |||||
| port_topology->serdes_lane_count = 2; | port_topology->serdes_lane_count = 2; | ||||
| else | else | ||||
| port_topology->serdes_lane_count = 1; | port_topology->serdes_lane_count = 1; | ||||
| } else | } else | ||||
| return (EINVAL); | return (EINVAL); | ||||
| ice_debug(hw, ICE_DBG_PHY, "%s: Port Topology (lport %d):\n", | ice_debug(hw, ICE_DBG_PHY, "%s: Port Topology (lport %d):\n", | ||||
| __func__, lport); | __func__, lport); | ||||
| ▲ Show 20 Lines • Show All 736 Lines • Show Last 20 Lines | |||||