Hi all, i have some problems trying to control a phy eth device by mii/mdio.

I'm a newbie about this topic and i can't find online documentation .
However i have the device connected on a bus MII and on a bus MDIO of a MPC8306 processor...the system recognizes the device correctly as eth0 and i can use it.

I'd like to write a kernel module that is able to write the device's registers...i found the mii_if_info structure defined in linux/mii.h that contains two function pointers:mdio_read and mdio_write...

I'm no idea about how these functions could be...some drivers (for example the popular 3c59x) define these two functions as functions that read/write using for example ioread/iowrite family methods but i think that this is not the right way for me...I know this is a quite complex topic but i can't find documentation

any advice?

Thank you all!