User Tools

Site Tools


phy_link_update

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
phy_link_update [2018/08/28 11:54]
rpjday [freescale/gianfar.c]
phy_link_update [2018/08/28 11:55]
rpjday [freescale/dpaa/dpaa_eth.c]
Line 264: Line 264:
         mac_dev->​adjust_link(mac_dev);​         mac_dev->​adjust_link(mac_dev);​
 } }
 +</​code>​
 +
 +==== freescale/​ucc_geth.c ====
 +
 +<​code>​
 +/* Called every time the controller might need to be made
 + * aware of new link state. ​ The PHY code conveys this
 + * information through variables in the ugeth structure, and this
 + * function converts those variables into the appropriate
 + * register values, and can bring down the device if needed.
 + */
 +
 +static void adjust_link(struct net_device *dev)
 +{
 +        struct ucc_geth_private *ugeth = netdev_priv(dev);​
 +        struct ucc_geth __iomem *ug_regs;
 +        struct ucc_fast __iomem *uf_regs;
 +        struct phy_device *phydev = ugeth->​phydev;​
 +        int new_state = 0;
 +
 +        ug_regs = ugeth->​ug_regs;​
 +        uf_regs = ugeth->​uccf->​uf_regs;​
 +
 +        if (phydev->​link) { ...
 </​code>​ </​code>​
phy_link_update.txt ยท Last modified: 2018/08/28 11:57 by rpjday