Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-22-2011, 04:09 AM   #1
LQ Newbie
Registered: Jun 2011
Posts: 1

Rep: Reputation: Disabled
device drivers

> may i know
> kernel maintains information of all the drivers present in it?
> the hot-plug-in mechanism identifies required driver? (especially
> network drivers which do not have major and minor number concept)
> 3.what is purpose of probe function in driver? does it used by driver or
> kernel? and how?
> Thanking you,
> PavanKumar.V

Please find my explanations to the above asked Q?

1A. Linux kernel driver model has a different types of models such as, char, block,
and network models. Every driver that is implemented in the linux will belongs to
one of these categories. Each, model has its own style to maintain data in the
kernel file system.

Suppose for example, PCI-Serial devices which belongs to char model, registers with
the PCI core, registers with the serial core and registers with the tty layer.
Here PCI is the bus, so kernel maintains its data in /sys/bus/pci/... that is while
registering with PCI core.
TTY maintains its data in /sys/class/tty/ttyXX/...
So, for every thing if you want to know the related data, go through the /sysfs.

2A. Hotplugging mechanism aysnchronously notifies the userspace when hardware is
So, userspace will be notified by either Mj/Mn numbers or in your case
Interface name & index of its interface. Say, eth0 or eth2 etc.

3A. You know the module_init macro right? What it will do, it is only funciton
that called when you insert the module. Generally, you do register with
required subsystems passing device_ids details and return from the
module_init function.
At this stage, the corresponding bus driver will maintain supplied device_ids
structure to its probe match ids table.

When you attach/insert your product, the corresponding bus driver will
identifies its VEN/PROD ids and searches for the product_ids details that is
maintained when you do registering. So, when it found corresponding matched
ids, then driver's "probe" will be called.

Last edited by vuthurpavankumar; 07-19-2011 at 07:00 AM. Reason: Please find my explanations to your points. 1A. Linux kernel driver model has a different types of models such as, char, blo
Old 06-22-2011, 04:51 AM   #2
LQ 5k Club
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.2
Posts: 7,653
Blog Entries: 56

Rep: Reputation: Disabled
Is this homework? If it is, take notice of this LQ rule:
Do not expect LQ members to do your homework - you will learn much more by doing it yourself.
0 members found this post helpful.
Old 06-22-2011, 05:51 AM   #3
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
As Brianl said, no homework here!

To convince us that it's not your homework you're asking us to do, you should post questions that reflect what you've tried, on which exact distro, which commands, and what result you got, what result you expected.

regarding those 3 questions, situation looks quite desperate! you're asking such broad questions that the best advice you can get is to use google to find reference documents on those subjects.

Last one, asking 3 questions in the same thread is not going to help either.
0 members found this post helpful.
Old 09-04-2011, 04:24 AM   #4
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Just to remind everyone: While we won't do your homework for you, we will be happy to answer questions, especially thoughtful ones, when you get stuck.

Welcome to LQ, vuthurpavankumar.

brianL, [I]16pide[/I,

Why do you suspect homework here?
Old 09-04-2011, 04:31 AM   #5
LQ Guru
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Just to add one more voice to the above, "homework" immediately sprang to mind on reading the question.
@archtoad6 Why? because of the phrasing of the questions and the kinds of information being asked for. It's hard to imagine what task would require this type of information.
Old 09-04-2011, 07:35 AM   #6
LQ 5k Club
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.2
Posts: 7,653
Blog Entries: 56

Rep: Reputation: Disabled
Originally Posted by jdkaye View Post
@archtoad6 Why? because of the phrasing of the questions...jdk
Same here. I'm always suspicious when questions are numbered like those.


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
linux device drivers : how can i unregister a character device ? zampa Linux - General 5 06-21-2012 06:34 AM
[SOLVED] URGENT : How to handle one device through two separted device drivers Khadidja Linux - Kernel 2 02-16-2011 03:33 AM
Device drivers sandyvinay Programming 1 05-11-2009 04:17 AM
Device Drivers reza_asghari Programming 5 08-30-2002 02:05 PM
device drivers Susan Linux - Newbie 3 10-11-2001 08:36 AM > Forums > Linux Forums > Linux - Newbie

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

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