Ethernet Phy link test and reset from Colibri iMX6

How to test the Ethernet PHY link activity from Colibri from a WInCE application? How can I reset the PHY in case of link is found inactive?

Link detection is done by the Phy, you can force it to 10/100Mbs, but if you leave it in auto-negotiation mode it will report the link when available.