Forum Discussion
Altera_Forum
Honored Contributor
15 years agoTriple-Speed Ethernet with ksz8893
I want to use the mii of ksz8893 connect to Triple-Speed Ethernet ,but it cannot work. my socket can listenning, but i cannot ping from pc.please tell me what should i do?
Altera_Forum
Honored Contributor
15 years agoI am reading these registers via SPI, I have not tried it via MDIO.
As the MDIO normally only uses one PHY, I think it is quite tricky to get to the registers of the other two PHYs. The MII-interface is not neccessary to check for connection, as you have a fixed link to your FPGA. Depending on your implementation, it will always be 100M (probably) or 10M, and will always be connected. So you would only need to check the connection status of the other 2 PHYs, and return when one is connected. If you don't care whether a line is connected or not (as is possible for testing), just return any correct value for the link status, e.g.
/* If speed == 10 Mbps */
// link_status |= 0x8;
/* Else speed = 100 Mbps */
link_status |= 0x4;
/* If duplex == Full */
link_status |= 0x1;
return link_status;