[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y44m+7t6pdjGc5QI@lunn.ch>
Date:   Mon, 5 Dec 2022 18:14:35 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Mengyuan Lou <mengyuanlou@...-swift.com>
Cc:     netdev@...r.kernel.org, jiawenwu@...stnetic.com
Subject: Re: [PATCH net-next] net: ngbe: Add ngbe mdio bus driver.
> +static void ngbe_phy_fixup(struct ngbe_hw *hw)
> +{
> +	struct phy_device *phydev = hw->phydev;
> +	struct ethtool_eee eee;
> +
> +	if (hw->mac_type != ngbe_mac_type_mdi)
> +		return;
> +	/* disable EEE, EEE not supported by mac */
> +	memset(&eee, 0, sizeof(eee));
> +	phy_ethtool_set_eee(phydev, &eee);
> +
> +	linkmode_zero(phydev->supported);
> +	linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT,
> +			 phydev->supported);
> +	linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT,
> +			 phydev->supported);
> +	linkmode_set_bit(ETHTOOL_LINK_MODE_10baseT_Full_BIT,
> +			 phydev->supported);
As a side effect of linkmode_zero(phydev->supported) you also removed
any PAUSE capabilities of the PHY.
I assume the real issue here is that your MAC does not support half
duplex? So use:
phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_10baseT_Half_BIT);
etc.
There was a few comments i made on the previous version which have not
yet been addresses. Please fix them for the next version.
    Andrew
Powered by blists - more mailing lists
 
