LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   mdio probe function not called. (http://www.linuxquestions.org/questions/programming-9/mdio-probe-function-not-called-817297/)

rashyd80 06-30-2010 11:05 PM

mdio probe function not called.
 
Hi, newbie here.
am writing mdio driver for mpc8560 for a new phy. I am referring to gianfar driver codes which is for gigabyte ethernet and some freescale fcc ethernet driver for mpc8540 cpm (which i need to port it to mpc8560 cpm, not sure if they are reusable), but here's my problem. A modular driver is reference and modified as below:

static int __init fs_init(void)
{
...
/* let's insert mii stuff */
r = fs_enet_mdio_bb_init()

if (r != 0) {
printk(KERN_ERR DRV_MODULE_NAME
"BB PHY init failed.\n");
return r;
}
r = driver_register(&fs_enet_fcc_driver);
if (r != 0)
goto err;

...
}

static struct device_driver fs_enet_bb_mdio_driver = {
.name = "fsl-bb-mdio",
.bus = &platform_bus_type,
.probe = fs_enet_mdio_probe,
.remove = fs_enet_mdio_remove,
};

int fs_enet_mdio_bb_init(void)
{
return driver_register(&fs_enet_bb_mdio_driver);
}


my understanding is that once the driver registered, the probe will be called though im not sure what is happening in the background. However, in my testing, eventhough the above fs_enet_mdio_bb_init() is called, the fs_enet_mdio_probe() is not called.

Can anybody explains why is this happening? would be helpful if anybody could explain how the registration triggers the probe??

H_TeXMeX_H 07-17-2010 06:11 AM

I strongly recommend you report your thread, and have it moved to either Kernel or Programming, otherwise I very much doubt anyone will give you an answer, because nobody who knows about this stuff will see it.

rashyd80 07-18-2010 04:38 AM

moved to kernel section.
 
Thanks texmex, copied the thread into kernel section.


Quote:

Originally Posted by H_TeXMeX_H (Post 4036209)
I strongly recommend you report your thread, and have it moved to either Kernel or Programming, otherwise I very much doubt anyone will give you an answer, because nobody who knows about this stuff will see it.


Tinkster 07-20-2010 01:45 AM

The suggestion was to "report to be moved", not create a dupe
and ask for closure. The post in Linux-Kernel was closed (as
it was the duplicate), and I'm moving this one to PROGRAMMING
because I feel it's more likely to get a coding related response
there. Best of luck.


Cheers,
Tink


All times are GMT -5. The time now is 05:26 AM.