LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Closed Thread
 
Search this Thread
Old 07-18-2010, 04:33 AM   #1
rashyd80
LQ Newbie
 
Registered: Jun 2010
Posts: 4

Rep: Reputation: 0
mdio function not called.. =(


hi, the below is my original question in newbie area which nobody answers yet, unfortunately =(. Here's my early findings: Linux kernel require new devices to be added into its device list so that the device-driver matching is successful thus calling .probe. My driver MDIO works well on uBoot, however still having some issues at the kernel side. Here's another q:

1. Is /driver/net/fs_enet works for mpc8560 based cpm2-fcc? The comments in the code only stated that it only support mpc82xx & 8xx mpc. I am referring to the cpm-fcc driver overhere which is to be configured as fast ethernet, in simple work, the driver in /fs_enet, is it workable for mpc8560 fcc-1?

2. The /driver/net/fs_enet driver is using bitbang based phy control. will it straightforwardly work if it is to be used with another type of phy? which is not on the list?


-------------------------------------------------------------------------

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 (not shown) 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-18-2010, 05:11 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,457
Blog Entries: 54

Rep: Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread should be closed because it is a duplicate of http://www.linuxquestions.org/questi...called-817297/.
 
  


Closed Thread


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
mdio probe function not called. rashyd80 Programming 3 07-20-2010 01:45 AM
Where is a PCI module's Probe function called? jbreaka4lyfe Linux - General 2 05-18-2010 03:07 AM
JavaScript function disappears after getting called for once mohtasham1983 Programming 1 01-15-2008 08:31 AM
segfault caused depending on how a function is called emge1 Programming 6 04-04-2007 03:48 PM
howto know whether a function is called in signal handler snowing Programming 1 11-07-2005 09:55 PM


All times are GMT -5. The time now is 01:47 AM.

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