Author: adrian Date: Thu Dec 3 16:54:59 2020 New Revision: 368305 URL: https://svnweb.freebsd.org/changeset/base/368305
Log: [axgbe] Fix compiler warnings in gcc-6.3; perhaps fix a PHY issue * uninitialised variable use * Using AXGBE_SET_ADV() where it was intended; using AXGBE_ADV() seems wrong and also causes a compiler warning. Reviewed by: rpokala Differential Revision: https://reviews.freebsd.org/D26839 Modified: head/sys/dev/axgbe/xgbe-dev.c head/sys/dev/axgbe/xgbe-mdio.c head/sys/dev/axgbe/xgbe-phy-v2.c Modified: head/sys/dev/axgbe/xgbe-dev.c ============================================================================== --- head/sys/dev/axgbe/xgbe-dev.c Thu Dec 3 15:55:07 2020 (r368304) +++ head/sys/dev/axgbe/xgbe-dev.c Thu Dec 3 16:54:59 2020 (r368305) @@ -1337,7 +1337,7 @@ xgbe_dev_read(struct xgbe_channel *channel) struct xgbe_ring_data *rdata; struct xgbe_ring_desc *rdesc; struct xgbe_packet_data *packet = &ring->packet_data; - unsigned int err, etlt, l34t; + unsigned int err, etlt, l34t = 0; axgbe_printf(1, "-->xgbe_dev_read: cur = %d\n", ring->cur); Modified: head/sys/dev/axgbe/xgbe-mdio.c ============================================================================== --- head/sys/dev/axgbe/xgbe-mdio.c Thu Dec 3 15:55:07 2020 (r368304) +++ head/sys/dev/axgbe/xgbe-mdio.c Thu Dec 3 16:54:59 2020 (r368305) @@ -1186,7 +1186,7 @@ static int __xgbe_phy_config_aneg(struct xgbe_prv_data *pdata, bool set_mode) { int ret; - unsigned int reg; + unsigned int reg = 0; sx_xlock(&pdata->an_mutex); Modified: head/sys/dev/axgbe/xgbe-phy-v2.c ============================================================================== --- head/sys/dev/axgbe/xgbe-phy-v2.c Thu Dec 3 15:55:07 2020 (r368304) +++ head/sys/dev/axgbe/xgbe-phy-v2.c Thu Dec 3 16:54:59 2020 (r368305) @@ -2706,7 +2706,7 @@ xgbe_upd_link(struct xgbe_prv_data *pdata) static int xgbe_phy_read_status(struct xgbe_prv_data *pdata) { - int common_adv_gb; + int common_adv_gb = 0; int common_adv; int lpagb = 0; int adv, lpa; @@ -2741,9 +2741,9 @@ xgbe_phy_read_status(struct xgbe_prv_data *pdata) } if (pdata->phy.supported == SUPPORTED_1000baseT_Half) - XGBE_ADV(&pdata->phy, 1000baseT_Half); + XGBE_SET_ADV(&pdata->phy, 1000baseT_Half); else if (pdata->phy.supported == SUPPORTED_1000baseT_Full) - XGBE_ADV(&pdata->phy, 1000baseT_Full); + XGBE_SET_ADV(&pdata->phy, 1000baseT_Full); common_adv_gb = lpagb & adv << 2; } @@ -2753,7 +2753,7 @@ xgbe_phy_read_status(struct xgbe_prv_data *pdata) return (lpa); if (pdata->phy.supported == SUPPORTED_Autoneg) - XGBE_ADV(&pdata->phy, Autoneg); + XGBE_SET_ADV(&pdata->phy, Autoneg); adv = xgbe_phy_mii_read(pdata, pdata->mdio_addr, MII_ANAR); if (adv < 0) _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"