LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 07-01-2010, 12:05 AM   #1
rashyd80
LQ Newbie
 
Registered: Jun 2010
Posts: 4

Rep: Reputation: 0
Unhappy 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??
 
Old 07-17-2010, 07:11 AM   #2
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
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.
 
Old 07-18-2010, 05:38 AM   #3
rashyd80
LQ Newbie
 
Registered: Jun 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Unhappy moved to kernel section.

Thanks texmex, copied the thread into kernel section.


Quote:
Originally Posted by H_TeXMeX_H View Post
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.
 
Old 07-20-2010, 02:45 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,999
Blog Entries: 11

Rep: Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where is a PCI module's Probe function called? jbreaka4lyfe Linux - General 2 05-18-2010 04:07 AM
SPIDEV implementation issues - probe not called Mintu123 Linux - Software 0 08-28-2008 12:37 PM
probe method on bus and device driver not being called kunice Linux - Hardware 0 02-24-2008 12:47 PM
USB driver won't call probe function linux=future Linux - Kernel 2 01-13-2007 05:47 PM
USB Driver Probe function not being called xtom Fedora 0 10-28-2005 04:48 PM


All times are GMT -5. The time now is 11:35 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration