In my case, Vitesse VSC8244 PHY is inferred so VSC8244.c is compiled and it includes the line:
_eth_phy_dev("Vitesse VSC8244", 0x000FC6C2, VSC8244_stat) In the MAC layer, I call _eth_phy_init() to probe for the PHY and I get the PHY status by calling _eth_phy_state() which uses the stat() function of the PHY. I use the PHY state to configure the MAC layer according to current link speed and duplex mode reported. Christophe -----Original Message----- From: ecos-discuss-ow...@ecos.sourceware.org [mailto:ecos-discuss-ow...@ecos.sourceware.org] On Behalf Of Mikhail Matusov Sent: 26. juni 2010 00:14 To: ecos-discuss@ecos.sourceware.org Subject: Re: [ECOS] Ethernet PHY Device API Hi Christophe, Thanks for your help. I am a little confused by your example. It seems that you have combined MAC and PHY control together... Perhaps it makes sense for your hardware... Also, any other PHY file there is has a line similar to the following: _eth_phy_dev ("Micrel KSZ8041", 0x00221512, ksz8041_stat) There is no such line in your code... Neither can I find the supposedly required stat() function declaration. I realize that the code should be sufficient to understand what you are doing, but being more of a hardware designer than a software guru I would appreciate some explanation. Thanks again, /Mikhail -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss