Forum Discussion
Altera_Forum
Honored Contributor
14 years ago --- Quote Start --- Something is wrong with Your driver. --- Quote End --- Exactly. You seem to have just added the KSZ to the list of recognized PHYs, but not implemented the neccessary read_status functions. The default functions will not work, as you would have to check the link status of the other two PHYs, and mix them into one response. This is my phy_profile:
void add_phy_to_profile()
{
/* supported PHY definition */
/* ------------------------------ */
/* KSZ8893M */
/* ------------------------------ */
alt_tse_phy_profile KSZ8893M = {"Micrel KSZ8893M", /* Micrel KSZ8893M */
KSZ8893M_OUI, /* OUI */
KSZ8893M_MODEL, /* Vender Model Number */
KSZ8893M_REV, /* Model Revision Number */
0, /* Location of Status Register (ignored) */
0, /* Location of Speed Status (ignored) */
0, /* Location of Duplex Status (ignored) */
0, /* Location of Link Status (ignored) */
&KSZ8893M_phy_cfg, /* function pointer to configure Micrel KSZ8893M */
&KSZ8893M_link_status_read /* Function pointer to read from PHY specific status register */
};
/* add supported PHY to profile */
alt_tse_phy_add_profile(&KSZ8893M);
}
KSZ8893M_phy_cfg is my Phy init function, where I start the switch. You might not need that. KSZ8893M_link_status_read you must implement, so Interniche can detect when it's online. And as the KSZ contains 3 PHYs, you will need to patch the driver so that when it detects the KSZ, it skips the next 2 PHY adresses. (That's what I did, and it works good.)