Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/bnxt/if_bnxt.c
Show First 20 Lines • Show All 3,065 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
struct bnxt_link_info *link_info = &softc->link_info; | struct bnxt_link_info *link_info = &softc->link_info; | ||||
const char *duplex = NULL, *flow_ctrl = NULL; | const char *duplex = NULL, *flow_ctrl = NULL; | ||||
if (link_info->link_up == link_info->last_link_up) { | if (link_info->link_up == link_info->last_link_up) { | ||||
if (!link_info->link_up) | if (!link_info->link_up) | ||||
return; | return; | ||||
if ((link_info->duplex == link_info->last_duplex) && | if ((link_info->duplex == link_info->last_duplex) && | ||||
(link_info->phy_type == link_info->last_phy_type) && | |||||
(!(BNXT_IS_FLOW_CTRL_CHANGED(link_info)))) | (!(BNXT_IS_FLOW_CTRL_CHANGED(link_info)))) | ||||
return; | return; | ||||
} | } | ||||
if (link_info->link_up) { | if (link_info->link_up) { | ||||
if (link_info->duplex == | if (link_info->duplex == | ||||
HWRM_PORT_PHY_QCFG_OUTPUT_DUPLEX_CFG_FULL) | HWRM_PORT_PHY_QCFG_OUTPUT_DUPLEX_CFG_FULL) | ||||
duplex = "full duplex"; | duplex = "full duplex"; | ||||
Show All 14 Lines | bnxt_report_link(struct bnxt_softc *softc) | ||||
} else { | } else { | ||||
iflib_link_state_change(softc->ctx, LINK_STATE_DOWN, | iflib_link_state_change(softc->ctx, LINK_STATE_DOWN, | ||||
bnxt_get_baudrate(&softc->link_info)); | bnxt_get_baudrate(&softc->link_info)); | ||||
device_printf(softc->dev, "Link is Down\n"); | device_printf(softc->dev, "Link is Down\n"); | ||||
} | } | ||||
link_info->last_link_up = link_info->link_up; | link_info->last_link_up = link_info->link_up; | ||||
link_info->last_duplex = link_info->duplex; | link_info->last_duplex = link_info->duplex; | ||||
link_info->last_phy_type = link_info->phy_type; | |||||
link_info->last_flow_ctrl.tx = link_info->flow_ctrl.tx; | link_info->last_flow_ctrl.tx = link_info->flow_ctrl.tx; | ||||
link_info->last_flow_ctrl.rx = link_info->flow_ctrl.rx; | link_info->last_flow_ctrl.rx = link_info->flow_ctrl.rx; | ||||
link_info->last_flow_ctrl.autoneg = link_info->flow_ctrl.autoneg; | link_info->last_flow_ctrl.autoneg = link_info->flow_ctrl.autoneg; | ||||
/* update media types */ | /* update media types */ | ||||
ifmedia_removeall(softc->media); | ifmedia_removeall(softc->media); | ||||
bnxt_add_media_types(softc); | bnxt_add_media_types(softc); | ||||
ifmedia_set(softc->media, IFM_ETHER | IFM_AUTO); | ifmedia_set(softc->media, IFM_ETHER | IFM_AUTO); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 276 Lines • Show Last 20 Lines |