return -ENODEV;
return phy_ethtool_gset(phydev, ecmd);
}
+
static int xlr_set_settings(struct net_device *ndev, struct ethtool_cmd *ecmd)
{
struct xlr_net_priv *priv = netdev_priv(ndev);
.set_settings = xlr_set_settings,
};
-
/*
* Net operations
*/
struct xlr_net_priv *priv = netdev_priv(ndev);
struct phy_device *phydev = priv->mii_bus->phy_map[priv->phy_addr];
-
/* schedule a link state check */
phy_start(phydev);
xlr_nae_wreg(base_addr, R_MII_MGMT_COMMAND,
(1 << O_MII_MGMT_COMMAND__rstat));
-
/* poll for the read cycle to complete */
while (!timedout) {
checktime = jiffies;
xlr_nae_wreg(priv->gpio_addr, 0x22, 0x7e6802);
xlr_nae_wreg(priv->gpio_addr, 0x21, 0x7104);
-
/* enable autoneg - more magic */
phy = priv->phy_addr % 4 + 27;
xlr_phy_write(priv->pcs_addr, phy, 0, 0x1000);