2007-01-19 19:04:48

by Choi Sonim

[permalink] [raw]
Subject: [Bluez-devel] loading of hci_uart.ko

hi all,

I want to ask.
when I do "hciattach /dev/ttyS0 any", somehow the needed module
hci_uart.ko is loaded.
I looked in hciattach.c but I do not see how is it done.
can u please help me here ?

thank you very much all
choi.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2007-01-29 10:42:09

by Choi Sonim

[permalink] [raw]
Subject: Re: [Bluez-devel] loading of hci_uart.ko

On 1/29/07, Marcel Holtmann <[email protected]> wrote:
> Hi Choi,
>
> > > > when I do "hciattach /dev/ttyS0 any", somehow the needed module
> > > > hci_uart.ko is loaded.
> > > > I looked in hciattach.c but I do not see how is it done ?
> > >
> > > # modinfo hci_uart
> > > alias: tty-ldisc-15
> > >
> > > It tells the kernel to load this module if any application request the
> > > line discipline 15.
> >
> > can you please elaborate on this ? when the app request the HCI line
> > discipline, how does the kernel knows it need to look for alias tty-ldisc-15 ?
> > does it then run modprobe ?
> > what code is responsible for that ?
>
> the kernel actually doesn't care what's the module name of module
> providing the line discipline 15. It simply requests the loading of the
> module and the userspace (insmod/modprobe) has to resolve this.

thank you very much
choi

>
> Regards
>
> Marcel
>
>
>

2007-01-29 10:05:45

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] loading of hci_uart.ko

Hi Choi,

> > > when I do "hciattach /dev/ttyS0 any", somehow the needed module
> > > hci_uart.ko is loaded.
> > > I looked in hciattach.c but I do not see how is it done ?
> >
> > # modinfo hci_uart
> > alias: tty-ldisc-15
> >
> > It tells the kernel to load this module if any application request the
> > line discipline 15.
>
> can you please elaborate on this ? when the app request the HCI line
> discipline, how does the kernel knows it need to look for alias tty-ldisc-15 ?
> does it then run modprobe ?
> what code is responsible for that ?

the kernel actually doesn't care what's the module name of module
providing the line discipline 15. It simply requests the loading of the
module and the userspace (insmod/modprobe) has to resolve this.

Regards

Marcel



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-01-29 09:57:00

by Choi Sonim

[permalink] [raw]
Subject: Re: [Bluez-devel] loading of hci_uart.ko

Hi Marcel,

On 1/19/07, Marcel Holtmann <[email protected]> wrote:
> > when I do "hciattach /dev/ttyS0 any", somehow the needed module
> > hci_uart.ko is loaded.
> > I looked in hciattach.c but I do not see how is it done ?
>
> # modinfo hci_uart
> alias: tty-ldisc-15
>
> It tells the kernel to load this module if any application request the
> line discipline 15.

can you please elaborate on this ? when the app request the HCI line
discipline, how does the kernel knows it need to look for alias tty-ldisc-15 ?
does it then run modprobe ?
what code is responsible for that ?

thank you very much for the help
choi
>
> Regards
>
> Marcel
>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Bluez-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>

2007-01-19 19:34:57

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] loading of hci_uart.ko

Hi Choi,

> I want to ask.
> when I do "hciattach /dev/ttyS0 any", somehow the needed module
> hci_uart.ko is loaded.
> I looked in hciattach.c but I do not see how is it done.
> can u please help me here ?

# modinfo hci_uart
alias: tty-ldisc-15

It tells the kernel to load this module if any application request the
line discipline 15.

Regards

Marcel



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel