From: p.ittershagen@googlemail.com (Philipp Ittershagen)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Node creation For real time devices
Date: Fri, 20 Apr 2012 16:42:28 +0200 [thread overview]
Message-ID: <CAC157GAJR_f-x+VMHvwn4s4R1vCJUyQngLY1EnQSneNp1xv13Q@mail.gmail.com> (raw)
In-Reply-To: <CAB6A5-C5RXpx5g6wgXQRX5VUR-Dp7SmVbeNBzHXSZQ7dvtEyrg@mail.gmail.com>
On Fri, Apr 20, 2012 at 4:04 PM, manty kuma <mantykuma@gmail.com> wrote:
> Hi Philipp,
>
> The flow you mentioned is something which I was not aware of. I would like
> to see it happening in code.
>
> My Queries are as follows:
>
> 1) " The kernel then creates?an uevent and notifies the userspace part of
> udev (udevd) through a?netlink socket.?" - ?What are the corresponding files
> that i need to check? If the question is too abstract, kindly explain me
> with respect to any sample Bus.
The article at http://www.linuxjournal.com/article/8093 explains the
initialization mechanism for USB. I don't have any code experience on
USB hubs but by following the functions mentioned in the article
(expecially the khubd kthread) you can see that the interrupt I
mentioned is handled by the USB subsystem.
Next, the uevent is created. The generic(?) implementation of this can
be found at http://lxr.free-electrons.com/source/drivers/usb/core/driver.c#L722,
where you can see that the uevent contains the necessary data for
creating a udev entry.
By sending the uevent we're crossing the kernel/userspace boundary and
you have to take a look at the udev and udevd implementation for more
information.
> 2)??"The uevent is received by udevd and now udev can check?for rules to add
> the device node to /dev" - Again the same thing. I would like to see it
> inside the code. Please help me in looking at the real code.
If a `man udev` does not answer your questions, you should take a look
at the source code at
http://git.kernel.org/?p=linux/hotplug/udev.git;a=summary.
Again, please correct me if I'm wrong :)
Hope this helps,
Philipp
prev parent reply other threads:[~2012-04-20 14:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-20 13:29 Node creation For real time devices manty kuma
2012-04-20 13:54 ` Philipp Ittershagen
2012-04-20 14:04 ` manty kuma
2012-04-20 14:26 ` Li Haifeng
2012-04-20 14:42 ` Philipp Ittershagen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAC157GAJR_f-x+VMHvwn4s4R1vCJUyQngLY1EnQSneNp1xv13Q@mail.gmail.com \
--to=p.ittershagen@googlemail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).