Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
> may i know
> 1.how kernel maintains information of all the drivers present in it?
> 2.how 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,
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
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
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.
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.